aeat.domain.portals._metadata module¶
Define PortalMetadata for one Portal catalogue entry.
The model binds each URL to its PortalHost,
PortalCategory, accepted AuthMethod values, and
UrlStability tier before registry assembly.
- class PortalMetadata(**data)[source]¶
Bases:
BaseModelCurated metadata for a single AEAT portal.
One instance per
Portalmember in the registry. The model is strict, frozen, and rejects unknown keys. Structural cross-reference invariants that span the registry as a whole are enforced at registry-assembly time byaeat.domain.portals._registry._finalise_registry()rather than here, so individual entries can be constructed in isolation.- Variables:
portal – The
Portalthis entry describes.url – Canonical HTTPS URL.
subdomain – The
PortalHostthe URL is hosted on. Must matchurl.host.category –
PortalCategorythe portal belongs to.auth_methods – Non-empty frozenset of accepted
AuthMethodvalues.AuthMethod.ANONYMOUSis mutually exclusive with every other method.url_stability –
UrlStabilitytier for read-only portal monitoring priority.label – Translation key for the display label.
purpose – Translation key for the purpose description.
active –
Falsemarks retired portals preserved for historical lookup.replaced_by – When
active is False, optionally points to thePortalmember that supersedes this one. WhenNoneandactive is False,notesmust carry a non-empty discontinuation rationale.notes – Tuple of translation keys for notes.
- Parameters:
portal (Portal)
url (HttpUrl)
subdomain (PortalHost)
category (PortalCategory)
auth_methods (frozenset[AuthMethod])
url_stability (UrlStability)
label (Translatable)
purpose (Translatable)
active (bool)
replaced_by (Portal | None)
notes (tuple[Translatable, ...])
- portal: Portal¶
- url: HttpUrl¶
- subdomain: PortalHost¶
- category: PortalCategory¶
- auth_methods: frozenset[AuthMethod]¶
- url_stability: UrlStability¶
- label: tr¶
- purpose: tr¶
- active: bool¶
- replaced_by: Portal | None¶
- notes: tuple[tr, ...]¶