synthpic2.recipe.registries.registry

Registry for recipe components.

Module Contents

Classes

Registry

Registry for objects.

Attributes

Index

synthpic2.recipe.registries.registry.Index
class synthpic2.recipe.registries.registry.Registry(name: str | None = None)

Registry for objects.

clear() None
register(item: Any) None

Register a new item.

Args:

item (Any): item to be registered

validate(item: Any) None

Validate a new item.

Args:

item (Any): item to be validated

query(name: Index | None, strict: bool = False) Any

Return an item with a given name from the registry.

Args:

name (Index): name or integer index of the desired item, optional strict (bool): if True, then an error will be raised if the item is not

found in the registry

Returns:
Optional[_Prototype]: Item or None, if the item does not exist in the

registry.

delete_item(index: Index) None
__iter__() Iterator
__next__() Any
__getitem__(index: Index | None) Any
__len__() int
__contains__(name: str) bool