Thanks to visit codestin.com
Credit goes to lib.rs

Cargo Features

[dependencies]
pyo3 = { version = "0.28.3", default-features = false, features = ["experimental-async", "experimental-inspect", "macros", "multiple-pymethods", "extension-module", "abi3", "abi3-py37", "abi3-py38", "abi3-py39", "abi3-py310", "abi3-py311", "abi3-py312", "abi3-py313", "abi3-py314", "generate-import-lib", "auto-initialize", "py-clone", "parking_lot", "arc_lock", "num-bigint", "bigdecimal", "chrono-local", "nightly", "full"] }
default = macros

The macros feature is set by default whenever pyo3 is added without default-features = false somewhere in the dependency tree.

experimental-async full? = macros

Enables support for async fn for #[pyfunction] and #[pymethods].

Enables experimental-async of pyo3-macros

support crate for macros feature

Affects impl_::coroutine, pyo3::coroutine

experimental-inspect full?

Enables pyo3::inspect module and additional type information on FromPyObject and IntoPy traits

Enables experimental-inspect of pyo3-macros

Affects conversion::IntoPyObject.type_output, conversion::FromPyObject.type_input, impl_::introspection

macros default experimental-async? full? = pyo3-macros

Enables macros: #[pyclass], #[pymodule], #[pyfunction] etc.

multiple-pymethods = inventory

Enables multiple #[pymethods] per #[pyclass]

Enables multiple-pymethods of pyo3-macros

Affects pyclass::PyClassInventory

extension-module

Deprecated: use the PYO3_BUILD_EXTENSION_MODULE environment variable when building a Python extension module (set automatically by setuptools-rust and maturin).

Enables extension-module of pyo3-ffi

ffi bindings to the python interpreter, split into a separate crate so they can be used independently

abi3 abi3-py314?

Use the Python limited API. See https://www.python.org/dev/peps/pep-0384/ for more.

Enables abi3 of pyo3-build-config and pyo3-ffi

abi3-py37 = abi3-py38

With abi3, we can manually set the minimum Python version.

Enables abi3-py37 of pyo3-build-config and pyo3-ffi

abi3-py38 abi3-py37? = abi3-py39

Enables abi3-py38 of pyo3-build-config and pyo3-ffi

abi3-py39 abi3-py38? = abi3-py310

Enables abi3-py39 of pyo3-build-config and pyo3-ffi

abi3-py310 abi3-py39? = abi3-py311

Enables abi3-py310 of pyo3-build-config and pyo3-ffi

abi3-py311 abi3-py310? = abi3-py312

Enables abi3-py311 of pyo3-build-config and pyo3-ffi

abi3-py312 abi3-py311? = abi3-py313

Enables abi3-py312 of pyo3-build-config and pyo3-ffi

abi3-py313 abi3-py312? = abi3-py314

Enables abi3-py313 of pyo3-build-config and pyo3-ffi

abi3-py314 abi3-py313? = abi3

Enables abi3-py314 of pyo3-build-config and pyo3-ffi

generate-import-lib

Automatically generates python3.dll import libraries for Windows targets.

Enables generate-import-lib of pyo3-ffi

auto-initialize

Changes Python::attach to automatically initialize the Python interpreter if needed.

py-clone full?

Enables Cloneing references to Python objects Py<T> which panics if the thread is not attached to the Python interpreter.

parking_lot full? = lock_api

Adds OnceExt and MutexExt implementations to the parking_lot types

Enables parking_lot

arc_lock full? = lock_api

Enables arc_lock of lock_api and optional parking_lot

num-bigint bigdecimal? full?

Enables num-bigint and num-traits

bigdecimal full? = num-bigint

Enables bigdecimal

chrono-local full?

Enables iana-time-zone, clock of chrono

Affects conversion::FromPyObject.as_local_tz

nightly

Optimizes PyObject to Vec conversion and so on.

full = anyhow, arc_lock, bigdecimal, bytes, chrono, chrono-local, chrono-tz, either, experimental-async, experimental-inspect, eyre, hashbrown, indexmap, jiff-02, lock_api, macros, num-bigint, num-complex, num-rational, ordered-float, parking_lot, py-clone, rust_decimal, serde, smallvec, time, uuid

Activates all additional features
This is mostly intended for testing purposes - activating *all* of these isn't particularly useful.

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

pyo3-macros experimental-async? experimental-inspect? macros multiple-pymethods?
inventory multiple-pymethods?

Enables inventory

support crate for multiple-pymethods feature

anyhow full?

Enables anyhow

crate integrations that can be added using the eponymous features

bytes full?
chrono chrono-local? full?
chrono-tz full?
either full?
eyre full?
hashbrown full?

Enables hashbrown >=0.15.0, <0.17

indexmap full?
jiff-02 full?

Enables jiff

num-complex full?
num-rational full?
ordered-float full?
rust_decimal full?
time full?
serde full?
smallvec full?
uuid full?
lock_api arc_lock? full? parking_lot?