aeat.core.resources._repos.modelos module¶
StaticModeloRepository: thin façade over ValidatedRegistryAuthority.
The modelos repository is the only one that backs onto an
aggregate (ValidatedRegistryAuthority) rather than a direct
loader. The authority owns the validator + snapshot caches that
the test suite already relies on; the Repository preserves
those caches by holding a reference to the authority instance
and delegating get / all through it. Both return
ModeloDefinition records resolved from the authority.
- class StaticModeloRepository(root=None, source_root=None)[source]¶
Bases:
ResourceCacheRepository[ModeloDefinition,str]Modelo definitions keyed by their typed id (
"100","180", …).Wraps
aeat.domain.calculations.registry.ValidatedRegistryAuthority. The authority is constructed lazily on firstgetso the bundled registry only loads when actually needed.- Parameters:
root (Path | None)
source_root (Path | None)
- property authority: ValidatedRegistryAuthority¶
Return the backing
ValidatedRegistryAuthorityinstance.
- all()[source]¶
Return every modelo definition in the bundled registry.
- Return type:
- Returns:
A tuple of every
ModeloDefinitionknown to the backing authority.