aeat.core._config_support module¶
Support types and defaults for the central settings facade.
This module holds the closed settings enums and derived records consumed
by Settings: authentication provider selectors
(AuthProviderKindSetting,
CertificateBackend), secret storage selection
(SecretStoreBackend), LLM provider selection
(LLMProviderSetting), and database routing via
StorageRouteKind and
StorageRouteClassification.
The route records are produced by
classify_storage_route(); output language strings are
coerced to OutputLanguage; and AEAT URL
defaults are read from load_external_constants().
- class SecretStoreBackend(*values)[source]¶
Bases:
StrEnumSupported backends for the master-key secret store.
Settingsexposes this closed set throughaeat_secret_store_backendso storage custody and operator setup share one spelling for automatic, keyring, file-backed, and explicitly unsecured secret storage.- AUTO¶
- KEYRING¶
- FILE¶
- UNSECURED¶
- unwrap_optional_secret(value)[source]¶
Return the cleartext of an optional
pydantic.SecretStr.Optional Cl@ve and certificate settings use this helper at adapter boundaries so unset secrets materialise as
""rather than leakingpydantic.SecretStrwrappers into string handling.- Return type:
- Parameters:
value (SecretStr | None)
- class LLMProviderSetting(*values)[source]¶
Bases:
StrEnumClosed set of LLM provider names accepted by
Settings.- ANTHROPIC¶
- OPENAI¶
- GEMINI¶
- LOCAL¶
- class CertificateBackend(*values)[source]¶
Bases:
StrEnumClosed catalogue of supported AEAT certificate-handshake backends.
- PLAYWRIGHT_CONTEXT¶
- HTTPX_FALLBACK¶
- class AuthProviderKindSetting(*values)[source]¶
Bases:
StrEnumSettings-shape selector for the active AEAT authentication provider.
- CERTIFICATE¶
- CLAVE_MOVIL¶
- CLAVE_PERMANENTE¶
- class StorageRouteKind(*values)[source]¶
Bases:
StrEnumResolved primary database route classification.
Members distinguish operator-supplied database URLs from computed active bucket routes and cold root-fallback routes. The storage write policy consumes this value through
inspect_storage_write_policy().- EXPLICIT_DATABASE_URL¶
- ACTIVE_BUCKET_DATABASE¶
- ROOT_FALLBACK_DATABASE¶
- class StorageRouteClassification(**data)[source]¶
Bases:
BaseModelStrict classification of the effective primary database route.
Instances are returned by
classify_storage_route()and carry the effectiveStorageRouteKind, original database URL, SQLite path when derivable, and active bucket id for bucket-attached routes.- Parameters:
kind (StorageRouteKind)
database_url (str)
database_path (Path | None)
bucket_id (str)
- kind: StorageRouteKind¶
- database_url: str¶
- database_path: Path | None¶
- bucket_id: str¶
- default_clave_sede_access_url_template()[source]¶
Return the configured Cl@ve Movil selector access URL template.
- Return type:
- default_clave_permanente_sede_access_url_template()[source]¶
Return the configured Cl@ve Permanente selector access URL template.
- Return type:
- default_sede_expedientes_path()[source]¶
Return the configured AEAT Sede expedientes summary path.
- Return type:
- default_status_detail_url_template()[source]¶
Return the configured AEAT expediente status detail URL template.
- Return type:
- default_status_notificaciones_path()[source]¶
Return the configured AEAT notifications status path.
- Return type:
- default_aeat_sede_origin_with_slash()[source]¶
Return the configured AEAT Sede origin with a trailing slash.
- Return type:
- class JustificanteParserBackendSetting(*values)[source]¶
Bases:
StrEnumSettings-shape selector for the justificante PDF parsing backend.
- PDFPLUMBER¶
- coerce_output_language_setting(value)[source]¶
Coerce an env-var output-language string to an
OutputLanguage.Returns
Nonefor invalid input soSettingsvalidation can decide how to fall back or report the bad value.- Return type:
- Parameters:
value (str)