Menu
Introduction
Getting Started
Developer guide
Release
Architecture
CLI
Technical documentations
Version
Publication date

Mar 9, 2022

Confidentiality
Public
Reactions
1
Share

CredentialsRegistry

Global in-memory registry of :class:CredentialsDataBase subclasses.

Populated at import time by the @credentials_type decorator. It is indexed by the globally unique type_id (<brick_name>.<unique_name>) of each credentials data class. Any brick can register its own credentials data class, so the set of available credentials types is no longer hardcoded.

Functions
get_all @classmethod

Return all registered credentials data classes, keyed by type id.

Return type : dict[str, type[CredentialsDataBase]]
get_all_ids @classmethod

Return the ids of all registered credentials data classes.

Return type : list
get_and_check_data_type @classmethod

Return the credentials data class registered for the given id.

Raises if no data class is registered for the given id.

type_id : str
Return type : type[CredentialsDataBase]
get_data_type @classmethod

Return the credentials data class registered for the given id, or None.

Legacy type ids (old uppercase enum values) are resolved through :attr:_legacy_aliases so rows not yet normalized by the 0.23.0 migration still resolve.

type_id : str
Return type : type[CredentialsDataBase] | None
register @classmethod

Register a credentials data class. Called by the decorator.

Raises if a data class with the same type_id is already registered, which means two credentials data classes of the same brick share a name.

data_class : type[CredentialsDataBase]
Shine Logo
Technical bricks to reuse or customize

Have you developed a brick?

Share it to accelerate projects for the entire community.