Skip to content
PACKAGES

Ctx

Kind: class

Source: src/graphrefly/_facade.py:1569

Ctx(native: _native.Ctx, *, owner_thread: int, lifetime: _GraphLifetime)

Python-owned facade for an advanced node callback invocation.

NameTypeDescription
dep_lenintReturn the number of declared dependencies for this invocation.
wave_datalist[list[list[object]]]Return raw dep-to-wave DATA projections for advanced callbacks.
pull`PullContextNone`
rewire_nextRewireNextReturn the callback-scoped deferred rewire facade.
has_stateboolReturn whether this node has private cross-wave state.
state`objectNone`
has_data(index: int) -> bool

Return whether dependency index has DATA for this invocation.

Source: src/graphrefly/_facade.py:1595

data(index: int, default: object = _NO_DEFAULT) -> object

Return dependency DATA or the provided default when absent.

Source: src/graphrefly/_facade.py:1615

terminal(index: int) -> bool | object

Return terminal metadata for dependency index in this invocation.

Source: src/graphrefly/_facade.py:1646

pull_params(default: object = None) -> object

Return active PULL params, or default outside a param-bearing pull.

Source: src/graphrefly/_facade.py:1681

emit(value: object) -> None

Emit one DATA value from this advanced node callback.

Source: src/graphrefly/_facade.py:1696

persist_state(on: bool = True) -> None

Opt this node’s private state into checkpoint persistence.

Source: src/graphrefly/_facade.py:1747

on_invalidate(callback: Callable[[], object]) -> None

Register a cleanup hook for the current callback’s INVALIDATE.

Source: src/graphrefly/_facade.py:1758

on_deactivation(callback: Callable[[], object]) -> None

Register a cleanup hook for this callback’s deactivation.

Source: src/graphrefly/_facade.py:1775

request_pull(pull_id: str, params: object | None = None, *, toward_dep: int | None = None) -> None

Request a PULL wave toward dependencies during this invocation.

Source: src/graphrefly/_facade.py:1792

request_pull_next(pull_id: str, params: object | None = None, *, toward_dep: int | None = None) -> None

Schedule one deferred PULL request after this invocation.

Source: src/graphrefly/_facade.py:1816