Skip to content

Abc

pipelines.extraction.csv.abc

Summary

Abstract contracts for the csv (direct table) extraction graph.


The csv family is a "direct table" pipeline — no OCR, no buckets, no ambiguity. It shares the tabular core (shared/tabular.py) with xlsx: only the table reader differs (csv rows vs xlsx worksheet rows). Bank-specific readers live under banks/.

Classes

CsvExtractionPipeline

Bases: TabularExtractionPipeline

csv-family root — pins only the reader; chain shared with xlsx.

Slot annotations

source: ExtractionSource ingest, table_reader, txn_dicts, raw_expense

Attributes:

Name Type Description
source ExtractionSource

The extraction source descriptor.

table_reader CsvTableReaderPort

Csv table reader stage.

Functions
run
run(source) -> List[Any]

Run the direct-table extraction chain.

Parameters:

Name Type Description Default
source

Raw extraction source.

required

Returns:

Type Description
List[Any]

List[Any]: Raw expense records.

CsvTableReaderPort

Bases: TableReaderPort

content → list of typed records read from a csv statement file.

Functions
read
read(content) -> List[dict]

Read typed records from a csv statement file.

Parameters:

Name Type Description Default
content

Materialized content (bytes, Content, dict, or str).

required

Returns:

Type Description
List[dict]

List[dict]: Typed table records.