Skip to main content

from_pydict

Function from_pydict 

pub fn from_pydict(
    py: Python<'_>,
    dict: Py<PyDict>,
) -> Result<Option<Params>, PyErr>
Expand description

Converts a Python dict to Params.

This is a convenience function that wraps pydict_to_params.

ยงErrors

Returns a PyErr if:

  • the dict cannot be serialized to JSON
  • the JSON is not a valid object