1 | //! PyO3's prelude. |
2 | //! |
3 | //! The purpose of this module is to alleviate imports of many commonly used items of the PyO3 crate |
4 | //! by adding a glob import to the top of pyo3 heavy modules: |
5 | //! |
6 | //! ``` |
7 | //! # #![allow (unused_imports)] |
8 | //! use pyo3::prelude::*; |
9 | //! ``` |
10 | |
11 | pub use crate::conversion::{FromPyObject, IntoPy, PyTryFrom, PyTryInto, ToPyObject}; |
12 | pub use crate::err::{PyErr, PyResult}; |
13 | pub use crate::instance::{Py, PyObject}; |
14 | pub use crate::marker::Python; |
15 | pub use crate::pycell::{PyCell, PyRef, PyRefMut}; |
16 | pub use crate::pyclass_init::PyClassInitializer; |
17 | pub use crate::types::{PyAny, PyModule}; |
18 | |
19 | #[cfg (feature = "macros" )] |
20 | pub use pyo3_macros::{pyclass, pyfunction, pymethods, pymodule, FromPyObject}; |
21 | |
22 | #[cfg (feature = "macros" )] |
23 | pub use crate::wrap_pyfunction; |
24 | |