Skip to main content

Crate pyo3_ffi

Crate pyo3_ffi 

Source
Expand description

Raw FFI declarations for Python’s C API.

PyO3 can be used to write native Python modules or run Python code and modules from Rust.

This crate just provides low level bindings to the Python interpreter. It is meant for advanced users only - regular PyO3 users shouldn’t need to interact with this crate at all.

The contents of this crate are not documented here, as it would entail basically copying the documentation from CPython. Consult the Python/C API Reference Manual for up-to-date documentation.

§Safety

The functions in this crate lack individual safety documentation, but generally the following apply:

  • Pointer arguments have to point to a valid Python object of the correct type, although null pointers are sometimes valid input.
  • The vast majority can only be used safely while the thread is attached to the Python interpreter.
  • Some functions have additional safety requirements, consult the Python/C API Reference Manual for more information.

§Feature flags

PyO3 uses feature flags to enable you to opt-in to additional functionality. For a detailed description, see the Features chapter of the guide.

§Optional feature flags

The following features customize PyO3’s behavior:

  • abi3: Restricts PyO3’s API to a subset of the full Python API which is guaranteed by PEP 384 to be forward-compatible with future Python versions.

§rustc environment flags

PyO3 uses rustc’s --cfg flags to enable or disable code used for different Python versions. If you want to do this for your own crate, you can do so with the pyo3-build-config crate.

  • Py_3_8, Py_3_9, Py_3_10, Py_3_11, Py_3_12, Py_3_13, Py_3_14, Py_3_15: Marks code that is only enabled when compiling for a given minimum Python version.
  • Py_LIMITED_API: Marks code enabled when the abi3 feature flag is enabled.
  • Py_GIL_DISABLED: Marks code that runs only in the free-threaded build of CPython.
  • PyPy - Marks code enabled when compiling for PyPy.
  • GraalPy - Marks code enabled when compiling for GraalPy.

Additionally, you can query for the values Py_DEBUG, Py_REF_DEBUG, Py_TRACE_REFS, and COUNT_ALLOCS from py_sys_config to query for the corresponding C build-time defines. For example, to conditionally define debug code using Py_DEBUG, you could do:

#[cfg(py_sys_config = "Py_DEBUG")]
println!("only runs if python was compiled with Py_DEBUG")

To use these attributes, add pyo3-build-config as a build dependency in your Cargo.toml:

[build-dependencies]
pyo3-build-config ="0.29.0"

And then either create a new build.rs file in the project root or modify the existing build.rs file to call use_pyo3_cfgs():

fn main() {
    pyo3_build_config::use_pyo3_cfgs();
}

§Minimum supported Rust and Python versions

pyo3-ffi supports the following Python distributions:

  • CPython 3.8 or greater
  • PyPy 7.3 (Python 3.11+)
  • GraalPy 24.0 or greater (Python 3.10+)

§Example: Building Python Native modules

PyO3 can be used to generate a native Python module. The easiest way to try this out for the first time is to use maturin. maturin is a tool for building and publishing Rust-based Python packages with minimal configuration. The following steps set up some files for an example Python module, install maturin, and then show how to build and import the Python module.

First, create a new folder (let’s call it string_sum) containing the following two files:

Cargo.toml

[lib]
name = "string_sum"
# "cdylib" is necessary to produce a shared library for Python to import from.
#
# Downstream Rust code (including code in `bin/`, `examples/`, and `tests/`) will not be able
# to `use string_sum;` unless the "rlib" or "lib" crate type is also included, e.g.:
# crate-type = ["cdylib", "rlib"]
crate-type = ["cdylib"]

[dependencies]
pyo3-ffi = "0.29.0"

[build-dependencies]
# This is only necessary if you need to configure your build based on
# the Python version or the compile-time configuration for the interpreter.
pyo3_build_config = "0.29.0"

If you need to use conditional compilation based on Python version or how Python was compiled, you need to add pyo3-build-config as a build-dependency in your Cargo.toml as in the example above and either create a new build.rs file or modify an existing one so that pyo3_build_config::use_pyo3_cfgs() gets called at build time:

build.rs

fn main() {
    pyo3_build_config::use_pyo3_cfgs()
}

src/lib.rs

#[cfg(Py_3_15)]
use core::ffi::c_void;
#[cfg(not(Py_3_15))]
use core::ffi::c_int;
use core::ffi::{c_char, c_long};
use core::ptr;

use pyo3_ffi::*;

#[cfg(not(Py_3_15))]
static mut MODULE_DEF: PyModuleDef = PyModuleDef {
    m_base: PyModuleDef_HEAD_INIT,
    m_name: c"string_sum".as_ptr(),
    m_doc: c"A Python module written in Rust.".as_ptr(),
    m_size: 0,
    m_methods: (&raw mut METHODS).cast(),
    m_slots: (&raw mut SLOTS).cast(),
    m_traverse: None,
    m_clear: None,
    m_free: None,
};

static mut METHODS: [PyMethodDef; 2] = [
    PyMethodDef {
        ml_name: c"sum_as_string".as_ptr(),
        ml_meth: PyMethodDefPointer {
            PyCFunctionFast: sum_as_string,
        },
        ml_flags: METH_FASTCALL,
        ml_doc: c"returns the sum of two integers as a string".as_ptr(),
    },
    // A zeroed PyMethodDef to mark the end of the array.
    PyMethodDef::zeroed(),
];

const SLOTS_LEN: usize =
    1 + cfg!(Py_3_12) as usize + cfg!(Py_GIL_DISABLED) as usize + 4 * (cfg!(Py_3_15) as usize);

#[cfg(not(Py_3_15))]
static mut SLOTS: [PyModuleDef_Slot; SLOTS_LEN] = [
    #[cfg(Py_3_12)]
    PyModuleDef_Slot {
        slot: Py_mod_multiple_interpreters,
        value: Py_MOD_PER_INTERPRETER_GIL_SUPPORTED,
    },
    #[cfg(Py_GIL_DISABLED)]
    PyModuleDef_Slot {
        slot: Py_mod_gil,
        value: Py_MOD_GIL_NOT_USED,
    },
    PyModuleDef_Slot {
        slot: 0,
        value: ptr::null_mut(),
    },
];

#[cfg(Py_3_15)]
PyABIInfo_VAR!(ABI_INFO);

#[cfg(Py_3_15)]
static mut SLOTS: [PySlot; SLOTS_LEN] = [
    PySlot_STATIC_DATA(Py_mod_abi, core::ptr::addr_of_mut!(ABI_INFO).cast()),
    PySlot_STATIC_DATA(Py_mod_name, c"string_sum".as_ptr() as *mut c_void),
    PySlot_STATIC_DATA(Py_mod_doc, c"A Python module written in Rust.".as_ptr() as *mut c_void),
    PySlot_STATIC_DATA(Py_mod_methods, (&raw mut METHODS).cast()),
    PySlot_DATA(Py_mod_multiple_interpreters, Py_MOD_PER_INTERPRETER_GIL_SUPPORTED),
    #[cfg(Py_GIL_DISABLED)]
    PySlot_DATA(Py_mod_gil, Py_MOD_GIL_NOT_USED),
    PySlot_END(),
];

// The module initialization function
#[cfg(not(Py_3_15))]
#[allow(non_snake_case, reason = "must be named `PyInit_<your_module>`")]
#[no_mangle]
pub unsafe extern "C" fn PyInit_string_sum() -> *mut PyObject {
    PyModuleDef_Init(&raw mut MODULE_DEF)
}

#[cfg(Py_3_15)]
#[allow(non_snake_case, reason = "must be named `PyModExport_<your_module>`")]
#[no_mangle]
pub unsafe extern "C" fn PyModExport_string_sum() -> *mut PySlot {
    (&raw mut SLOTS).cast()
}

/// A helper to parse function arguments
/// If we used PyO3's proc macros they'd handle all of this boilerplate for us :)
unsafe fn parse_arg_as_i32(obj: *mut PyObject, n_arg: usize) -> Option<i32> {
    if PyLong_Check(obj) == 0 {
        let msg = format!(
            "sum_as_string expected an int for positional argument {}\0",
            n_arg
        );
        PyErr_SetString(PyExc_TypeError, msg.as_ptr().cast::<c_char>());
        return None;
    }

    // Let's keep the behaviour consistent on platforms where `c_long` is bigger than 32 bits.
    // In particular, it is an i32 on Windows but i64 on most Linux systems
    let mut overflow = 0;
    let i_long: c_long = PyLong_AsLongAndOverflow(obj, &mut overflow);

    #[allow(
        irrefutable_let_patterns,
        reason = "some platforms have c_long equal to i32"
    )]
    if overflow != 0 {
        raise_overflowerror(obj);
        None
    } else if let Ok(i) = i_long.try_into() {
        Some(i)
    } else {
        raise_overflowerror(obj);
        None
    }
}

unsafe fn raise_overflowerror(obj: *mut PyObject) {
    let obj_repr = PyObject_Str(obj);
    if !obj_repr.is_null() {
        let mut size = 0;
        let p = PyUnicode_AsUTF8AndSize(obj_repr, &mut size);
        if !p.is_null() {
            let s = core::str::from_utf8_unchecked(core::slice::from_raw_parts(
                p.cast::<u8>(),
                size as usize,
            ));
            let msg = format!("cannot fit {} in 32 bits\0", s);

            PyErr_SetString(PyExc_OverflowError, msg.as_ptr().cast::<c_char>());
        }
        Py_DECREF(obj_repr);
    }
}

