cadrumo.domain.categories.spending_category module¶
Opaque spending-category tokens and mechanical family buckets.
The governed deductible-category vocabulary and its family membership live in
the dated categories.profile facts registry. This module retains only the
opaque token shape and the coarse family buckets used by presentation and
aggregation mechanics. Callers obtain category tokens through the typed
projection in spending_category_catalogue.
- class SpendingCategory(value, *, _registry_validated=False)[source]¶
Bases:
strRegistry-projected deductible-spending token.
Category membership is governing-body data, not a Python enum catalogue. Direct construction is therefore refused;
from_registry()is used only by the typed facts projection, while Pydantic input is resolved through that same projection.
- class SpendingCategoryFamily(*values)[source]¶
Bases:
StrEnumMechanical coarse buckets used by CLI listings and classifiers.
These values are presentation/aggregation grouping tokens, not the legal category catalogue. Their retained membership is resolved from the facts projection by
categories_for_family().- SOCIAL_SECURITY¶
- PREMISES¶
- HOME_OFFICE_SUMINISTROS¶
- HOME_OFFICE_OWNERSHIP¶
- TELECOMS¶
- OFFICE¶
- VEHICLE¶
- MEALS¶
- PROFESSIONAL_SERVICES¶
- TRAVEL¶
- INSURANCE¶
- FINANCIAL¶
- DIRECT_COSTS¶
- TAXES¶
- family_for(category, *, effective_date=None, authority=None)[source]¶
Return the registry-declared coarse family for one category.
- Return type:
- Parameters:
category (SpendingCategory)
effective_date (date | None)
authority (GovernedFactSource | None)
- categories_for_family(family, *, effective_date=None, authority=None)[source]¶
Return registry-declared category tokens for one mechanical family.
- Return type:
- Parameters:
family (SpendingCategoryFamily)
effective_date (date | None)
authority (GovernedFactSource | None)
- home_office_categories(*, effective_date=None, authority=None)[source]¶
Return registry categories in the retained home-office buckets.
- Return type:
- Parameters:
effective_date (date | None)
authority (GovernedFactSource | None)