Module pyo3::prelude

source ·
Expand description

PyO3’s prelude.

The purpose of this module is to alleviate imports of many commonly used items of the PyO3 crate by adding a glob import to the top of pyo3 heavy modules:

use pyo3::prelude::*;




  • A borrowed equivalent to Bound.
  • A GIL-attached equivalent to Py.
  • A GIL-independent reference to an object allocated on the Python heap.
  • Represents a Python exception.


Type Aliases§

  • A commonly-used alias for Py<PyAny>.
  • Represents the result of a Python call.

Attribute Macros§

  • A proc macro used to expose Rust functions to Python.
  • A proc macro used to expose methods to Python.
  • A proc macro used to implement Python modules.

Derive Macros§