updated docs strings and added README.md

This commit is contained in:
2026-03-08 17:59:56 +05:30
parent 0fbf0ca0f0
commit de7d04eb1a
26 changed files with 546 additions and 406 deletions

View File

@@ -1,10 +1,8 @@
"""
# Summary
PDF client abstractions for OmniRead.
---
## Summary
This module defines the **client layer** responsible for retrieving raw PDF
bytes from a concrete backing store.
@@ -13,6 +11,7 @@ decoupled from scraping and parsing logic. They do not perform validation,
interpretation, or content extraction.
Typical backing stores include:
- Local filesystems
- Object storage (S3, GCS, etc.)
- Network file systems
@@ -25,13 +24,17 @@ from pathlib import Path
class BasePDFClient(ABC):
"""
Abstract client responsible for retrieving PDF bytes
from a specific backing store (filesystem, S3, FTP, etc.).
Abstract client responsible for retrieving PDF bytes.
Retrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).
Notes:
**Responsibilities:**
- Implementations must accept a source identifier appropriate to the backing store, return the full PDF binary payload, and raise retrieval-specific errors on failure
- Implementations must accept a source identifier appropriate to
the backing store.
- Return the full PDF binary payload.
- Raise retrieval-specific errors on failure.
"""
@abstractmethod
@@ -61,7 +64,8 @@ class FileSystemPDFClient(BasePDFClient):
Notes:
**Guarantees:**
- This client reads PDF files directly from the disk and returns their raw binary contents
- This client reads PDF files directly from the disk and returns
their raw binary contents.
"""
def fetch(self, path: Path) -> bytes: