MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / scope_register_subscriber

Function scope_register_subscriber

crates/python/src/py_api/mod.rs:1579–1587  ·  view source on GitHub ↗
(scope_uuid: &str, name: &str, callback: Py<PyAny>)

Source from the content-addressed store, hash-verified

1577/// Register a scope-local event subscriber.
1578#[pyfunction]
1579fn scope_register_subscriber(scope_uuid: &str, name: &str, callback: Py<PyAny>) -> PyResult<()> {
1580 let uuid = parse_uuid(scope_uuid)?;
1581 core_subscriber_api::scope_register_subscriber(
1582 &uuid,
1583 name,
1584 py_callable::wrap_py_event_subscriber(callback),
1585 )
1586 .map_err(to_py_err)
1587}
1588
1589/// Remove a previously registered scope-local event subscriber.
1590#[pyfunction]

Calls 2

parse_uuidFunction · 0.85
wrap_py_event_subscriberFunction · 0.85