aeat.core.resources._keys module¶
Typed key base models for the resource-management API.
Each ResourceCacheRepository declares its own key model
or uses a trivial type for singleton and year-keyed resources.
Concrete keys such as ManualKey inherit from
TypedResourceKey when the lookup needs multiple fields.
Cache keys are Pydantic v2 models with frozen=True so they
are hashable for dict-backed Identity Maps. Singletons use
None directly as the key; year-keyed Repositories use bare
int values.
- class TypedResourceKey(**data)[source]¶
Bases:
BaseModelCommon base for typed Repository keys.
Each
ResourceCacheRepositorythat needs more thanNoneorintas its key inherits from this base and adds its own fields. Thefrozen=Trueconfig makes the model hashable for Identity Map dict use.