cadrumo.adapters.inbound.financial.providers.detection module¶
Provider registry and file-format auto-detection.
Exposes detect_provider, the entry point the financial-ingest application
layer calls to pick a concrete
FinancialProvider for an
arbitrary path. The detection strategy combines extension hinting with
magic-byte sniffing so a misnamed file (a PDF saved as .csv, an XLSX inside
a .txt, etc.) still routes to the right parser.
- detect_provider(path)[source]¶
Return the first provider that validates the source successfully.
Walks an extension- and content-prioritised candidate list and returns the first provider whose
validate_sourceresult is anis_validProviderValidation.- Parameters:
path (
Path) – Source document to classify.- Return type:
- Returns:
The matching
FinancialProvider, orNonewhen no provider can interpretpath.