aeat.core.resources._registry module¶
Central resource registry and process-wide factory.
The ResourceRegistry aggregates every
ResourceRepository the project exposes. The
resources() factory builds the registry once per process;
subsequent calls return the cached instance. Tests that override
aeat.core.config.Settings to change the bundled-data
location must call resources.cache_clear() to force a rebuild
on the next access.
- class ResourceRegistry(apoderamientos=<factory>, category_profiles=<factory>, holiday_calendars=<factory>, legal_parameters=<factory>, manuals=<factory>, modelos=<factory>, recargo_bands=<factory>, topics=<factory>, user_profile_schema=<factory>, iva_catalogues=<factory>, iva_rate_tables=<factory>)[source]¶
Bases:
objectAggregate of every Repository the project exposes.
Each field holds one
ResourceRepositoryinstance owning its own Identity Map. Theclear()method empties every Repository’s cache uniformly; tests that override Settings between cases call it via the module-levelresources()factory’scache_clear.- Parameters:
apoderamientos (ApoderamientosRepository)
category_profiles (CategoryProfileRepository)
holiday_calendars (HolidayCalendarRepository)
legal_parameters (LegalParameterRepository)
manuals (ManualRepository)
modelos (StaticModeloRepository)
recargo_bands (RecargoBandsRepository)
topics (TopicCatalogueRepository)
user_profile_schema (UserProfileSchemaRepository)
iva_catalogues (IvaCatalogueRepository)
iva_rate_tables (IvaRateTableRepository)
-
apoderamientos:
ApoderamientosRepository¶
-
category_profiles:
CategoryProfileRepository¶
-
holiday_calendars:
HolidayCalendarRepository¶
-
legal_parameters:
LegalParameterRepository¶
-
manuals:
ManualRepository¶
-
modelos:
StaticModeloRepository¶
-
recargo_bands:
RecargoBandsRepository¶
-
topics:
TopicCatalogueRepository¶
-
user_profile_schema:
UserProfileSchemaRepository¶
-
iva_catalogues:
IvaCatalogueRepository¶
-
iva_rate_tables:
IvaRateTableRepository¶
- resources()[source]¶
Return the process-wide resource registry.
Cached at first call. The factory reads Settings once at construction and threads operator-supplied roots through to the Repositories that honour an env-override seam (manuals and iva catalogues). Tests that mutate Settings between cases call
resources.cache_clear()to rebuild with the new values.- Return type:
- Returns:
The process-wide cached
ResourceRegistryinstance.