Skip to content
heliaAOT
API Reference
HELIA HUB

registry

Generic thread-safe registry primitives used by the explicit RegistryContext.

Re-exports

Name Source
RegistryBundle helia_aot.registry.context.RegistryBundle
RegistryContext helia_aot.registry.context.RegistryContext
build_default_registry_context helia_aot.registry.context.build_default_registry_context

Machine-readable model

  • RegistryclassThread-safe registry with optional key encoding.
class

Registry

Python

Thread-safe registry with optional key encoding.

helia_aot/registry/__init__.py:31

Registry(*, key_encoder: Callable[[K], str] | None = None)

Thread-safe registry with optional key encoding.

method

register

Python

Register an item under the given key.

helia_aot/registry/__init__.py:43

register(key: K, item: T, *, overwrite: bool = False) -> None

Register an item under the given key.

Errors raised by register
TypeDescription
RegistryFrozenErrorIf the registry is frozen.
DuplicateRegistrationErrorIf the key is registered and ``overwrite`` is false.
method

Unregister an item if present.

helia_aot/registry/__init__.py:61

unregister(key: K) -> None

Unregister an item if present.

Errors raised by unregister
TypeDescription
RegistryFrozenErrorIf the registry is frozen.
method

decorator

Python

Decorator helper to register callables/classes.

helia_aot/registry/__init__.py:85

decorator(key: K, *, overwrite: bool = False) -> Callable[[T], T]

Decorator helper to register callables/classes.

method

freeze

Python

Prevent modifications for the rest of the registry's life; useful after bootstrapping built-ins.

helia_aot/registry/__init__.py:94

freeze() -> None

Prevent modifications for the rest of the registry’s life; useful after bootstrapping built-ins.

method

clear

Python

Remove all items from the registry.

helia_aot/registry/__init__.py:99

clear() -> None

Remove all items from the registry.

Errors raised by clear
TypeDescription
RegistryFrozenErrorIf the registry is frozen.