Ctx
Kind: class
Source: src/graphrefly/_facade.py:1569
Signature
Section titled “Signature”Ctx(native: _native.Ctx, *, owner_thread: int, lifetime: _GraphLifetime)Description
Section titled “Description”Python-owned facade for an advanced node callback invocation.
Attributes
Section titled “Attributes”| Name | Type | Description |
|---|---|---|
dep_len | int | Return the number of declared dependencies for this invocation. |
wave_data | list[list[list[object]]] | Return raw dep-to-wave DATA projections for advanced callbacks. |
pull | `PullContext | None` |
rewire_next | RewireNext | Return the callback-scoped deferred rewire facade. |
has_state | bool | Return whether this node has private cross-wave state. |
state | `object | None` |
Methods
Section titled “Methods”has_data
Section titled “has_data”has_data(index: int) -> boolReturn whether dependency index has DATA for this invocation.
Source: src/graphrefly/_facade.py:1595
data(index: int, default: object = _NO_DEFAULT) -> objectReturn dependency DATA or the provided default when absent.
Source: src/graphrefly/_facade.py:1615
terminal
Section titled “terminal”terminal(index: int) -> bool | objectReturn terminal metadata for dependency index in this invocation.
Source: src/graphrefly/_facade.py:1646
pull_params
Section titled “pull_params”pull_params(default: object = None) -> objectReturn active PULL params, or default outside a param-bearing pull.
Source: src/graphrefly/_facade.py:1681
emit(value: object) -> NoneEmit one DATA value from this advanced node callback.
Source: src/graphrefly/_facade.py:1696
persist_state
Section titled “persist_state”persist_state(on: bool = True) -> NoneOpt this node’s private state into checkpoint persistence.
Source: src/graphrefly/_facade.py:1747
on_invalidate
Section titled “on_invalidate”on_invalidate(callback: Callable[[], object]) -> NoneRegister a cleanup hook for the current callback’s INVALIDATE.
Source: src/graphrefly/_facade.py:1758
on_deactivation
Section titled “on_deactivation”on_deactivation(callback: Callable[[], object]) -> NoneRegister a cleanup hook for this callback’s deactivation.
Source: src/graphrefly/_facade.py:1775
request_pull
Section titled “request_pull”request_pull(pull_id: str, params: object | None = None, *, toward_dep: int | None = None) -> NoneRequest a PULL wave toward dependencies during this invocation.
Source: src/graphrefly/_facade.py:1792
request_pull_next
Section titled “request_pull_next”request_pull_next(pull_id: str, params: object | None = None, *, toward_dep: int | None = None) -> NoneSchedule one deferred PULL request after this invocation.
Source: src/graphrefly/_facade.py:1816