Mojo module
bindings
Aliases
MOJO_PYTHON_TYPE_OBJECTS
alias MOJO_PYTHON_TYPE_OBJECTS = _Global[__init__[__mlir_type.!kgen.string]("MOJO_PYTHON_TYPE_OBJECTS"), Dict[StringSlice[StaticConstantOrigin], TypedPythonObject[__init__[__mlir_type.!kgen.string]("Type")]], _init_python_type_objects]
Mapping of Mojo type identifiers to unique PyTypeObject*
binding that Mojo type to this CPython interpreter instance.
Typed_initproc
alias Typed_initproc = fn(PyObjectPtr, TypedPythonObject[__init__[__mlir_type.!kgen.string]("Tuple")], PyObjectPtr) -> SIMD[int32, 1]
Typed_newfunc
alias Typed_newfunc = fn(UnsafePointer[PyTypeObject], TypedPythonObject[__init__[__mlir_type.!kgen.string]("Tuple")], PyObjectPtr) -> PyObjectPtr
Structs
-
PyMojoObject
: Storage backing a PyObject* wrapping a Mojo value. -
PythonModuleBuilder
: A builder for creating Python modules with Mojo function and type bindings. -
PythonTypeBuilder
: A builder for a Python 'type' binding.
Functions
-
check_arguments_arity
: Validate that the provided arguments match the expected function arity. -
lookup_py_type_object
: Retrieve a reference to the unique Python type describing Python objects containing Mojo values of typeT
.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!