aeat.adapters.inbound.borrador package¶
Observed Modelo 100 (IRPF / Renta) PDF parsing boundary.
Modelo 100 has three artefact types a taxpayer encounters, all parsed through this module:
Borrador — AEAT’s pre-filing draft, downloaded from Portal Renta. Has pre-populated casillas but no CSV.
Predeclaración / simulación — non-binding simulation from Renta Web Open. Same shape; watermarked “VISTA PREVIA”.
Declaración — post-filing copy with a CSV stamp.
The parser extracts printed casilla/value rows as observed filing data. This
adapter does not resolve RegistrySnapshot
objects or decide filing-grade completeness by itself. Completeness is enforced
only when the caller supplies a
BorradorExtractionProfile
projection and selects registry-profile parsing. Returned observations carry a
privacy-preserving source reference derived from the PDF digest, not the
operator’s local source path.
The public API surfaces InboundBorradorObservation,
BorradorParseMode, BorradorParseError,
BorradorExtractionProfile, ArtefactKind, and
parse_borrador().
See also
parse_borrador()Single public entry point that composes artefact detection with the year-keyed extractor registry.
declaracionSibling filed-declaration parser that owns the declaration-PDF surface.
pdfShared PDF extraction helpers used by the Renta parser backend.
ExtractionProfileDefinitionRegistry-side profile shape callers may project into the lightweight protocol consumed here.
Examples
>>> from aeat.adapters.inbound.borrador import parse_borrador
>>> filing = parse_borrador(pdf_path)
Subpackages¶
Submodules¶
- aeat.adapters.inbound.borrador._detect module
- aeat.adapters.inbound.borrador._errors module
- aeat.adapters.inbound.borrador._parser module
- aeat.adapters.inbound.borrador._schema module
ArtefactKindBorradorParseModeBorradorExtractionTargetBorradorExtractionProfileInboundBorradorObservationInboundBorradorObservation.modeloInboundBorradorObservation.ejercicioInboundBorradorObservation.tax_idInboundBorradorObservation.artefact_kindInboundBorradorObservation.valuesInboundBorradorObservation.registry_extraction_profile_idInboundBorradorObservation.extraction_coverageInboundBorradorObservation.source_pdf_pathInboundBorradorObservation.source_pdf_sha256InboundBorradorObservation.parsed_atInboundBorradorObservation.csvInboundBorradorObservation.warnings