yera.apps.registry

Process-local registry mapping app IDs to their metadata.

Used by the decorator to resolve the actual app name (including nested apps) when constructing AppRuntimeError on the consumer side.

Symbols

def get_app_metadata — Look up metadata for an application identifier.
def get_app_name — Return the display name for an application identifier.
def register_app — Register application metadata in the current process.

get_app_metadata

get_app_metadata(
    app_id: str,
) → AppMetadata | None

Look up metadata for an application identifier.

Parameters

app_id
type: str

Application identifier to look up.

Returns

type: AppMetadata | None

The registered metadata, or None when the identifier is unknown.

get_app_name

get_app_name(
    app_id: str,
) → str | None

Return the display name for an application identifier.

Parameters

app_id
type: str

Application identifier to look up.

Returns

type: str | None

The registered display name, or None when the identifier is unknown.

register_app

register_app(
    app_id: str,
    metadata: AppMetadata,
) → None

Register application metadata in the current process.

Parameters

app_id
type: str

Stable application identifier.

metadata
type: AppMetadata

Metadata to associate with the identifier.