Skip to content

Registry

pipelines.extraction.shared.registry

Summary

Registry mapping (source_type, bank, pipeline) → composition root.


Each family's banks/ module defines its concrete root (e.g. AxisPdfExtractionPipeline); this module is the single lookup used by callers (the fetch-request scripts) instead of hand-rolled _BANK_TO_ROOT maps.

Classes

Functions

known_roots

known_roots() -> list

List every registered (source_type, bank, pipeline) triple.

Returns:

Name Type Description
list list

List of (source_type, bank, pipeline) tuples.

resolve_root

1
2
3
resolve_root(
    source_type: str, bank: str, pipeline: str = "heuristic"
) -> type

Return the composition root class for (source_type, bank, pipeline).

Parameters:

Name Type Description Default
source_type str

Source family (pdf, email, csv, xlsx, llama).

required
bank str

Bank tag (axis, icici).

required
pipeline str

Pipeline tag; defaults to "heuristic".

'heuristic'

Returns:

Name Type Description
type type

The composition root class for the triple.

Raises:

Type Description
ValueError

When no root is registered for the triple.