MCPcopy Create free account
hub / github.com/NVIDIA-NeMo/Switchyard / to_python

Function to_python

crates/switchyard-py/src/component_bindings/stats.rs:222–226  ·  view source on GitHub ↗
(py: Python<'_>, value: &impl Serialize)

Source from the content-addressed store, hash-verified

220}
221
222fn to_python(py: Python<'_>, value: &impl Serialize) -> PyResult<Py<PyAny>> {
223 let value =
224 serde_json::to_value(value).map_err(|error| PyValueError::new_err(error.to_string()))?;
225 value_to_python(py, &value)
226}
227
228#[pyfunction]
229fn set_stats_route_label(ctx: &Bound<'_, PyAny>, label: &str) -> PyResult<()> {

Callers 2

snapshotMethod · 0.70
snapshot_syncMethod · 0.70

Calls 1

value_to_pythonFunction · 0.85

Tested by

no test coverage detected