pub unsafe extern "C" fn sum_as_string(
    _self: *mut PyObject,
    args: *mut *mut PyObject,
    nargs: Py_ssize_t,
) -> *mut PyObject {
    if nargs != 2 {
        PyErr_SetString(
            PyExc_TypeError,
            c"sum_as_string expected 2 positional arguments".as_ptr(),
        );
        return core::ptr::null_mut();
    }

    let (first, second) = (*args, *args.add(1));

    let first = match parse_arg_as_i32(first, 1) {
        Some(x) => x,
        None => return core::ptr::null_mut(),
    };
    let second = match parse_arg_as_i32(second, 2) {
        Some(x) => x,
        None => return core::ptr::null_mut(),
    };

    match first.checked_add(second) {
        Some(sum) => {
            let string = sum.to_string();
            PyUnicode_FromStringAndSize(string.as_ptr().cast::<c_char>(), string.len() as isize)
        }
        None => {
            PyErr_SetString(PyExc_OverflowError, c"arguments too large to add".as_ptr());
            core::ptr::null_mut()
        }
    }
}

With those two files in place, now maturin needs to be installed. This can be done using Python’s package manager pip. First, load up a new Python virtualenv, and install maturin into it:

$ cd string_sum
$ python -m venv .env
$ source .env/bin/activate
$ pip install maturin

Now build and execute the module:

$ maturin develop
# lots of progress output as maturin runs the compilation...
$ python
>>> import string_sum
>>> string_sum.sum_as_string(5, 20)
'25'

As well as with maturin, it is possible to build using setuptools-rust or manually. Both offer more flexibility than maturin but require further configuration.

This example stores the module definition statically and uses the PyModule_Create function in the CPython C API to register the module. This is the “old” style for registering modules and has the limitation that it cannot support subinterpreters. You can also create a module using the new multi-phase initialization API that does support subinterpreters. See the sequential project located in the examples directory at the root of the pyo3-ffi crate for a worked example of how to this using pyo3-ffi.

§Using Python from Rust

To embed Python into a Rust binary, you need to ensure that your Python installation contains a shared library. The following steps demonstrate how to ensure this (for Ubuntu).

To install the Python shared library on Ubuntu:

sudo apt install python3-dev

While most projects use the safe wrapper provided by pyo3, you can take a look at the orjson library as an example on how to use pyo3-ffi directly. For those well versed in C and Rust the tutorials from the CPython documentation can be easily converted to rust as well.

Re-exports§

pub use crate::_PyWeakReference as PyWeakReference;Non-GraalPy and non-Py_LIMITED_API and non-PyPy

Modules§

compat
C API Compatibility Shims
structmemberDeprecated

Macros§

c_str
This is a helper macro to create a &'static CStr.

Structs§

PyASCIIObjectNeither Py_LIMITED_API nor RustPython
PyAsyncMethodsNeither Py_LIMITED_API nor RustPython
PyBaseExceptionObjectNeither Py_LIMITED_API nor RustPython
PyBufferProcsNeither Py_LIMITED_API nor RustPython
PyByteArrayObjectNeither GraalPy nor Py_LIMITED_API nor PyPy and neither Py_LIMITED_API nor RustPython
PyBytesObjectNeither GraalPy nor Py_LIMITED_API nor PyPy and neither Py_LIMITED_API nor RustPython
PyCFunctionObjectPy_3_9 and non-GraalPy and non-Py_LIMITED_API
PyCMethodObjectPy_3_9 and neither Py_LIMITED_API nor RustPython and non-GraalPy and non-PyPy
PyCellObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyCodeObject
PyCompactUnicodeObjectNeither Py_LIMITED_API nor RustPython
PyCompilerFlagsNeither Py_LIMITED_API nor RustPython
PyComplexObjectNeither Py_LIMITED_API nor RustPython
PyConfigNeither Py_LIMITED_API nor RustPython and non-PyPy
PyDateTime_CAPINon-Py_LIMITED_API
PyDateTime_DateNon-Py_LIMITED_API
Structure representing a datetime.date
PyDateTime_DateTimeNon-Py_LIMITED_API
Structure representing a datetime.datetime.
PyDateTime_DeltaNon-Py_LIMITED_API
Structure representing a datetime.timedelta.
PyDateTime_TZInfoNon-Py_LIMITED_API
PyDateTime_TimeNon-Py_LIMITED_API
Structure representing a datetime.time.
PyDescrObjectNeither Py_LIMITED_API nor RustPython
PyDictKeysObjectNeither Py_LIMITED_API nor RustPython
PyDictObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyDictValuesNeither Py_LIMITED_API nor RustPython
PyFloatObjectNeither Py_LIMITED_API nor RustPython
PyFrameObject
PyFunctionObjectPy_3_10 and neither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyGenObjectNeither GraalPy nor Py_3_14 nor PyPy and neither Py_LIMITED_API nor RustPython
PyGetSetDef
Represents the PyGetSetDef structure.
PyGetSetDescrObjectNeither Py_LIMITED_API nor RustPython
PyHash_FuncDef(Py_3_13 or non-PyPy) and neither Py_LIMITED_API nor RustPython and non-PyPy
PyHeapTypeObjectNeither Py_LIMITED_API nor RustPython
PyImportErrorObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyInterpreterConfigPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyInterpreterState
PyListObjectNeither Py_LIMITED_API nor RustPython and non-PyPy
PyLongObject
PyMappingMethodsNeither Py_LIMITED_API nor RustPython
PyMemAllocatorExNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyMemberDef
Represents the PyMemberDef structure.
PyMemberDescrObjectNeither Py_LIMITED_API nor RustPython
PyMethodDef
Represents the PyMethodDef structure.
PyMethodDescrObjectNeither Py_LIMITED_API nor RustPython
PyModuleDefNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyModuleDef_BaseNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyModuleDef_Slot
PyNumberMethodsNeither Py_LIMITED_API nor RustPython
PyOSErrorObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyObjectNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyObjectArenaAllocatorNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyPreConfigNeither Py_LIMITED_API nor RustPython and non-PyPy
PySequenceMethodsNeither Py_LIMITED_API nor RustPython
PySetObjectNeither GraalPy nor Py_LIMITED_API nor PyPy
PySliceObjectNon-Py_LIMITED_API
PyStatusNeither Py_LIMITED_API nor RustPython and non-PyPy
PyStopIterationObjectNeither Py_LIMITED_API nor RustPython
PyStructSequence_Desc
PyStructSequence_Field
PySyntaxErrorObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PySystemExitObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyThreadState
PyTracebackObjectNeither Py_LIMITED_API nor RustPython
PyTupleObjectNeither Py_LIMITED_API nor RustPython
PyTypeObjectNeither Py_LIMITED_API nor RustPython
PyType_Slot
PyType_Spec
PyUnicodeErrorObjectNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyUnicodeObjectNeither Py_LIMITED_API nor RustPython
PyVarObjectNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyWideStringListNeither Py_LIMITED_API nor RustPython and non-PyPy
PyWrapperDescrObjectNeither Py_LIMITED_API nor RustPython
Py_bufferPy_3_11
Py_complexNeither Py_LIMITED_API nor RustPython
_PyDateTime_BaseDateTimeNeither GraalPy nor PyPy and non-Py_LIMITED_API
Structure representing a datetime.datetime without a tzinfo member.
_PyDateTime_BaseTimeNeither GraalPy nor PyPy and non-Py_LIMITED_API
Structure representing a datetime.time without a tzinfo member.
_PyInterpreterFrameNeither Py_LIMITED_API nor RustPython
_PyWeakReferenceNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
_frozen(Py_3_14 or non-PyPy) and neither Py_LIMITED_API nor RustPython and non-PyPy
_inittab(Py_3_14 or non-PyPy) and neither Py_LIMITED_API nor RustPython and non-PyPy
setentryNeither GraalPy nor Py_LIMITED_API nor PyPy
wrapperbaseNeither Py_LIMITED_API nor RustPython

Enums§

PyGILState_STATE
PyMemAllocatorDomainNeither Py_LIMITED_API nor RustPython
PySendResultPy_3_10
_PyStatus_TYPENeither Py_LIMITED_API nor RustPython and non-PyPy

Constants§

