cadrumo.adapters.inbound.einvoice package¶
Deterministic readers for structured electronic-invoice documents.
An e-invoice that already carries a machine-readable record is read, not
inferred. Parsing it is exact, model-free and costs nothing marginal: it runs on
the already-declared defusedxml, needs no GPU, adds no licence exposure and
is available on a default install with no optional extra enabled.
That is why these readers sit in the deterministic core rather than behind the
inference boundary, and why they sit in adapters/inbound/ beside the six
sibling packages that already parse externally-authored formats – pdf,
financial, borrador, censo, declaracion and justificante.
The routing order this package enables is itself a control, and is recorded as
one so a later change optimising for latency does not discard it: a document
carrying a structured record reaches no model at all, which makes prompt
injection categorically impossible for that document rather than merely
mitigated. The corresponding hazard moves to the XML reader rather than
disappearing, and is bounded there – see xml.
Two properties are load-bearing and neither is an accuracy claim. The reader
fails loudly: a malformed document raises EInvoiceXmlParseError and
yields no record, where a model handed the same bytes returns a confident,
plausible, wrong invoice. And it is three to five orders of magnitude
faster than a vision read of the same document.
Submodules¶
- cadrumo.adapters.inbound.einvoice.application_translation module
- cadrumo.adapters.inbound.einvoice.parsers module
FacturaeInvoiceClassParsedEInvoiceLineParsedEInvoiceParsedEInvoice.shapeParsedEInvoice.supplier_tax_idParsedEInvoice.customer_tax_idParsedEInvoice.supplier_nameParsedEInvoice.customer_nameParsedEInvoice.supplier_postal_codeParsedEInvoice.customer_postal_codeParsedEInvoice.supplier_country_codeParsedEInvoice.customer_country_codeParsedEInvoice.invoice_numberParsedEInvoice.invoice_seriesParsedEInvoice.facturae_invoice_classParsedEInvoice.rectifies_invoice_numberParsedEInvoice.invoice_dateParsedEInvoice.currencyParsedEInvoice.taxable_baseParsedEInvoice.iva_amountParsedEInvoice.grand_totalParsedEInvoice.recargo_amountParsedEInvoice.retencion_amountParsedEInvoice.suplidos_amountParsedEInvoice.iva_categoryParsedEInvoice.regime_legendParsedEInvoice.record_textParsedEInvoice.linesParsedEInvoice.iva_breakdown
parse_einvoice_document()
- cadrumo.adapters.inbound.einvoice.shape module
- cadrumo.adapters.inbound.einvoice.xml module