Skip to main content

Module types

Module types 

Source
Expand description

Various types defined by the Python interpreter such as int, str and tuple.

Modulesยง

any ๐Ÿ”’
boolobject ๐Ÿ”’
bytearray ๐Ÿ”’
bytes
See PyBytes for more info. This mod also contains its helper type PyBytesWriter.
capsule
Python capsules and related types.
code
Python code objects and related types.
complex ๐Ÿ”’
datetime
Safe Rust wrappers for types defined in the Python datetime library
dict
Python dictionaries and related types.
ellipsis ๐Ÿ”’
float ๐Ÿ”’
frame ๐Ÿ”’ Non-GraalPy and non-Py_LIMITED_API and non-PyPy
frozenset
Python frozen sets and related types.
function ๐Ÿ”’
Python function objects.
genericalias ๐Ÿ”’
int ๐Ÿ”’
iter
Iteration over Python collections.
iterator
Python iterators and related types.
list
Python lists and related types.
mapping ๐Ÿ”’
mappingproxy
Python mapping proxies and related types.
memoryview ๐Ÿ”’
module ๐Ÿ”’
none ๐Ÿ”’
notimplemented ๐Ÿ”’
pysuper ๐Ÿ”’
range ๐Ÿ”’
sequence ๐Ÿ”’
set
Python sets and related types.
slice
Python slices and related types.
string
Python strings and related types.
traceback ๐Ÿ”’
tuple
Python tuples and related types.
typeobject ๐Ÿ”’
weakref ๐Ÿ”’

Structsยง

PyAny
Represents any Python object.
PyBool
Represents a Python bool.
PyByteArray
Represents a Python bytearray.
PyBytes
Represents a Python bytes object.
PyCFunction
Represents a builtin Python function object.
PyCapsule
Represents a Python Capsule as described in Capsules:
PyCode
Represents a Python code object.
PyComplex
Represents a Python complex object.
PyDate
Bindings around datetime.date.
PyDateTime
Bindings for datetime.datetime.
PyDelta
Bindings for datetime.timedelta.
PyDict
Represents a Python dict.
PyDictItemsNeither GraalPy nor PyPy nor RustPython
Represents a Python dict_items.
PyDictKeysNeither GraalPy nor PyPy nor RustPython
Represents a Python dict_keys.
PyDictValuesNeither GraalPy nor PyPy nor RustPython
Represents a Python dict_values.
PyEllipsis
Represents the Python Ellipsis object.
PyFloat
Represents a Python float object.
PyFrameNon-GraalPy and non-Py_LIMITED_API and non-PyPy
Represents a Python frame.
PyFrozenSet
Represents a Python frozenset.
PyFunction
Represents a Python function object.
PyGenericAlias
Represents a Python types.GenericAlias object.
PyInt
Represents a Python int object.
PyIterator
A Python iterator object.
PyList
Represents a Python list.
PyMapping
Represents a reference to a Python object supporting the mapping protocol.
PyMappingProxy
Represents a Python mappingproxy.
PyMemoryView
Represents a Python memoryview.
PyModule
Represents a Python module object.
PyNone
Represents the Python None object.
PyNotImplemented
Represents the Python NotImplemented object.
PyRange
Represents a Python range.
PySequence
Represents a reference to a Python object supporting the sequence protocol.
PySet
Represents a Python set.
PySlice
Represents a Python slice.
PyString
Represents a Python string (a Unicode string object).
PySuper
Represents a Python super object.
PyTime
Bindings for datetime.time.
PyTraceback
Represents a Python traceback.
PyTuple
Represents a Python tuple object.
PyType
Represents a reference to a Python type object.
PyTzInfo
Bindings for datetime.tzinfo.
PyWeakref
Represents any Python weakref reference.
PyWeakrefProxy
Represents any Python weakref Proxy type.
PyWeakrefReference
Represents a Python weakref.ReferenceType.

Traitsยง

DerefToPyAny
Python objects that have a base type.
IntoPyDict
Conversion trait that allows a sequence of tuples to be converted into PyDict Primary use case for this trait is call and call_method methods as keywords argument.
PyAnyMethods
This trait represents the Python APIs which are usable on all Python objects.
PyBoolMethods
Implementation of functionality for PyBool.
PyByteArrayMethods
Implementation of functionality for PyByteArray.
PyBytesMethods
Implementation of functionality for PyBytes.
PyCapsuleMethods
Implementation of functionality for PyCapsule.
PyCodeMethods
Implementation of functionality for PyCode.
PyComplexMethods
Implementation of functionality for PyComplex.
PyDateAccessNon-Py_LIMITED_API
Trait for accessing the date components of a struct containing a date.
PyDeltaAccessNon-Py_LIMITED_API
Trait for accessing the components of a struct containing a timedelta.
PyDictMethods
Implementation of functionality for PyDict.
PyFloatMethods
Implementation of functionality for PyFloat.
PyFrameMethodsNon-GraalPy and non-Py_LIMITED_API and non-PyPy
Implementation of functionality for PyFrame.
PyFrozenSetMethods
Implementation of functionality for PyFrozenSet.
PyListMethods
Implementation of functionality for PyList.
PyMappingMethods
Implementation of functionality for PyMapping.
PyMappingProxyMethods
Implementation of functionality for PyMappingProxy.
PyModuleMethods
Implementation of functionality for PyModule.
PyRangeMethods
Implementation of functionality for PyRange.
PySequenceMethods
Implementation of functionality for PySequence.
PySetMethods
Implementation of functionality for PySet.
PySliceMethods
Implementation of functionality for PySlice.
PyStringMethods
Implementation of functionality for PyString.
PyTimeAccessNon-Py_LIMITED_API
Trait for accessing the time components of a struct containing a time.
PyTracebackMethods
Implementation of functionality for PyTraceback.
PyTupleMethods
Implementation of functionality for PyTuple.
PyTypeMethods
Implementation of functionality for PyType.
PyTzInfoAccess
Trait for accessing the components of a struct containing a tzinfo.
PyWeakrefMethods
Implementation of functionality for PyWeakref.

Type Aliasesยง

CapsuleNameDeprecated
Deprecated alias for capsule::CapsuleName.
PyCodeInputDeprecated
Deprecated alias for code::PyCodeInput.
PyFrozenSetBuilderDeprecated
Deprecated alias for frozenset::PyFrozenSetBuilder.
PyMutexDeprecatedPy_3_13 and non-Py_LIMITED_API
Deprecated alias for crate::sync::PyMutex.
PyMutexGuardDeprecatedPy_3_13 and non-Py_LIMITED_API
Deprecated alias for crate::sync::PyMutexGuard.
PySendResultDeprecatedPy_3_10 and non-PyPy
Deprecated alias for iterator::PySendResult.
PySliceIndicesDeprecated
Deprecated alias for slice::PySliceIndices.
PyStringDataDeprecatedNon-Py_LIMITED_API
Deprecated alias for string::PyStringData.
โš ๏ธ Internal Docs โš ๏ธ Not Public API ๐Ÿ‘‰ Official Docs Here