CO_ASYNC_GENERATORNeither Py_LIMITED_API nor RustPython
CO_COROUTINENeither Py_LIMITED_API nor RustPython
CO_FUTURE_ABSOLUTE_IMPORTNeither Py_LIMITED_API nor RustPython
CO_FUTURE_BARRY_AS_BDFLNeither Py_LIMITED_API nor RustPython
CO_FUTURE_DIVISIONNeither Py_LIMITED_API nor RustPython
CO_FUTURE_GENERATOR_STOPNeither Py_LIMITED_API nor RustPython
CO_FUTURE_PRINT_FUNCTIONNeither Py_LIMITED_API nor RustPython
CO_FUTURE_UNICODE_LITERALSNeither Py_LIMITED_API nor RustPython
CO_FUTURE_WITH_STATEMENTNeither Py_LIMITED_API nor RustPython
CO_GENERATORNeither Py_LIMITED_API nor RustPython
CO_ITERABLE_COROUTINENeither Py_LIMITED_API nor RustPython
CO_MAXBLOCKSNeither Py_LIMITED_API nor RustPython
CO_NESTEDNeither Py_LIMITED_API nor RustPython
CO_NEWLOCALSNeither Py_LIMITED_API nor RustPython
CO_NOFREENeither Py_LIMITED_API nor RustPython
CO_OPTIMIZEDNeither Py_LIMITED_API nor RustPython
CO_VARARGSNeither Py_LIMITED_API nor RustPython
CO_VARKEYWORDSNeither Py_LIMITED_API nor RustPython
FUTURE_ABSOLUTE_IMPORTNeither Py_LIMITED_API nor RustPython
FUTURE_ANNOTATIONSNeither Py_LIMITED_API nor RustPython
FUTURE_BARRY_AS_BDFLNeither Py_LIMITED_API nor RustPython
FUTURE_DIVISIONNeither Py_LIMITED_API nor RustPython
FUTURE_GENERATORSNeither Py_LIMITED_API nor RustPython
FUTURE_GENERATOR_STOPNeither Py_LIMITED_API nor RustPython
FUTURE_NESTED_SCOPESNeither Py_LIMITED_API nor RustPython
FUTURE_PRINT_FUNCTIONNeither Py_LIMITED_API nor RustPython
FUTURE_UNICODE_LITERALSNeither Py_LIMITED_API nor RustPython
FUTURE_WITH_STATEMENTNeither Py_LIMITED_API nor RustPython
INT_MAX
MAX_CO_EXTRA_USERS
METH_CLASS
METH_COEXIST
METH_FASTCALLPy_3_10 or non-Py_LIMITED_API
METH_KEYWORDS
METH_METHODPy_3_9 and non-Py_LIMITED_API
METH_NOARGS
METH_O
METH_STATIC
METH_VARARGS
PYOS_STACK_MARGIN
PYTHON_ABI_VERSION
PYTHON_API_VERSION
PY_BIG_ENDIANLittle-endian
PY_INVALID_STACK_EFFECTNeither Py_LIMITED_API nor RustPython
PY_LITTLE_ENDIANLittle-endian
PY_SSIZE_T_MAX
PY_SSIZE_T_MIN
PY_STDIOTEXTMODE
PY_VECTORCALL_ARGUMENTS_OFFSETPy_3_12 or non-Py_LIMITED_API
PyBUF_ANY_CONTIGUOUSPy_3_11
PyBUF_CONTIGPy_3_11
PyBUF_CONTIG_ROPy_3_11
PyBUF_C_CONTIGUOUSPy_3_11
PyBUF_FORMATPy_3_11
PyBUF_FULLPy_3_11
PyBUF_FULL_ROPy_3_11
PyBUF_F_CONTIGUOUSPy_3_11
PyBUF_INDIRECTPy_3_11
PyBUF_MAX_NDIMPy_3_11
Maximum number of dimensions
PyBUF_NDPy_3_11
PyBUF_READPy_3_11
PyBUF_RECORDSPy_3_11
PyBUF_RECORDS_ROPy_3_11
PyBUF_SIMPLEPy_3_11
PyBUF_STRIDEDPy_3_11
PyBUF_STRIDED_ROPy_3_11
PyBUF_STRIDESPy_3_11
PyBUF_WRITABLEPy_3_11
PyBUF_WRITEPy_3_11
PyBUF_WRITEABLEPy_3_11
PyDateTime_CAPSULE_NAMENon-Py_LIMITED_API
PyInterpreterConfig_DEFAULT_GILPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyInterpreterConfig_OWN_GILPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyInterpreterConfig_SHARED_GILPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyModuleDef_HEAD_INITNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyObject_HEAD_INITNot (Py_GIL_DISABLED and Py_LIMITED_API)
PySet_MINSIZE
PyTrace_CALLNeither Py_LIMITED_API nor RustPython
PyTrace_C_CALLNeither Py_LIMITED_API nor RustPython
PyTrace_C_EXCEPTIONNeither Py_LIMITED_API nor RustPython
PyTrace_C_RETURNNeither Py_LIMITED_API nor RustPython
PyTrace_EXCEPTIONNeither Py_LIMITED_API nor RustPython
PyTrace_LINENeither Py_LIMITED_API nor RustPython
PyTrace_OPCODENeither Py_LIMITED_API nor RustPython
PyTrace_RETURNNeither Py_LIMITED_API nor RustPython
PyUnicode_1BYTE_KINDNeither Py_LIMITED_API nor RustPython
PyUnicode_2BYTE_KINDNeither Py_LIMITED_API nor RustPython
PyUnicode_4BYTE_KINDNeither Py_LIMITED_API nor RustPython
PyWrapperFlag_KEYWORDSNeither Py_LIMITED_API nor RustPython
Py_AUDIT_READPy_3_10
Py_CLEANUP_SUPPORTED
Py_DTSF_ADD_DOT_0
Py_DTSF_ALT
Py_DTSF_SIGN
Py_DTST_FINITE
Py_DTST_INFINITE
Py_DTST_NAN
Py_EQ
Py_GE
Py_GT
Py_HASH_EXTERNAL
Py_HASH_FNV
Py_HASH_SIPHASH13Py_3_11
Py_HASH_SIPHASH24
Py_LE
Py_LT
Py_MARSHAL_VERSIONNeither Py_LIMITED_API nor RustPython and non-Py_3_15
Py_MOD_MULTIPLE_INTERPRETERS_NOT_SUPPORTEDPy_3_12
Py_MOD_MULTIPLE_INTERPRETERS_SUPPORTEDPy_3_12
Py_MOD_PER_INTERPRETER_GIL_SUPPORTEDPy_3_12
Py_NE
Py_PRINT_RAW
Py_READONLY
Py_RELATIVE_OFFSET
Py_TPFLAGS_BASETYPE
Set if the type allows subclassing
Py_TPFLAGS_BASE_EXC_SUBCLASS
Py_TPFLAGS_BYTES_SUBCLASS
Py_TPFLAGS_DEFAULT
Py_TPFLAGS_DICT_SUBCLASS
Py_TPFLAGS_DISALLOW_INSTANTIATIONPy_3_10
Py_TPFLAGS_HAVE_FINALIZE
Py_TPFLAGS_HAVE_GC
Objects support garbage collection (see objimp.h)
Py_TPFLAGS_HAVE_VECTORCALLPy_3_12 or non-Py_LIMITED_API
Set if the type implements the vectorcall protocol (PEP 590)
Py_TPFLAGS_HAVE_VERSION_TAG
Py_TPFLAGS_HEAPTYPE
Set if the type object is dynamically allocated
Py_TPFLAGS_IMMUTABLETYPEPy_3_10
Py_TPFLAGS_IS_ABSTRACT
Py_TPFLAGS_ITEMS_AT_ENDPy_3_12
Py_TPFLAGS_LIST_SUBCLASS
Py_TPFLAGS_LONG_SUBCLASS
Py_TPFLAGS_MANAGED_DICTPy_3_11 and non-Py_LIMITED_API
Py_TPFLAGS_MANAGED_WEAKREFPy_3_12 and non-Py_LIMITED_API
Py_TPFLAGS_MAPPINGPy_3_10 and non-Py_LIMITED_API
Py_TPFLAGS_METHOD_DESCRIPTOR
Py_TPFLAGS_READY
Set if the type is ‘ready’ – fully initialized
Py_TPFLAGS_READYING
Set while the type is being ‘readied’, to prevent recursive ready calls
Py_TPFLAGS_SEQUENCEPy_3_10 and non-Py_LIMITED_API
Py_TPFLAGS_TUPLE_SUBCLASS
Py_TPFLAGS_TYPE_SUBCLASS
Py_TPFLAGS_UNICODE_SUBCLASS
Py_TPFLAGS_VALID_VERSION_TAG
Py_T_BOOL
Py_T_BYTE
Py_T_CHAR
Py_T_DOUBLE
Py_T_FLOAT
Py_T_INT
Py_T_LONG
Py_T_LONGLONG
Py_T_OBJECT_EX
Py_T_PYSSIZET
Py_T_SHORT
Py_T_STRING
Py_T_STRING_INPLACE
Py_T_UBYTE
Py_T_UINT
Py_T_ULONG
Py_T_ULONGLONG
Py_T_USHORT
Py_UNICODE_REPLACEMENT_CHARACTER
Py_am_aiter
Py_am_anext
Py_am_await
Py_am_send
Py_bf_getbuffer
Py_bf_releasebuffer
Py_eval_input
Py_file_input
Py_fstring_inputPy_3_9
Py_func_type_input
Py_mod_create
Py_mod_exec
Py_mod_gil
Py_mod_multiple_interpreters
Py_mp_ass_subscript
Py_mp_length
Py_mp_subscript
Py_nb_absolute
Py_nb_add
Py_nb_and
Py_nb_bool
Py_nb_divmod
Py_nb_float
Py_nb_floor_divide
Py_nb_index
Py_nb_inplace_add
Py_nb_inplace_and
Py_nb_inplace_floor_divide
Py_nb_inplace_lshift
Py_nb_inplace_matrix_multiply
Py_nb_inplace_multiply
Py_nb_inplace_or
Py_nb_inplace_power
Py_nb_inplace_remainder
Py_nb_inplace_rshift
Py_nb_inplace_subtract
Py_nb_inplace_true_divide
Py_nb_inplace_xor
Py_nb_int
Py_nb_invert
Py_nb_lshift
Py_nb_matrix_multiply
Py_nb_multiply
Py_nb_negative
Py_nb_or
Py_nb_positive
Py_nb_power
Py_nb_remainder
Py_nb_rshift
Py_nb_subtract
Py_nb_true_divide
Py_nb_xor
Py_single_input
Py_sq_ass_item
Py_sq_concat
Py_sq_contains
Py_sq_inplace_concat
Py_sq_inplace_repeat
Py_sq_item
Py_sq_length
Py_sq_repeat
Py_tp_alloc
Py_tp_base
Py_tp_bases
Py_tp_call
Py_tp_clear
Py_tp_dealloc
Py_tp_del
Py_tp_descr_get
Py_tp_descr_set
Py_tp_doc
Py_tp_finalize
Py_tp_free
Py_tp_getattr
Py_tp_getattro
Py_tp_getset
Py_tp_hash
Py_tp_init
Py_tp_is_gc
Py_tp_iter
Py_tp_iternext
Py_tp_members
Py_tp_methods
Py_tp_new
Py_tp_repr
Py_tp_richcompare
Py_tp_setattr
Py_tp_setattro
Py_tp_str
Py_tp_token
Py_tp_traverse
Py_tp_vectorcall
SSTATE_INTERNED_IMMORTALNeither Py_LIMITED_API nor RustPython
SSTATE_INTERNED_IMMORTAL_STATICPy_3_12 and neither Py_LIMITED_API nor RustPython
SSTATE_INTERNED_MORTALNeither Py_LIMITED_API nor RustPython
SSTATE_NOT_INTERNEDNeither Py_LIMITED_API nor RustPython
_PyHASH_MULTIPLIER
_PyInterpreterConfig_INITPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
_PyInterpreterConfig_LEGACY_INITPy_3_12 and neither Py_LIMITED_API nor RustPython and non-PyPy
_Py_T_NONEDeprecated
_Py_T_OBJECTDeprecated
_Py_WRITE_RESTRICTEDDeprecated

