Skip to main content

Module object

Module object 

Source

Re-exports§

pub use crate::cpython::object::PyTypeObject;Non-Py_LIMITED_API

Structs§

PyObjectNot (Py_GIL_DISABLED and Py_LIMITED_API)
PyObjectObFlagsAndRefcnt64-bit and Py_3_14 and little-endian and non-Py_GIL_DISABLED
This struct is anonymous in CPython, so the name was given by PyO3 because Rust structs need a name.
PyType_Slot
PyType_Spec
PyVarObjectNot (Py_GIL_DISABLED and Py_LIMITED_API)

Enums§

PySendResultPy_3_10

Constants§

PyObject_HEAD_INITNot (Py_GIL_DISABLED and Py_LIMITED_API)
Py_CONSTANT_ELLIPSISPy_3_13
Py_CONSTANT_EMPTY_BYTESPy_3_13
Py_CONSTANT_EMPTY_STRPy_3_13
Py_CONSTANT_EMPTY_TUPLEPy_3_13
Py_CONSTANT_FALSEPy_3_13
Py_CONSTANT_NONEPy_3_13
Py_CONSTANT_NOT_IMPLEMENTEDPy_3_13
Py_CONSTANT_ONEPy_3_13
Py_CONSTANT_TRUEPy_3_13
Py_CONSTANT_ZEROPy_3_13
Py_EQ
Py_GE
Py_GT
Py_LE
Py_LT
Py_NE
Py_PRINT_RAW
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_STACKLESS_EXTENSION 🔒
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
_PyObject_MIN_ALIGNMENT 🔒

Statics§

PyBaseObject_Type⚠Non-RustPython
built-in ‘object’
PyBool_Type⚠
PyLong_Type⚠
PySuper_Type⚠Non-RustPython
built-in ‘super’
PyType_Type⚠Non-RustPython
built-in ‘type’
_Py_NoneStruct 🔒 ⚠Non-GraalPy and not (Py_3_13 and Py_LIMITED_API)
_Py_NotImplementedStruct 🔒 ⚠Non-GraalPy and not (Py_3_13 and Py_LIMITED_API)

Functions§

PyCallable_Check⚠
PyObject_ASCII⚠
PyObject_Bytes⚠
PyObject_CallFinalizerFromDealloc⚠Py_3_15 or non-Py_LIMITED_API
PyObject_ClearWeakRefs⚠
PyObject_DelAttr⚠Py_3_13, or PyPy and non-Py_3_11
PyObject_DelAttrString⚠Py_3_13, or PyPy and non-Py_3_11
PyObject_Dir⚠
PyObject_GenericGetAttr⚠
PyObject_GenericGetDict⚠Not (Py_LIMITED_API and non-Py_3_10)
PyObject_GenericSetAttr⚠
PyObject_GenericSetDict⚠
PyObject_GetAttr⚠
PyObject_GetAttrString⚠
PyObject_GetOptionalAttr⚠Py_3_13
PyObject_GetOptionalAttrString⚠Py_3_13
PyObject_GetTypeData⚠Py_3_12
PyObject_HasAttr⚠
PyObject_HasAttrString⚠
PyObject_HasAttrStringWithError⚠Py_3_13
PyObject_HasAttrWithError⚠Py_3_13
PyObject_Hash⚠
PyObject_HashNotImplemented⚠
PyObject_IsTrue⚠
PyObject_Not⚠
PyObject_Repr⚠
PyObject_RichCompare⚠
PyObject_RichCompareBool⚠
PyObject_SelfIter⚠
PyObject_SetAttr⚠
PyObject_SetAttrString⚠
PyObject_Str⚠
PyObject_TypeCheck⚠
PyType_Check⚠Non-RustPython
PyType_CheckExact⚠Non-RustPython
PyType_ClearCache⚠
PyType_FastSubclass⚠Non-RustPython
PyType_Freeze⚠Py_3_14
PyType_FromMetaclass⚠Py_3_12
PyType_FromModuleAndSpec⚠Py_3_10 or non-Py_LIMITED_API
PyType_FromSpec⚠
PyType_FromSpecWithBases⚠
PyType_GenericAlloc⚠
PyType_GenericNew⚠
PyType_GetBaseByToken⚠Py_3_14
PyType_GetFlags⚠
PyType_GetFullyQualifiedName⚠Py_3_13
PyType_GetModule⚠Py_3_10 or non-Py_LIMITED_API
PyType_GetModuleByDef⚠Py_3_13, or Py_3_11 and non-Py_LIMITED_API
PyType_GetModuleName⚠Py_3_13
PyType_GetModuleState⚠Py_3_10 or non-Py_LIMITED_API
PyType_GetName⚠Py_3_11
PyType_GetQualName⚠Py_3_11
PyType_GetSlot⚠
PyType_GetTypeDataSize⚠Py_3_12
PyType_HasFeature⚠
PyType_IsSubtype⚠
PyType_Modified⚠
PyType_Ready⚠
Py_GetConstant⚠Py_3_13
Py_GetConstantBorrowed⚠Py_3_13
Py_IS_TYPE⚠Neither RustPython, nor Py_3_15 and Py_LIMITED_API
Py_Is⚠
Py_IsNone⚠
Py_None⚠
Py_NotImplemented⚠
Py_ReprEnter⚠
Py_ReprLeave⚠
Py_SIZE⚠Non-RustPython and not (Py_3_15 and Py_LIMITED_API)
Py_TYPE⚠Not (Py_3_14 and Py_LIMITED_API)
_PyVarObject_CAST 🔒 ⚠

Type Aliases§

allocfunc
binaryfunc
descrgetfunc
descrsetfunc
destructor
freefunc
getattrfunc
getattrofunc
getiterfunc
hashfunc
initproc
inquiry
iternextfunc
lenfunc
newfunc
objobjargproc
objobjproc
reprfunc
richcmpfunc
setattrfunc
setattrofunc
ssizeargfunc
ssizeobjargproc
ssizessizeargfunc
ssizessizeobjargproc
ternaryfunc
traverseproc
unaryfunc
vectorcallfunc
visitproc

Unions§

PyObjectObRefcntPy_3_12 and non-PyPy and non-Py_GIL_DISABLED
This union is anonymous in CPython, so the name was given by PyO3 because Rust union need a name.
⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here