I'm trying to write python extensions in Rust with pyo3 (v1.13.0) after some initial work with cpython.
In cpython, I was able to define a custom class in Python, pass it to a Rust function as a PyObject and modify its attributes using the PyObject's setattr method.
In pyo3, the PyOjbect class doesn't seem to have a setattr method.
PyAny does have a setattr method, but that seems to be more appropriate for classes defined in Rust itself. When I use PyAny, I get an error that I haven't implemeneted traits, but I don't wan't to have to implement any traits for this class - it's defined in Python.
Any thoughts?
thanks,
Chris