2017-07-31 17:42:55 +00:00
|
|
|
// Copyright (c) 2017-present PyO3 Project and Contributors
|
|
|
|
|
2018-07-18 11:08:05 +00:00
|
|
|
//! A collection of items you most likely want to have in scope when working with pyo3
|
2017-07-31 17:42:55 +00:00
|
|
|
//!
|
|
|
|
//! The purpose of this module is to alleviate imports of many common pyo3 traits
|
|
|
|
//! by adding a glob import to the top of pyo3 heavy modules:
|
|
|
|
//!
|
|
|
|
//! ```
|
|
|
|
//! # #![allow(unused_imports)]
|
|
|
|
//! use pyo3::prelude::*;
|
|
|
|
//! ```
|
|
|
|
|
|
|
|
pub use class::*;
|
2018-07-30 21:01:46 +00:00
|
|
|
pub use conversion::{
|
|
|
|
FromPyObject, IntoPyObject, IntoPyTuple, PyTryFrom, PyTryInto, ToBorrowedObject, ToPyObject,
|
|
|
|
};
|
|
|
|
pub use err::{PyDowncastError, PyErr, PyErrArguments, PyErrValue, PyResult};
|
|
|
|
pub use instance::{AsPyRef, Py, PyNativeType, PyObjectWithToken, PyToken};
|
2017-08-03 22:01:52 +00:00
|
|
|
pub use noargs::NoArgs;
|
2018-07-30 21:01:46 +00:00
|
|
|
pub use object::PyObject;
|
|
|
|
pub use objectprotocol::ObjectProtocol;
|
|
|
|
pub use objects::*;
|
|
|
|
pub use python::{IntoPyPointer, Python, ToPyPointer};
|
2017-07-31 17:42:55 +00:00
|
|
|
pub use pythonrun::GILGuard;
|
2017-08-08 07:27:33 +00:00
|
|
|
pub use typeob::PyRawObject;
|
2018-07-18 11:08:05 +00:00
|
|
|
|
2018-07-30 21:01:46 +00:00
|
|
|
pub use pyo3cls::{pyclass, pyfunction, pymethods, pyproto};
|
2018-07-18 11:08:05 +00:00
|
|
|
|
|
|
|
#[cfg(Py_3)]
|
|
|
|
pub use pyo3cls::mod3init as pymodinit;
|
|
|
|
|
|
|
|
#[cfg(not(Py_3))]
|
|
|
|
pub use pyo3cls::mod2init as pymodinit;
|