Skip to main content

Module object

Module object 

Source

Re-exports§

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

Structs§

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

Enums§

PySendResultPy_3_10

Constants§

PyObject_HEAD_INIT
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
built-in ‘object’
PyBool_Type
PyLong_Type
PySuper_Type
built-in ‘super’
PyType_Type
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_ClearWeakRefs
PyObject_DelAttrPy_3_13, or PyPy and non-Py_3_11
PyObject_DelAttrStringPy_3_13, or PyPy and non-Py_3_11
PyObject_Dir
PyObject_GenericGetAttr
PyObject_GenericGetDictNot (Py_LIMITED_API and non-Py_3_10)
PyObject_GenericSetAttr
PyObject_GenericSetDict
PyObject_GetAttr
PyObject_GetAttrString
PyObject_GetOptionalAttrPy_3_13
PyObject_GetOptionalAttrStringPy_3_13
PyObject_GetTypeDataPy_3_12
PyObject_HasAttr
PyObject_HasAttrString
PyObject_HasAttrStringWithErrorPy_3_13
PyObject_HasAttrWithErrorPy_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
PyType_CheckExact
PyType_ClearCache
PyType_FastSubclass
PyType_FreezePy_3_14
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_GetFlags
PyType_GetFullyQualifiedNamePy_3_13
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_GetModuleNamePy_3_13
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_IsSubtype
PyType_Modified
PyType_Ready
Py_GetConstantPy_3_13
Py_GetConstantBorrowedPy_3_13
Py_IS_TYPENot (Py_LIMITED_API and Py_3_15)
Py_Is
Py_IsNone
Py_None
Py_NotImplemented
Py_ReprEnter
Py_ReprLeave
Py_SIZE
Py_TYPE

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-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