Scraper
omniread.csv.scraper
Summary
CSV scraper for OmniRead.
This module defines the scraper responsible for acquiring raw comma-separated-value document content from a backing store via a configured client.
The scraper does not interpret or parse the acquired bytes; it wraps them in
the canonical Content model.
Classes
CsvScraper
Scraper for csv documents.
Notes
Responsibilities:
1 2 3 | |
Constraints:
1 2 | |
Initialize the CSV scraper.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
client |
BaseCsvClient
|
Client responsible for retrieving raw csv bytes. |
required |
Functions
fetch
Fetch a csv document from the given source.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
source |
Any
|
Identifier of the csv source as understood by the configured client. |
required |
metadata |
Optional[Mapping[str, Any]]
|
Optional metadata to attach to the returned content. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Content |
Content
|
A |
Raises:
| Type | Description |
|---|---|
Exception
|
Retrieval-specific errors raised by the client. |