aeat.core package

Core cross-cutting infrastructure shared by every aeat layer.

The core layer is the innermost package in the hexagonal architecture. It exports typed primitives, configuration-adjacent helpers, parsing utilities, and layer-neutral policies that domain, application, adapter, and entrypoint modules can import without depending outward.

The public facade groups four stable surfaces. Immutable modelling primitives include STRICT_FROZEN_CONFIG, CasillaId, Modelo, Period, StandardPeriodCode, PeriodKind, TaxDomain, RefundElection, ResultDisposition, and the lazily resolved BindingSourceKind registry-source taxonomy. Obligation-coverage mappings expose OUT_OF_SCOPE_OBLIGATIONS and UNMODELED_OBLIGATIONS, the codified AEAT modelo sets the overview coverage report reads to distinguish product-scope exclusions from registry gaps. Active-bucket context uses the plaintext BucketPointer value object plus pointer_path(), read_pointer(), write_pointer(), resolve_active_bucket_id(), require_active_bucket_id(), and resolve_repository_bucket_id(). TOML and option utilities expose read_toml(), parse_toml_text(), freeze_toml(), OptionalExtra, and require_optional_extra(). Filing-result helpers expose the codified ResultDisposition mapping and its casilla/refund predicates. Service and operator-adjacent primitives include ServiceCapability, LedgerSortField, LedgerSortOrder, IBAN_SHAPE_RE, and iban_mod_97(). The closed GoogleCredentialSourceKind taxonomy governs which mechanism adapters.outbound.google uses to obtain Google API credentials.

BindingSourceKind, BucketPointer, and the active-bucket IO helpers are resolved through __getattr__ so storage, config, and aggregation callers can import the public core facade without recreating the cycles those helpers break internally.

Major subpackages remain the specialised homes for broader contracts: core.config owns core.config.Settings and storage route classification, core.errors owns the error taxonomy and registry, core.money and core.decimal own Decimal primitives, core.time owns clocks, core.identity owns NIF/NIE/bucket/profile identifiers, core.access_gate owns live-read and write-refusal gating, core.redaction owns safe output, and core.classification owns sensitivity policy.

See also

Period: Canonical filing year plus registry period-code value used

across registry, deadline, and workflow boundaries.

BucketPointer: Typed value for the plaintext

active-profile pointer file.

resolve_active_bucket_id(): Central active-bucket precedence resolver

for storage and CLI startup paths.

read_toml(): Shared committed-TOML loader with caller-owned error

wrapping.

ResultDisposition: Codified fichero result-disposition

code set grounded in bundled AEAT diseños.

BindingSourceKind: Canonical registry binding-source taxonomy

resolved lazily from core.aggregation.

Subpackages

Submodules