Client
omniread.xlsx.client
Summary
XLSX client abstractions for OmniRead.
This module defines the client layer responsible for retrieving raw Office Open XML spreadsheet bytes from a concrete backing store.
Clients provide low-level access to xlsx binaries and are intentionally 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
Classes
BaseXlsxClient
Bases: ABC
Abstract client responsible for retrieving spreadsheet bytes.
Retrieves bytes from a specific backing store (filesystem, S3, FTP, etc.).
Notes
Responsibilities:
1 2 3 4 | |
Functions
fetch
abstractmethod
Fetch raw xlsx bytes from the given source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source |
Any
|
Identifier of the spreadsheet location, such as a file path, object storage key, or remote reference. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
Raw xlsx bytes. |
Raises:
| Type | Description |
|---|---|
Exception
|
Retrieval-specific errors defined by the implementation. |
FileSystemXlsxClient
Bases: BaseXlsxClient
XLSX client that reads from the local filesystem.
Notes
Guarantees:
1 2 | |
Functions
fetch
Read an xlsx file from the local filesystem.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path |
Path
|
Filesystem path to the spreadsheet file. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
bytes |
bytes
|
Raw xlsx bytes. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If the path does not exist. |
ValueError
|
If the path exists but is not a file. |