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

Function value_to_python

crates/switchyard-py/src/py_serde.rs:33–35  ·  view source on GitHub ↗

Converts a JSON value into a Python object.

(py: Python<'_>, value: &Value)

Source from the content-addressed store, hash-verified

31
32/// Converts a JSON value into a Python object.
33pub(crate) fn value_to_python(py: Python<'_>, value: &Value) -> PyResult<Py<PyAny>> {
34 to_python(py, value)
35}
36
37fn jsonable_python(value: &Bound<'_, PyAny>) -> PyResult<Py<PyAny>> {
38 if let Ok(model_dump) = value.getattr("model_dump")

Callers 12

translate_requestMethod · 0.85
translate_responseMethod · 0.85
translate_eventMethod · 0.85
finishMethod · 0.85
extra_bodyMethod · 0.85
extra_headersMethod · 0.85
to_pythonFunction · 0.85
to_pythonFunction · 0.85
request_to_pythonFunction · 0.85
response_to_pythonFunction · 0.85
from_core_streamMethod · 0.85

Calls 1

to_pythonFunction · 0.70

Tested by

no test coverage detected