Utilities¶
General-purpose utilities.
Exposes:
- find_signals - locate named signals in a VirtualContainer.
find_signals
¶
find_signals(
container: VirtualContainer,
signal_names: Iterable[str],
owner: str | None = None,
) -> dict[str, SignalInstance]
Find signals in a VirtualContainer by name, optionally scoped to an owner.
The registry is keyed by owner first (container.signals[owner][signal]),
since components may share signal names. owner limits the search to one
component; without it every owner is searched and the first match per name
wins. Names not found are left out.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
container
|
VirtualContainer
|
The virtual container holding registered signals. |
required |
signal_names
|
Iterable[str]
|
Signal names to look up (e.g. |
required |
owner
|
str | None
|
Registry key of the owning component: its |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, SignalInstance]
|
Signal instance by name, for each name found. |