Statics§

PyAsyncGen_Type
PyBaseObject_TypeNon-RustPython
built-in ‘object’
PyBool_Type
PyByteArrayIter_Type
PyByteArray_Type
PyBytesIter_Type
PyBytes_Type
PyCFunction_TypeNon-RustPython
PyCMethod_Type
PyCallIter_Type
PyCapsule_Type
PyCell_Type
PyClassMethodDescr_Type
PyCode_Type
PyComplex_Type
PyContextToken_Type
PyContextVar_Type
PyContext_Type
PyCoro_Type
PyDictItems_Type
PyDictIterItem_Type
PyDictIterKey_Type
PyDictIterValue_Type
PyDictKeys_Type
PyDictProxy_Type
PyDictRevIterItem_Type
PyDictRevIterKey_Type
PyDictRevIterValue_Type
PyDictValues_Type
PyDict_Type
PyEllipsis_Type
PyEnum_Type
PyExc_ArithmeticError
PyExc_AssertionError
PyExc_AttributeError
PyExc_BaseException
PyExc_BaseExceptionGroupPy_3_11
PyExc_BlockingIOError
PyExc_BrokenPipeError
PyExc_BufferError
PyExc_BytesWarning
PyExc_ChildProcessError
PyExc_ConnectionAbortedError
PyExc_ConnectionError
PyExc_ConnectionRefusedError
PyExc_ConnectionResetError
PyExc_DeprecationWarning
PyExc_EOFError
PyExc_EncodingWarningPy_3_10
PyExc_EnvironmentError
PyExc_Exception
PyExc_FileExistsError
PyExc_FileNotFoundError
PyExc_FloatingPointError
PyExc_FutureWarning
PyExc_GeneratorExit
PyExc_IOError
PyExc_ImportError
PyExc_ImportWarning
PyExc_IndentationError
PyExc_IndexError
PyExc_InterruptedError
PyExc_IsADirectoryError
PyExc_KeyError
PyExc_KeyboardInterrupt
PyExc_LookupError
PyExc_MemoryError
PyExc_ModuleNotFoundError
PyExc_NameError
PyExc_NotADirectoryError
PyExc_NotImplementedError
PyExc_OSError
PyExc_OverflowError
PyExc_PendingDeprecationWarning
PyExc_PermissionError
PyExc_ProcessLookupError
PyExc_RecursionError
PyExc_RecursionErrorInst
PyExc_ReferenceError
PyExc_ResourceWarning
PyExc_RuntimeError
PyExc_RuntimeWarning
PyExc_StopAsyncIteration
PyExc_StopIteration
PyExc_SyntaxError
PyExc_SyntaxWarning
PyExc_SystemError
PyExc_SystemExit
PyExc_TabError
PyExc_TimeoutError
PyExc_TypeError
PyExc_UnboundLocalError
PyExc_UnicodeDecodeError
PyExc_UnicodeEncodeError
PyExc_UnicodeError
PyExc_UnicodeTranslateError
PyExc_UnicodeWarning
PyExc_UserWarning
PyExc_ValueError
PyExc_Warning
PyExc_ZeroDivisionError
PyFilter_Type
PyFloat_TypeNon-RustPython
PyFrame_Type
PyFrozenSet_Type
PyFunction_Type
PyGen_Type
PyGetSetDescr_Type
PyImport_FrozenModulesNon-PyPy
PyImport_InittabNon-PyPy
PyListIter_Type
PyListRevIter_Type
PyList_Type
PyLongRangeIter_TypeNon-RustPython
PyLong_Type
PyMap_Type
PyMemberDescr_Type
PyMemoryView_TypeNon-RustPython
PyMethodDescr_Type
PyModuleDef_TypeNon-RustPython
PyModule_Type
PyProperty_Type
PyRangeIter_TypeNon-RustPython
PyRange_TypeNon-RustPython
PyReversed_Type
PySeqIter_Type
PySetIter_Type
PySet_Type
PySlice_Type
PyStructSequence_UnnamedFieldPy_3_11, or Py_3_9 and non-Py_LIMITED_API
PySuper_TypeNon-RustPython
built-in ‘super’
PyTraceBack_TypeNon-RustPython
PyTupleIter_Type
PyTuple_Type
PyType_TypeNon-RustPython
built-in ‘type’
PyUnicodeIter_TypeNon-RustPython
PyUnicode_TypeNon-RustPython
PyWrapperDescr_Type
PyZip_Type
Py_BytesWarningFlagDeprecated
Py_DebugFlagDeprecated
Py_DontWriteBytecodeFlagDeprecated
Py_FileSystemDefaultEncodeErrorsDeprecated
Py_FileSystemDefaultEncodingDeprecated
Py_FrozenFlagDeprecated
Py_GenericAliasTypePy_3_9 and non-RustPython
Py_HasFileSystemDefaultEncodingDeprecated
Py_HashRandomizationFlag
Py_IgnoreEnvironmentFlagDeprecated
Py_InspectFlagDeprecated
Py_InteractiveFlagDeprecated
Py_IsolatedFlagDeprecated
Py_NoSiteFlagDeprecated
Py_NoUserSiteDirectoryDeprecated
Py_OptimizeFlagDeprecated
Py_QuietFlagDeprecated
Py_UnbufferedStdioFlagDeprecated
Py_UseClassExceptionsFlagDeprecated
Py_VerboseFlagDeprecated
Py_VersionPy_3_11
_PyWeakref_RefTypeNon-RustPython

Functions§

