Expand description
Helpful macros and traits for creating a Python bindings to a Rust library.
§Usage
See the examples directory in the source for example usage of a majority of the crate.
Alternatively, check the examples on the macros in this documentation.
Re-exports§
pub use pyo3;
Macros§
- create_
exception - Create a new Python exception.
- create_
init_ submodule - Create a crate-private function
init_submoduleto set up this submodule and call the same function on child modules (which should also use this macro). - exception
- Create a Python exception and a conversion from its Rust type. Note that the exception class must still be added to the module.
- fix_
complex_ enums - Fix the
__qualname__on a list of complex enums so that they can be pickled. - impl_
repr - Implement
__repr__for a type that implementDebug.
Functions§
- fix_
enum_ qual_ names - Fix the
__qualname__on PyO3’s “complex enums” so that they can be pickled.