PyAIter_CheckPy_3_10
PyAnySet_CheckNon-RustPython
PyAnySet_CheckExactNeither PyPy nor RustPython
PyArg_Parse
PyArg_ParseTuple
PyArg_ParseTupleAndKeywords
PyArg_UnpackTuple
PyArg_ValidateKeywordArguments
PyAsyncGen_CheckExactNeither Py_LIMITED_API nor RustPython
PyBool_CheckNon-RustPython
PyBool_FromLong
PyBuffer_FillContiguousStrides
PyBuffer_FillInfo
PyBuffer_FromContiguous
PyBuffer_GetPointer
PyBuffer_IsContiguous
PyBuffer_Release
PyBuffer_SizeFromFormat
PyBuffer_ToContiguous
PyByteArray_AS_STRINGNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyByteArray_AsString
PyByteArray_CheckNon-RustPython
PyByteArray_CheckExactNon-RustPython
PyByteArray_Concat
PyByteArray_FromObject
PyByteArray_FromStringAndSize
PyByteArray_GET_SIZENeither Py_LIMITED_API nor RustPython and non-Py_GIL_DISABLED
PyByteArray_Resize
PyByteArray_Size
PyBytes_AS_STRINGNeither Py_LIMITED_API nor RustPython and non-Py_LIMITED_API
PyBytes_AsString
PyBytes_AsStringAndSize
PyBytes_CheckNon-RustPython
PyBytes_CheckExactNon-RustPython
PyBytes_Concat
PyBytes_ConcatAndDel
PyBytes_DecodeEscape
PyBytes_FromFormat
PyBytes_FromObject
PyBytes_FromString
PyBytes_FromStringAndSize
PyBytes_Repr
PyBytes_Size
PyCFunction_CallDeprecatedNon-Py_3_13
PyCFunction_CheckPy_3_9 and non-RustPython
PyCFunction_CheckExactPy_3_9 and non-RustPython
PyCFunction_GET_CLASSPy_3_9 and neither Py_LIMITED_API nor RustPython and non-GraalPy and non-PyPy
PyCFunction_GET_FLAGSPy_3_9 and neither Py_LIMITED_API nor RustPython and non-GraalPy and non-PyPy
PyCFunction_GET_FUNCTIONPy_3_9 and neither Py_LIMITED_API nor RustPython and non-GraalPy and non-PyPy
PyCFunction_GET_SELFPy_3_9 and neither Py_LIMITED_API nor RustPython and non-GraalPy and non-PyPy
PyCFunction_GetFlags
PyCFunction_GetFunction
PyCFunction_GetSelf
PyCFunction_NewPy_3_9
PyCFunction_NewExPy_3_9
PyCMethod_CheckPy_3_9 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyCMethod_CheckExactPy_3_9 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyCMethod_New
PyCallIter_CheckNon-RustPython
PyCallIter_New
PyCallable_Check
PyCapsule_CheckExactNon-RustPython
PyCapsule_GetContext
PyCapsule_GetDestructor
PyCapsule_GetName
PyCapsule_GetPointer
PyCapsule_Import
PyCapsule_IsValid
PyCapsule_New
PyCapsule_SetContext
PyCapsule_SetDestructor
PyCapsule_SetName
PyCapsule_SetPointer
PyCell_CheckNeither Py_LIMITED_API nor RustPython
PyCell_Get
PyCell_New
PyCell_Set
PyCode_Addr2LineNon-GraalPy
PyCode_CheckNeither Py_LIMITED_API nor RustPython and non-PyPy
PyCode_NewNon-GraalPy
PyCode_NewEmptyNon-GraalPy
PyCode_NewWithPosOnlyArgsNon-GraalPy
PyCode_Optimize
PyCodec_BackslashReplaceErrors
PyCodec_Decode
PyCodec_Decoder
PyCodec_Encode
PyCodec_Encoder
PyCodec_IgnoreErrors
PyCodec_IncrementalDecoder
PyCodec_IncrementalEncoder
PyCodec_KnownEncoding
PyCodec_LookupError
PyCodec_Register
PyCodec_RegisterError
PyCodec_ReplaceErrors
PyCodec_StreamReader
PyCodec_StreamWriter
PyCodec_StrictErrors
PyCodec_UnregisterPy_3_10 and non-PyPy
PyCodec_XMLCharRefReplaceErrors
PyCompile_OpcodeStackEffect
PyCompile_OpcodeStackEffectWithJump
PyComplex_AsCComplex
PyComplex_CheckNon-RustPython
PyComplex_CheckExactNon-RustPython
PyComplex_FromCComplex
PyComplex_FromDoubles
PyComplex_ImagAsDouble
PyComplex_RealAsDouble
PyConfig_Clear
PyConfig_InitIsolatedConfig
PyConfig_InitPythonConfig
PyConfig_Read
PyConfig_SetArgv
PyConfig_SetBytesArgv
PyConfig_SetBytesString
PyConfig_SetString
PyConfig_SetWideStringList
PyContextToken_CheckExactNon-Py_LIMITED_API and non-RustPython
PyContextVar_CheckExactNon-Py_LIMITED_API and non-RustPython
PyContextVar_Get
PyContextVar_New
PyContextVar_Reset
PyContextVar_Set
PyContext_CheckExactNon-Py_LIMITED_API and non-RustPython
PyContext_Copy
PyContext_CopyCurrent
PyContext_Enter
PyContext_Exit
PyContext_New
PyCoro_CheckExactNeither Py_LIMITED_API nor RustPython
PyDateTimeAPINon-Py_LIMITED_API
Returns a pointer to a PyDateTime_CAPI instance
PyDateTime_CheckNon-Py_LIMITED_API
Check if op is a PyDateTimeAPI.DateTimeType or subtype.
PyDateTime_CheckExactNon-Py_LIMITED_API
Check if op’s type is exactly PyDateTimeAPI.DateTimeType.
PyDateTime_DATE_GET_FOLDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the fold component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 1]
PyDateTime_DATE_GET_HOURNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the hour component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 23]
PyDateTime_DATE_GET_MICROSECONDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the microsecond component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 999999]
PyDateTime_DATE_GET_MINUTENeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the minute component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 59]
PyDateTime_DATE_GET_SECONDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the second component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 59]
PyDateTime_DATE_GET_TZINFONeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the tzinfo component of a PyDateTime_DateTime. Returns a pointer to a PyObject that should be either NULL or an instance of a datetime.tzinfo subclass.
PyDateTime_DELTA_GET_DAYSNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the days component of a PyDateTime_Delta.
PyDateTime_DELTA_GET_MICROSECONDSNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the seconds component of a PyDateTime_Delta.
PyDateTime_DELTA_GET_SECONDSNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the seconds component of a PyDateTime_Delta.
PyDateTime_FromDateAndTimeNon-Py_LIMITED_API
See https://github.com/python/cpython/blob/3.10/Include/datetime.h#L226-L228
PyDateTime_FromDateAndTimeAndFoldNon-Py_LIMITED_API
See https://github.com/python/cpython/blob/3.10/Include/datetime.h#L230-L232
PyDateTime_FromTimestampNon-Py_LIMITED_API and non-PyPy
PyDateTime_GET_DAYNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the day component of a PyDateTime_Date or PyDateTime_DateTime. Returns a signed integer in the interval [1, 31].
PyDateTime_GET_MONTHNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the month component of a PyDateTime_Date or PyDateTime_DateTime. Returns a signed integer in the range [1, 12].
PyDateTime_GET_YEARNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the year component of a PyDateTime_Date or PyDateTime_DateTime. Returns a signed integer greater than 0.
PyDateTime_IMPORTNon-Py_LIMITED_API
Populates the PyDateTimeAPI object
PyDateTime_TIME_GET_FOLDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the fold component of a PyDateTime_Time. Returns a signed integer in the interval [0, 1]
PyDateTime_TIME_GET_HOURNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the hour component of a PyDateTime_Time. Returns a signed integer in the interval [0, 23]
PyDateTime_TIME_GET_MICROSECONDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the microsecond component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 999999]
PyDateTime_TIME_GET_MINUTENeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the minute component of a PyDateTime_Time. Returns a signed integer in the interval [0, 59]
PyDateTime_TIME_GET_SECONDNeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the second component of a PyDateTime_DateTime. Returns a signed integer in the interval [0, 59]
PyDateTime_TIME_GET_TZINFONeither GraalPy nor PyPy and non-Py_LIMITED_API
Retrieve the tzinfo component of a PyDateTime_Time. Returns a pointer to a PyObject that should be either NULL or an instance of a datetime.tzinfo subclass.
PyDateTime_TimeZone_UTCNon-Py_LIMITED_API
PyDate_CheckNon-Py_LIMITED_API
Type Check macros
PyDate_CheckExactNon-Py_LIMITED_API
Check if op’s type is exactly PyDateTimeAPI.DateType.
PyDate_FromDateNon-Py_LIMITED_API
PyDate_FromTimestampNon-Py_LIMITED_API and non-PyPy
PyDelta_CheckNon-Py_LIMITED_API
Check if op is a PyDateTimeAPI.DetaType or subtype.
PyDelta_CheckExactNon-Py_LIMITED_API
Check if op’s type is exactly PyDateTimeAPI.DeltaType.
PyDelta_FromDSUNon-Py_LIMITED_API
PyDescr_NewClassMethod
PyDescr_NewGetSet
PyDescr_NewMember
PyDescr_NewMethod
PyDictItems_CheckNon-RustPython
PyDictKeys_CheckNon-RustPython
PyDictProxy_New
PyDictValues_CheckNon-RustPython
PyDictViewSet_Check
PyDict_CheckNon-RustPython
PyDict_CheckExactNon-RustPython
PyDict_Clear
PyDict_ClearWatcherPy_3_12
PyDict_Contains
PyDict_Copy
PyDict_DelItem
PyDict_DelItemString
PyDict_GetItem
PyDict_GetItemString
PyDict_GetItemWithError
PyDict_Items
PyDict_Keys
PyDict_Merge
PyDict_MergeFromSeq2
PyDict_New
PyDict_Next
PyDict_SetDefaultNon-GraalPy
PyDict_SetItem
PyDict_SetItemString
PyDict_Size
PyDict_UnwatchPy_3_12 and non-GraalPy
PyDict_Update
PyDict_Values
PyDict_WatchPy_3_12 and non-GraalPy
PyErr_BadArgument
PyErr_BadInternalCallNon-PyPy
PyErr_CheckSignals
PyErr_Clear
PyErr_Display
PyErr_DisplayExceptionPy_3_12
PyErr_ExceptionMatches
PyErr_FetchDeprecated
PyErr_Format
PyErr_GetExcInfo
PyErr_GetHandledExceptionPy_3_11
PyErr_GetRaisedExceptionPy_3_12
PyErr_GivenExceptionMatches
PyErr_NewException
PyErr_NewExceptionWithDoc
PyErr_NoMemory
PyErr_NormalizeExceptionDeprecated
PyErr_Occurred
PyErr_Print
PyErr_PrintEx
PyErr_ProgramText
PyErr_ResourceWarning
PyErr_RestoreDeprecated
PyErr_SetExcInfo
PyErr_SetFromErrno
PyErr_SetFromErrnoWithFilename
PyErr_SetFromErrnoWithFilenameObject
PyErr_SetFromErrnoWithFilenameObjects
PyErr_SetHandledExceptionPy_3_11
PyErr_SetImportError
PyErr_SetImportErrorSubclass
PyErr_SetInterrupt
PyErr_SetInterruptExPy_3_10
PyErr_SetNone
PyErr_SetObject
PyErr_SetRaisedExceptionPy_3_12
PyErr_SetString
PyErr_SyntaxLocation
PyErr_SyntaxLocationEx
PyErr_WarnEx
PyErr_WarnExplicit
PyErr_WarnExplicitObject
PyErr_WarnFormat
PyErr_WriteUnraisable
PyEval_AcquireLockDeprecatedNon-Py_3_13
PyEval_AcquireThread
PyEval_CallFunctionDeprecatedNon-Py_3_13
PyEval_CallMethodDeprecatedNon-Py_3_13
PyEval_CallObjectDeprecatedNon-Py_3_13
PyEval_CallObjectWithKeywordsDeprecatedNon-Py_3_13
PyEval_EvalCode
PyEval_EvalCodeEx
PyEval_EvalFrame
PyEval_EvalFrameEx
PyEval_GetBuiltins
PyEval_GetFrame
PyEval_GetFuncDesc
PyEval_GetFuncName
PyEval_GetGlobals
PyEval_GetLocals
PyEval_InitThreadsDeprecated
PyEval_ReleaseLockDeprecatedNon-Py_3_13
PyEval_ReleaseThread
PyEval_RestoreThreadNeither Py_3_14 nor WebAssembly
PyEval_SaveThread
PyEval_SetProfile
PyEval_SetProfileAllThreadsPy_3_12
PyEval_SetTrace
PyEval_SetTraceAllThreadsPy_3_12
PyEval_ThreadsInitializedDeprecatedNon-Py_3_13
PyExceptionClass_CheckNon-RustPython
PyExceptionInstance_CheckNon-RustPython
PyExceptionInstance_ClassNon-PyPy
PyException_GetCause
PyException_GetContext
PyException_GetTraceback
PyException_SetCause
PyException_SetContext
PyException_SetTraceback
PyFile_FromFd
PyFile_GetLine
PyFile_WriteObject
PyFile_WriteString
PyFloat_AS_DOUBLENeither Py_LIMITED_API nor RustPython
PyFloat_AsDouble
PyFloat_CheckNon-RustPython
PyFloat_CheckExactNon-RustPython
PyFloat_FromDouble
PyFloat_FromString
PyFloat_GetInfo
PyFloat_GetMax
PyFloat_GetMin
PyFrame_BlockSetup
PyFrame_CheckNeither Py_LIMITED_API nor RustPython
PyFrame_FastToLocals
PyFrame_FastToLocalsWithError
PyFrame_GetBackPy_3_9 and non-PyPy
PyFrame_GetBuiltinsPy_3_11
PyFrame_GetCode(Py_3_10, or Py_3_9 and non-Py_LIMITED_API) and non-GraalPy
PyFrame_GetGeneratorPy_3_11
PyFrame_GetGlobalsPy_3_11
PyFrame_GetLastiPy_3_11
PyFrame_GetLineNumber
PyFrame_GetLocalsPy_3_11
PyFrame_GetVarPy_3_12
PyFrame_GetVarStringPy_3_12
PyFrame_LocalsToFast
PyFrame_NewNon-GraalPy
PyFrozenSet_CheckNeither PyPy nor RustPython
PyFrozenSet_CheckExactNeither GraalPy nor PyPy nor RustPython
PyFrozenSet_New
PyFunction_CheckNeither Py_LIMITED_API nor RustPython
PyFunction_GetAnnotations
PyFunction_GetClosure
PyFunction_GetCode
PyFunction_GetDefaults
PyFunction_GetGlobals
PyFunction_GetKwDefaults
PyFunction_GetModule
PyFunction_New
PyFunction_NewWithQualName
PyFunction_SetAnnotations
PyFunction_SetClosure
PyFunction_SetDefaults
PyFunction_SetKwDefaults
PyGC_Collect
PyGC_DisablePy_3_10
PyGC_EnablePy_3_10
PyGC_IsEnabledPy_3_10
PyGILState_Check
PyGILState_EnsureNeither Py_3_14 nor WebAssembly
PyGILState_GetThisThreadStateNon-PyPy
PyGILState_Release
PyGen_CheckNeither Py_LIMITED_API nor RustPython
PyGen_CheckExactNeither Py_LIMITED_API nor RustPython
PyGen_New
PyHash_GetFuncDefNon-PyPy
PyImport_AddModule
PyImport_AddModuleObject
PyImport_AppendInittab
PyImport_ExecCodeModule
PyImport_ExecCodeModuleEx
PyImport_ExecCodeModuleObject
PyImport_ExecCodeModuleWithPathnames
PyImport_ExtendInittabNon-PyPy
PyImport_GetImporter
PyImport_GetMagicNumber
PyImport_GetMagicTag
PyImport_GetModule
PyImport_GetModuleDict
PyImport_Import
PyImport_ImportFrozenModule
PyImport_ImportFrozenModuleObject
PyImport_ImportModule
PyImport_ImportModuleEx
PyImport_ImportModuleLevel
PyImport_ImportModuleLevelObject
PyImport_ImportModuleNoBlockDeprecatedNon-Py_3_15
PyImport_ReloadModule
PyIndex_Check
PyInterpreterState_ClearNon-PyPy
PyInterpreterState_DeleteNon-PyPy
PyInterpreterState_GetPy_3_9 and non-PyPy
PyInterpreterState_GetDictNon-PyPy
PyInterpreterState_GetIDNon-PyPy
PyInterpreterState_Head
PyInterpreterState_MainNon-PyPy
PyInterpreterState_NewNon-PyPy
PyInterpreterState_Next
PyInterpreterState_ThreadHeadNon-PyPy
PyIter_Check
PyIter_Next
PyIter_SendPy_3_10 and non-PyPy
PyList_Append
PyList_AsTuple
PyList_CheckNon-RustPython
PyList_CheckExactNon-RustPython
PyList_GET_ITEMNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
Macro, trading safety for speed
PyList_GET_SIZENeither Py_LIMITED_API nor RustPython and non-PyPy
PyList_GetItem
PyList_GetSlice
PyList_Insert
PyList_New
PyList_Reverse
PyList_SET_ITEMNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
Macro, only to be used to fill in brand new lists
PyList_SetItem
PyList_SetSlice
PyList_Size
PyList_Sort
PyLong_AsDouble
PyLong_AsLong
PyLong_AsLongAndOverflow
PyLong_AsLongLong
PyLong_AsLongLongAndOverflow
PyLong_AsSize_t
PyLong_AsSsize_t
PyLong_AsUnsignedLong
PyLong_AsUnsignedLongLong
PyLong_AsUnsignedLongLongMask
PyLong_AsUnsignedLongMask
PyLong_AsVoidPtr
PyLong_CheckNon-RustPython
PyLong_CheckExactNon-RustPython
PyLong_FromDouble
PyLong_FromLong
PyLong_FromLongLong
PyLong_FromSize_t
PyLong_FromSsize_t
PyLong_FromString
PyLong_FromUnsignedLong
PyLong_FromUnsignedLongLong
PyLong_FromVoidPtr
PyLong_GetInfo
PyMapping_Check
PyMapping_DelItem
PyMapping_DelItemString
PyMapping_GetItemString
PyMapping_HasKey
PyMapping_HasKeyString
PyMapping_Items
PyMapping_Keys
PyMapping_Length
PyMapping_SetItemString
PyMapping_Size
PyMapping_Values
PyMarshal_ReadLastObjectFromFile
PyMarshal_ReadLongFromFile
PyMarshal_ReadObjectFromFile
PyMarshal_ReadObjectFromString
PyMarshal_ReadShortFromFile
PyMarshal_WriteLongToFile
PyMarshal_WriteObjectToFile
PyMarshal_WriteObjectToString
PyMem_Calloc
PyMem_Free
PyMem_GetAllocatorNeither GraalPy nor PyPy
PyMem_Malloc
PyMem_RawCalloc
PyMem_RawFree
PyMem_RawMalloc
PyMem_RawRealloc
PyMem_Realloc
PyMem_SetAllocatorNeither GraalPy nor PyPy
PyMem_SetupDebugHooksNeither GraalPy nor PyPy
PyMember_GetOne
PyMember_SetOne
PyMemoryView_CheckNon-RustPython
PyMemoryView_FromBufferPy_3_11 or non-Py_LIMITED_API
PyMemoryView_FromMemory
PyMemoryView_FromObject
PyMemoryView_GetContiguous
PyModuleDef_Init
PyModule_AddFunctions
PyModule_AddIntConstant
PyModule_AddObject
PyModule_AddObjectRefPy_3_10
PyModule_AddStringConstant
PyModule_AddTypePy_3_10, or Py_3_9 and non-Py_LIMITED_API
PyModule_CheckNon-RustPython
PyModule_CheckExactNon-RustPython
PyModule_Create
PyModule_Create2
PyModule_ExecDef
PyModule_FromDefAndSpec
PyModule_FromDefAndSpec2
PyModule_GetDef
PyModule_GetDict
PyModule_GetFilenameDeprecatedNot (PyPy and Windows)
PyModule_GetFilenameObjectNon-PyPy
PyModule_GetName
PyModule_GetNameObjectNon-PyPy
PyModule_GetState
PyModule_New
PyModule_NewObject
PyModule_SetDocString
PyNumber_Absolute
PyNumber_Add
PyNumber_And
PyNumber_AsSsize_t
PyNumber_Check
PyNumber_Divmod
PyNumber_Float
PyNumber_FloorDivide
PyNumber_InPlaceAdd
PyNumber_InPlaceAnd
PyNumber_InPlaceFloorDivide
PyNumber_InPlaceLshift
PyNumber_InPlaceMatrixMultiply
PyNumber_InPlaceMultiply
PyNumber_InPlaceOr
PyNumber_InPlacePower
PyNumber_InPlaceRemainder
PyNumber_InPlaceRshift
PyNumber_InPlaceSubtract
PyNumber_InPlaceTrueDivide
PyNumber_InPlaceXor
PyNumber_Index
PyNumber_Invert
PyNumber_Long
PyNumber_Lshift
PyNumber_MatrixMultiply
PyNumber_Multiply
PyNumber_Negative
PyNumber_Or
PyNumber_Positive
PyNumber_Power
PyNumber_Remainder
PyNumber_Rshift
PyNumber_Subtract
PyNumber_ToBase
PyNumber_TrueDivide
PyNumber_Xor
PyOS_AfterForkDeprecated
PyOS_AfterFork_Child
PyOS_AfterFork_Parent
PyOS_BeforeFork
PyOS_FSPath
PyOS_InterruptOccurred
PyOS_double_to_string
PyOS_getsig
PyOS_setsig
PyOS_string_to_double
PyOS_strtol
PyOS_strtoul
PyObject_ASCII
PyObject_AsFileDescriptor
PyObject_Bytes
PyObject_Call
PyObject_CallFinalizer
PyObject_CallFinalizerFromDealloc
PyObject_CallFunction
PyObject_CallFunctionObjArgs
PyObject_CallMethod
PyObject_CallMethodNoArgsPy_3_9 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyObject_CallMethodObjArgs
PyObject_CallMethodOneArgPy_3_9 and neither Py_LIMITED_API nor RustPython and non-PyPy
PyObject_CallNoArgs(Py_3_10, or Py_3_9 and non-Py_LIMITED_API) and non-PyPy
PyObject_CallObject
PyObject_CallOneArgPy_3_12 or PyPy
PyObject_Calloc
PyObject_CheckBufferNon-PyPy
PyObject_ClearWeakRefs
PyObject_CopyData
PyObject_DelAttrNon-Py_3_13 and not (PyPy and non-Py_3_11)
PyObject_DelAttrStringNon-Py_3_13 and not (PyPy and non-Py_3_11)
PyObject_DelItem
PyObject_DelItemString
PyObject_Dir
PyObject_Format
PyObject_Free
PyObject_GC_Del
PyObject_GC_IsFinalizedPy_3_10, or Py_3_9 and non-PyPy
PyObject_GC_IsTrackedPy_3_10, or Py_3_9 and non-PyPy
PyObject_GC_New
PyObject_GC_NewVar
PyObject_GC_Resize
PyObject_GC_TrackNon-PyPy
PyObject_GC_UnTrackNon-PyPy
PyObject_GET_WEAKREFS_LISTPTRNeither Py_LIMITED_API nor RustPython
PyObject_GenericGetAttr
PyObject_GenericGetDictNot (Py_LIMITED_API and non-Py_3_10)
PyObject_GenericSetAttr
PyObject_GenericSetDict
PyObject_GetAIterPy_3_10
PyObject_GetArenaAllocatorNeither GraalPy nor PyPy
PyObject_GetAttr
PyObject_GetAttrString
PyObject_GetBuffer
PyObject_GetItem
PyObject_GetIter
PyObject_GetTypeDataPy_3_12
PyObject_HasAttr
PyObject_HasAttrString
PyObject_Hash
PyObject_HashNotImplemented
PyObject_IS_GCPy_3_9
PyObject_Init
PyObject_InitVar
PyObject_IsInstance
PyObject_IsSubclass
PyObject_IsTrue
PyObject_Length
PyObject_LengthHint
PyObject_Malloc
PyObject_New
PyObject_NewVar
PyObject_Not
PyObject_Print
PyObject_Realloc
PyObject_Repr
PyObject_RichCompare
PyObject_RichCompareBool
PyObject_SelfIter
PyObject_SetArenaAllocatorNeither GraalPy nor PyPy
PyObject_SetAttr
PyObject_SetAttrString
PyObject_SetItem
PyObject_Size
PyObject_Str
PyObject_Type
PyObject_TypeCheck
PyObject_VectorcallPy_3_12, or Py_3_11 and non-Py_LIMITED_API
PyObject_VectorcallDict
PyObject_VectorcallMethodPy_3_12, or Py_3_9 and neither Py_LIMITED_API nor PyPy
PyPreConfig_InitIsolatedConfig
PyPreConfig_InitPythonConfig
PyRange_CheckNon-RustPython
PyRun_AnyFileNeither GraalPy nor PyPy
PyRun_AnyFileExNeither GraalPy nor PyPy
PyRun_AnyFileExFlags
PyRun_AnyFileFlagsNeither GraalPy nor PyPy
PyRun_File
PyRun_FileExNeither GraalPy nor PyPy
PyRun_FileExFlagsNeither GraalPy nor PyPy
PyRun_FileFlagsNeither GraalPy nor PyPy
PyRun_InteractiveLoopNeither GraalPy nor PyPy
PyRun_InteractiveLoopFlags
PyRun_InteractiveOneNeither GraalPy nor PyPy
PyRun_InteractiveOneFlags
PyRun_InteractiveOneObject
PyRun_SimpleFileNeither GraalPy nor PyPy
PyRun_SimpleFileExNeither GraalPy nor PyPy
PyRun_SimpleFileExFlags
PyRun_SimpleString
PyRun_SimpleStringFlags
PyRun_String
PyRun_StringFlags
PySeqIter_CheckNon-RustPython
PySeqIter_New
PySequence_Check
PySequence_Concat
PySequence_Contains
PySequence_Count
PySequence_DelItem
PySequence_DelSlice
PySequence_Fast
PySequence_Fast_GET_ITEMNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PySequence_Fast_GET_SIZENeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PySequence_Fast_ITEMSNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PySequence_GetItem
PySequence_GetSlice
PySequence_ITEMNeither Py_LIMITED_API nor RustPython
PySequence_In
PySequence_InPlaceConcat
PySequence_InPlaceRepeat
PySequence_Index
PySequence_Length
PySequence_List
PySequence_Repeat
PySequence_SetItem
PySequence_SetSlice
PySequence_Size
PySequence_Tuple
PySet_Add
PySet_CheckNeither PyPy nor RustPython
PySet_CheckExactPy_3_10 and non-RustPython
PySet_Clear
PySet_Contains
PySet_Discard
PySet_GET_SIZENeither GraalPy nor PyPy and non-Py_LIMITED_API
PySet_New
PySet_Pop
PySet_Size
PySlice_AdjustIndices
PySlice_CheckNon-RustPython
PySlice_GetIndices
PySlice_GetIndicesEx
PySlice_New
PySlice_Unpack
PyState_AddModule
PyState_FindModule
PyState_RemoveModule
PyStatus_Error
PyStatus_Exception
PyStatus_Exit
PyStatus_IsError
PyStatus_IsExit
PyStatus_NoMemory
PyStatus_Ok
PyStructSequence_GET_ITEMNeither GraalPy nor Py_LIMITED_API nor PyPy
PyStructSequence_GetItemNon-PyPy
PyStructSequence_InitTypeNon-Py_LIMITED_API
PyStructSequence_InitType2Non-Py_LIMITED_API
PyStructSequence_New
PyStructSequence_NewTypeNon-PyPy
PyStructSequence_SET_ITEMNeither GraalPy nor Py_LIMITED_API nor PyPy
PyStructSequence_SetItemNon-PyPy
PySys_AddWarnOptionDeprecated
PySys_AddWarnOptionUnicodeDeprecated
PySys_AddXOption
PySys_FormatStderr
PySys_FormatStdout
PySys_GetObject
PySys_GetXOptions
PySys_HasWarnOptionsDeprecated
PySys_ResetWarnOptionsNon-Py_3_15
PySys_SetArgvDeprecated
PySys_SetArgvExDeprecated
PySys_SetObject
PySys_SetPath
PySys_WriteStderr
PySys_WriteStdout
PyTZInfo_CheckNon-Py_LIMITED_API
Check if op is a PyDateTimeAPI.TZInfoType or subtype.
PyTZInfo_CheckExactNon-Py_LIMITED_API
Check if op’s type is exactly PyDateTimeAPI.TZInfoType.
PyThreadState_Clear
PyThreadState_Delete
PyThreadState_DeleteCurrent
PyThreadState_EnterTracingPy_3_11
PyThreadState_GET
PyThreadState_Get
PyThreadState_GetDict
PyThreadState_GetFrame(Py_3_10, or Py_3_9 and non-Py_LIMITED_API) and non-PyPy
PyThreadState_GetID(Py_3_10, or Py_3_9 and non-Py_LIMITED_API) and non-PyPy
PyThreadState_GetInterpreter(Py_3_10, or Py_3_9 and non-Py_LIMITED_API) and non-PyPy
PyThreadState_LeaveTracingPy_3_11
PyThreadState_New
PyThreadState_NextNon-PyPy
PyThreadState_SetAsyncExcNon-PyPy
PyThreadState_Swap
PyTimeZone_FromOffsetNon-Py_LIMITED_API
PyTimeZone_FromOffsetAndNameNon-Py_LIMITED_API
PyTime_CheckNon-Py_LIMITED_API
Check if op is a PyDateTimeAPI.TimeType or subtype.
PyTime_CheckExactNon-Py_LIMITED_API
Check if op’s type is exactly PyDateTimeAPI.TimeType.
PyTime_FromTimeNon-Py_LIMITED_API
PyTime_FromTimeAndFoldNon-Py_LIMITED_API
PyTraceBack_CheckNeither PyPy nor RustPython
PyTraceBack_Here
PyTraceBack_Print
PyTuple_CheckNon-RustPython
PyTuple_CheckExactNon-RustPython
PyTuple_GET_ITEMNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyTuple_GET_SIZENeither Py_LIMITED_API nor RustPython and non-PyPy
Macro, trading safety for speed
PyTuple_GetItem
PyTuple_GetSlice
PyTuple_New
PyTuple_Pack
PyTuple_SET_ITEMNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
Macro, only to be used to fill in brand new tuples
PyTuple_SetItem
PyTuple_Size
PyType_CheckNon-RustPython
PyType_CheckExactNon-RustPython
PyType_ClearCache
PyType_FastSubclassNon-RustPython
PyType_FromMetaclassPy_3_12
PyType_FromModuleAndSpecPy_3_10, or Py_3_9 and non-Py_LIMITED_API
PyType_FromSpec
PyType_FromSpecWithBases
PyType_GenericAlloc
PyType_GenericNew
PyType_GetDictPy_3_12
PyType_GetFlags
PyType_GetModulePy_3_10, or Py_3_9 and non-Py_LIMITED_API
PyType_GetModuleByDefPy_3_13, or Py_3_11 and non-Py_LIMITED_API
PyType_GetModuleStatePy_3_10, or Py_3_9 and non-Py_LIMITED_API
PyType_GetNamePy_3_11
PyType_GetQualNamePy_3_11
PyType_GetSlot
PyType_GetTypeDataSizePy_3_12
PyType_HasFeature
PyType_IS_GC
PyType_IsSubtype
PyType_Modified
PyType_Ready
PyType_SUPPORTS_WEAKREFSNeither Py_LIMITED_API nor RustPython
PyUnicodeDecodeError_CreateNon-PyPy
PyUnicodeDecodeError_GetEncoding
PyUnicodeDecodeError_GetEnd
PyUnicodeDecodeError_GetObject
PyUnicodeDecodeError_GetReason
PyUnicodeDecodeError_GetStart
PyUnicodeDecodeError_SetEnd
PyUnicodeDecodeError_SetReason
PyUnicodeDecodeError_SetStart
PyUnicodeEncodeError_GetEncoding
PyUnicodeEncodeError_GetEnd
PyUnicodeEncodeError_GetObject
PyUnicodeEncodeError_GetReason
PyUnicodeEncodeError_GetStart
PyUnicodeEncodeError_SetEnd
PyUnicodeEncodeError_SetReason
PyUnicodeEncodeError_SetStart
PyUnicodeTranslateError_GetEnd
PyUnicodeTranslateError_GetObject
PyUnicodeTranslateError_GetReason
PyUnicodeTranslateError_GetStart
PyUnicodeTranslateError_SetEnd
PyUnicodeTranslateError_SetReason
PyUnicodeTranslateError_SetStart
PyUnicode_1BYTE_DATANeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyUnicode_2BYTE_DATANeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyUnicode_4BYTE_DATANeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
PyUnicode_Append
PyUnicode_AppendAndDel
PyUnicode_AsASCIIString
PyUnicode_AsCharmapString
PyUnicode_AsDecodedObjectDeprecatedNon-Py_3_15
PyUnicode_AsDecodedUnicodeDeprecatedNon-Py_3_15
PyUnicode_AsEncodedObjectDeprecatedNon-Py_3_15
PyUnicode_AsEncodedString
PyUnicode_AsEncodedUnicodeDeprecatedNon-Py_3_15
PyUnicode_AsLatin1String
PyUnicode_AsRawUnicodeEscapeString
PyUnicode_AsUCS4
PyUnicode_AsUCS4Copy
PyUnicode_AsUTF8
PyUnicode_AsUTF8AndSizePy_3_10 or non-Py_LIMITED_API
PyUnicode_AsUTF8String
PyUnicode_AsUTF16String
PyUnicode_AsUTF32String
PyUnicode_AsUnicodeEscapeString
PyUnicode_AsWideChar
PyUnicode_AsWideCharString
PyUnicode_BuildEncodingMap
PyUnicode_CheckNeither PyPy nor RustPython
PyUnicode_CheckExactNeither PyPy nor RustPython
PyUnicode_Compare
PyUnicode_CompareWithASCIIString
PyUnicode_Concat
PyUnicode_Contains
PyUnicode_CopyCharactersNon-PyPy
PyUnicode_Count
PyUnicode_DATANeither GraalPy nor Py_3_14 nor PyPy and neither Py_LIMITED_API nor RustPython
PyUnicode_Decode
PyUnicode_DecodeASCII
PyUnicode_DecodeCharmap
PyUnicode_DecodeFSDefault
PyUnicode_DecodeFSDefaultAndSize
PyUnicode_DecodeLatin1
PyUnicode_DecodeLocale
PyUnicode_DecodeLocaleAndSize
PyUnicode_DecodeRawUnicodeEscape
PyUnicode_DecodeUTF7
PyUnicode_DecodeUTF8
PyUnicode_DecodeUTF7Stateful
PyUnicode_DecodeUTF8Stateful
PyUnicode_DecodeUTF16
PyUnicode_DecodeUTF32
PyUnicode_DecodeUTF16Stateful
PyUnicode_DecodeUTF32Stateful
PyUnicode_DecodeUnicodeEscape
PyUnicode_EncodeFSDefault
PyUnicode_EncodeLocale
PyUnicode_FSConverter
PyUnicode_FSDecoder
PyUnicode_FillNon-PyPy
PyUnicode_Find
PyUnicode_FindChar
PyUnicode_Format
PyUnicode_FromEncodedObject
PyUnicode_FromFormat
PyUnicode_FromKindAndData
PyUnicode_FromObject
PyUnicode_FromOrdinal
PyUnicode_FromString
PyUnicode_FromStringAndSize
PyUnicode_FromWideChar
PyUnicode_GET_LENGTHNeither Py_LIMITED_API nor RustPython and non-GraalPy
PyUnicode_GetDefaultEncoding
PyUnicode_GetLength
PyUnicode_IS_ASCIINeither GraalPy nor Py_3_14 and neither Py_LIMITED_API nor RustPython
PyUnicode_IS_COMPACTNeither GraalPy nor Py_3_14 and neither Py_LIMITED_API nor RustPython
PyUnicode_IS_COMPACT_ASCIINeither GraalPy nor Py_3_14 and neither Py_LIMITED_API nor RustPython
PyUnicode_IS_READY(GraalPy or Py_3_12) and neither Py_LIMITED_API nor RustPython
PyUnicode_InternFromString
PyUnicode_InternInPlace
PyUnicode_IsIdentifier
PyUnicode_Join
PyUnicode_KINDNeither Py_LIMITED_API nor RustPython and non-GraalPy and non-Py_3_14
PyUnicode_New
PyUnicode_Partition
PyUnicode_READY(GraalPy or Py_3_12) and neither Py_LIMITED_API nor RustPython
PyUnicode_RPartition
PyUnicode_RSplit
PyUnicode_ReadChar
PyUnicode_Replace
PyUnicode_Resize
PyUnicode_RichCompare
PyUnicode_Split
PyUnicode_Splitlines
PyUnicode_Substring
PyUnicode_Tailmatch
PyUnicode_Translate
PyUnicode_WriteChar
PyUnstable_Code_GetExtra
PyUnstable_Code_SetExtra
PyUnstable_Eval_RequestCodeExtraIndex
PyUnstable_InterpreterFrame_GetCodePy_3_12
PyUnstable_InterpreterFrame_GetLastiPy_3_12
PyUnstable_InterpreterFrame_GetLinePy_3_12
PyVectorcall_Call
PyVectorcall_Function
PyVectorcall_NARGSNeither Py_LIMITED_API nor RustPython
PyWeakref_Check
PyWeakref_CheckProxyNeither PyPy nor RustPython
PyWeakref_CheckRefNeither PyPy nor RustPython and non-RustPython
PyWeakref_CheckRefExactNeither PyPy nor RustPython
PyWeakref_GetObjectNon-Py_3_15
PyWeakref_NewProxy
PyWeakref_NewRef
PyWideStringList_Append
PyWideStringList_Insert
PyWrapper_New
Py_AddPendingCall
Py_AtExit
Py_BuildValue
Py_BytesMain
Py_CLEAR
Py_CompileStringNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
Py_CompileStringExFlagsNeither GraalPy nor PyPy
Py_CompileStringFlagsNeither GraalPy nor PyPy and neither Py_LIMITED_API nor RustPython
Py_CompileStringObjectNon-Py_LIMITED_API
Py_DECREF
Py_DecRef
Py_DecodeLocale
Py_Ellipsis
Py_EncodeLocale
Py_EndInterpreter
Py_EnterRecursiveCallPy_3_9
Py_Exit
Py_ExitStatusException
Py_False
Py_FatalError
Py_Finalize
Py_FinalizeEx
Py_GETENVPy_3_11
Py_GenericAliasPy_3_9
Py_GetArgcArgv
Py_GetBuildInfo
Py_GetCompiler
Py_GetCopyright
Py_GetExecPrefixNon-Py_3_15
Py_GetPathNon-Py_3_15
Py_GetPlatform
Py_GetPrefixNon-Py_3_15
Py_GetProgramFullPathNon-Py_3_15
Py_GetProgramNameNon-Py_3_15
Py_GetPythonHomeNon-Py_3_15
Py_GetRecursionLimit
Py_GetVersion
Py_INCREF
Py_IS_TYPENeither RustPython, nor Py_3_15 and Py_LIMITED_API
Py_IncRef
Py_Initialize
Py_InitializeEx
Py_InitializeFromConfig
Py_Is
Py_IsFalse
Py_IsInitialized
Py_IsNone
Py_IsTrue
Py_LeaveRecursiveCallPy_3_9
Py_Main
Py_MakePendingCalls
Py_NewInterpreter
Py_NewInterpreterFromConfigPy_3_12
Py_NewRefPy_3_10
Py_None
Py_NotImplemented
Py_PreInitialize
Py_PreInitializeFromArgs
Py_PreInitializeFromBytesArgs
Py_REFCNTNot (Py_3_14 and Py_LIMITED_API)
Py_ReprEnter
Py_ReprLeave
Py_RunMain
Py_SIZENon-RustPython and not (Py_3_15 and Py_LIMITED_API)
Py_SetPathDeprecatedNon-Py_3_13
Py_SetProgramNameDeprecated
Py_SetPythonHomeDeprecated
Py_SetRecursionLimit
Py_TYPENon-Py_3_14
Py_True
Py_UNICODE_TODECIMALNeither Py_LIMITED_API nor RustPython and non-PyPy
Py_XDECREF
Py_XINCREF
Py_XNewRefPy_3_10
_PyCode_GetExtraDeprecatedNeither Py_LIMITED_API nor RustPython
_PyCode_SetExtraDeprecatedNeither Py_LIMITED_API nor RustPython
_PyEval_RequestCodeExtraIndexDeprecatedNeither Py_LIMITED_API nor RustPython and non-PyPy

Type Aliases§

PY_INT32_T
PY_INT64_T
PY_UINT32_T
PY_UINT64_T
PyCFunction
PyCFunctionFastPy_3_10 or non-Py_LIMITED_API
PyCFunctionFastWithKeywordsPy_3_10 or non-Py_LIMITED_API
PyCFunctionWithKeywords
PyCMethodPy_3_9 and non-Py_LIMITED_API
PyCapsule_Destructor
PyStructSequenceNon-Py_LIMITED_API
Py_UCS1
Py_UCS2
Py_UCS4
Py_UNICODENeither Py_LIMITED_API nor RustPython and non-Py_LIMITED_API
Py_hash_t
Py_intptr_t
Py_ssize_t
Py_tracefuncNeither Py_LIMITED_API nor RustPython
Py_uhash_t
Py_uintptr_t
_PyCFunctionFastDeprecatedPy_3_10 or non-Py_LIMITED_API
_PyCFunctionFastWithKeywordsDeprecatedPy_3_10 or non-Py_LIMITED_API
allocfunc
binaryfunc
descrgetfunc
descrsetfunc
destructor
freefunc
getattrfunc
getattrofunc
getbufferprocPy_3_11
getiterfunc
getter
hashfunc
initproc
inquiry
iternextfunc
lenfunc
newfunc
objobjargproc
objobjproc
printfuncNeither Py_LIMITED_API nor RustPython
releasebufferprocPy_3_11
reprfunc
richcmpfunc
sendfuncPy_3_10 and neither Py_LIMITED_API nor RustPython
setattrfunc
setattrofunc
setter
ssizeargfunc
ssizeobjargproc
ssizessizeargfunc
ssizessizeobjargproc
ternaryfunc
traverseproc
unaryfunc
vectorcallfunc
visitproc
wrapperfuncNeither Py_LIMITED_API nor RustPython
wrapperfunc_kwdsNeither Py_LIMITED_API nor RustPython

Unions§

PyMethodDefPointer
Function types used to implement Python callables.
PyObjectObRefcntPy_3_12 and non-Py_GIL_DISABLED
This union is anonymous in CPython, so the name was given by PyO3 because Rust union need a name.
PyUnicodeObjectDataNeither Py_LIMITED_API nor RustPython