"""
Auto-generated Python stub file from cpython.py
Module: cpython
"""


import t, c

class PyObject:
    ob_refcnt: t.CLong
    ob_type: t.CPtr

def Py_INCREF(op: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def Py_DECREF(op: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def Py_XINCREF(op: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def Py_XDECREF(op: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def Py_DecRef(op: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def Py_Initialize() -> t.CVoid | t.State: pass

def Py_Finalize() -> t.CVoid | t.State: pass

def Py_InitializeEx(initsigs: t.CInt) -> t.CVoid | t.State: pass

def Py_FinalizeEx() -> t.CInt | t.State: pass

def Py_IsInitialized() -> t.CInt | t.State: pass


class PySTATUS:
    func: t.CConst | str
    err_msg: t.CConst | str
    exitcode: t.CInt
class PyPreConfig:
    _config_version: t.CInt
    _config_init: t.CInt
    parse_argv: t.CInt
    isolated: t.CInt
    use_environment: t.CInt
    utf8_mode: t.CInt
    coerce_c_locale: t.CInt
    C_locale_warnings: t.CInt
    allocator: t.CInt
    dev_mode: t.CInt
class PyWideStringList:
    length: t.CSizeT
    items: t.CPtr
class PyConfig:
    _config_version: t.CInt
    _config_init: t.CInt
    isolated: t.CInt
    use_environment: t.CInt
    dev_mode: t.CInt
    install_signal_handlers: t.CInt
    use_hash_seed: t.CInt
    hash_seed: t.CUnsignedLong
    faulthandler: t.CInt
    tracemalloc: t.CInt
    import_time: t.CInt
    show_ref_count: t.CInt
    dump_refs: t.CInt
    dump_refs_file: t.CConst | str
    malloc_stats: t.CInt
    filesystem_errors: t.CInt
    pycache_prefix: t.CConst | str
    parse_argv: t.CInt
    argv: PyWideStringList
    program_name: t.CConst | str
    xoptions: PyWideStringList
    warnoptions: PyWideStringList
    site_import: t.CInt
    bytes_warning: t.CInt
    warn_default_encoding: t.CInt
    inspect: t.CInt
    interactive: t.CInt
    optimization_level: t.CInt
    parser_debug: t.CInt
    verbose: t.CInt
    quiet: t.CInt
    home: t.CConst | str
    pythonpath_env: t.CConst | str
    module_search_paths: PyWideStringList
    module_search_paths_set: t.CInt
    executable: t.CConst | str
    base_executable: t.CConst | str
    prefix: t.CConst | str
    base_prefix: t.CConst | str
    exec_prefix: t.CConst | str
    base_exec_prefix: t.CConst | str
    platlibdir: t.CConst | str
    stdio_filename: t.CConst | str

def PyConfig_InitPythonConfig(config: PyConfig | t.CPtr) -> t.CVoid | t.State: pass

def PyConfig_InitIsolatedConfig(config: PyConfig | t.CPtr) -> t.CVoid | t.State: pass

def PyConfig_Clear(config: PyConfig | t.CPtr) -> t.CVoid | t.State: pass

def PyConfig_Read(config: PyConfig | t.CPtr) -> PySTATUS | t.State: pass

def Py_InitializeFromConfig(config: PyConfig | t.CPtr) -> PySTATUS | t.State: pass

def Py_DecodeLocale(s: t.CConst | str) -> str | t.State: pass

def PyStatus_Exception(status: PySTATUS) -> t.CInt | t.State: pass

def PyLong_FromLong(v: t.CLong) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromUnsignedLong(v: t.CUnsignedLong) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromLongLong(v: t.CLong) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromUnsignedLongLong(v: t.CUnsignedLong) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromSsize_t(v: t.CPtrDiffT) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromSize_t(v: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyLong_FromDouble(v: t.CDouble) -> PyObject | t.CPtr | t.State: pass

def PyLong_AsLong(obj: PyObject | t.CPtr) -> t.CLong | t.State: pass

def PyLong_AsUnsignedLong(obj: PyObject | t.CPtr) -> t.CUnsignedLong | t.State: pass

def PyLong_AsLongLong(obj: PyObject | t.CPtr) -> t.CLong | t.State: pass

def PyLong_AsUnsignedLongLong(obj: PyObject | t.CPtr) -> t.CUnsignedLong | t.State: pass

def PyLong_AsDouble(obj: PyObject | t.CPtr) -> t.CDouble | t.State: pass

def PyLong_AsSsize_t(obj: PyObject | t.CPtr) -> t.CPtrDiffT | t.State: pass

def PyLong_AsSize_t(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyFloat_FromDouble(v: t.CDouble) -> PyObject | t.CPtr | t.State: pass

def PyFloat_AsDouble(obj: PyObject | t.CPtr) -> t.CDouble | t.State: pass

def PyFloat_FromString(s: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_FromString(u: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_FromStringAndSize(u: t.CConst | str, size: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_FromFormat(fmt: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_AsUTF8(obj: PyObject | t.CPtr) -> str | t.State: pass

def PyUnicode_AsUTF8AndSize(obj: PyObject | t.CPtr, size: t.CPtrDiffT | t.CPtr) -> str | t.State: pass

def PyUnicode_AsWideChar(obj: PyObject | t.CPtr, wbuf: t.CPtr, bufsize: t.CSizeT) -> t.CSizeT | t.State: pass

def PyUnicode_GetLength(obj: PyObject | t.CPtr) -> t.CPtrDiffT | t.State: pass

def PyUnicode_ReadChar(obj: PyObject | t.CPtr, idx: t.CSizeT) -> t.CUInt32T | t.State: pass

def PyUnicode_WriteChar(obj: PyObject | t.CPtr, idx: t.CSizeT, ch: t.CUInt32T) -> t.CInt | t.State: pass

def PyUnicode_Compare(l: PyObject | t.CPtr, r: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyUnicode_Concat(l: PyObject | t.CPtr, r: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_Contains(container: PyObject | t.CPtr, element: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyUnicode_Format(fmt: PyObject | t.CPtr, args: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyUnicode_InternInPlace(s: PyObject | t.CPtr | t.CPtr) -> t.CVoid | t.State: pass

def PyUnicode_InternFromString(u: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyBytes_FromString(v: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyBytes_FromStringAndSize(v: t.CConst | str, size: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyBytes_AsString(obj: PyObject | t.CPtr) -> str | t.State: pass

def PyBytes_Size(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyBytes_FromObject(o: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyBytes_FromFormat(fmt: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyBool_FromLong(v: t.CLong) -> PyObject | t.CPtr | t.State: pass


Py_True: t.CExtern | PyObject | t.CPtr | t.State
Py_False: t.CExtern | PyObject | t.CPtr | t.State
Py_None: t.CExtern | PyObject | t.CPtr | t.State

def PyList_New(len: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyList_Size(lst: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyList_GetItem(lst: PyObject | t.CPtr, idx: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyList_SetItem(lst: PyObject | t.CPtr, idx: t.CSizeT, item: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_Insert(lst: PyObject | t.CPtr, idx: t.CSizeT, item: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_Append(lst: PyObject | t.CPtr, item: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_GetSlice(lst: PyObject | t.CPtr, lo: t.CSizeT, hi: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyList_SetSlice(lst: PyObject | t.CPtr, lo: t.CSizeT, hi: t.CSizeT, items: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_Sort(lst: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_Reverse(lst: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_AsTuple(lst: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyTuple_New(len: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyTuple_Size(tup: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyTuple_GetItem(tup: PyObject | t.CPtr, idx: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyTuple_SetItem(tup: PyObject | t.CPtr, idx: t.CSizeT, item: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyTuple_GetSlice(tup: PyObject | t.CPtr, lo: t.CSizeT, hi: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyTuple_Pack(n: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyDict_New() -> PyObject | t.CPtr | t.State: pass

def PyDict_GetItem(d: PyObject | t.CPtr, key: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyDict_GetItemString(d: PyObject | t.CPtr, key: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyDict_SetItem(d: PyObject | t.CPtr, key: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyDict_SetItemString(d: PyObject | t.CPtr, key: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyDict_DelItem(d: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyDict_DelItemString(d: PyObject | t.CPtr, key: t.CConst | str) -> t.CInt | t.State: pass

def PyDict_Size(d: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyDict_Keys(d: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyDict_Values(d: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyDict_Items(d: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyDict_Copy(d: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyDict_Clear(d: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PyDict_Contains(d: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyDict_Next(d: PyObject | t.CPtr, pos: t.CPtrDiffT | t.CPtr, key: PyObject | t.CPtr | t.CPtr, val: PyObject | t.CPtr | t.CPtr) -> t.CInt | t.State: pass

def PyDict_Merge(d: PyObject | t.CPtr, other: PyObject | t.CPtr, override: t.CInt) -> t.CInt | t.State: pass

def PyDict_Update(d: PyObject | t.CPtr, other: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_Str(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_Repr(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_Type(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_IsInstance(obj: PyObject | t.CPtr, cls: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_IsSubclass(obj: PyObject | t.CPtr, cls: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_HasAttr(obj: PyObject | t.CPtr, name: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_HasAttrString(obj: PyObject | t.CPtr, name: t.CConst | str) -> t.CInt | t.State: pass

def PyObject_GetAttr(obj: PyObject | t.CPtr, name: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_GetAttrString(obj: PyObject | t.CPtr, name: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyObject_SetAttr(obj: PyObject | t.CPtr, name: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_SetAttrString(obj: PyObject | t.CPtr, name: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_DelAttr(obj: PyObject | t.CPtr, name: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_DelAttrString(obj: PyObject | t.CPtr, name: t.CConst | str) -> t.CInt | t.State: pass

def PyObject_Call(callable: PyObject | t.CPtr, args: PyObject | t.CPtr, kwargs: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_CallObject(callable: PyObject | t.CPtr, args: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_CallNoArgs(callable: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_CallOneArg(callable: PyObject | t.CPtr, arg: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_IsTrue(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_Not(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_RichCompare(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr, opid: t.CInt) -> PyObject | t.CPtr | t.State: pass

def PyObject_RichCompareBool(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr, opid: t.CInt) -> t.CInt | t.State: pass

def PyObject_Hash(obj: PyObject | t.CPtr) -> t.CLong | t.State: pass

def PyObject_Length(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyObject_GetItem(obj: PyObject | t.CPtr, key: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_SetItem(obj: PyObject | t.CPtr, key: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_DelItem(obj: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyObject_Dir(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_GetIter(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyIter_Next(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass


Py_LT: t.CExtern | t.CInt | t.State
Py_LE: t.CExtern | t.CInt | t.State
Py_EQ: t.CExtern | t.CInt | t.State
Py_NE: t.CExtern | t.CInt | t.State
Py_GT: t.CExtern | t.CInt | t.State
Py_GE: t.CExtern | t.CInt | t.State

def PyImport_ImportModule(name: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyImport_Import(name: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyImport_ImportModuleLevelObject(name: PyObject | t.CPtr, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr, fromlist: PyObject | t.CPtr, level: t.CInt) -> PyObject | t.CPtr | t.State: pass

def PyImport_ReloadModule(mod: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyImport_AddModule(name: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyImport_GetModuleDict() -> PyObject | t.CPtr | t.State: pass

def PyImport_ImportModuleEx(name: t.CConst | str, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr, fromlist: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass


class PyMethodDef:
    ml_name: t.CConst | str
    ml_meth: t.CPtr
    ml_flags: t.CInt
    ml_doc: t.CConst | str
class PyModuleDef_Base:
    ob_base: PyObject
    m_init: t.CPtr
    m_index: t.CSizeT
    m_copy: PyObject | t.CPtr
class PyModuleDef:
    m_base: PyModuleDef_Base
    m_name: t.CConst | str
    m_doc: t.CConst | str
    m_size: t.CPtrDiffT
    m_methods: PyMethodDef | t.CPtr
    m_slots: t.CPtr
    m_traverse: t.CPtr
    m_clear: t.CPtr
    m_free: t.CPtr

def PyModule_Create(mod: PyModuleDef | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyModule_Create2(mod: PyModuleDef | t.CPtr, ver: t.CInt) -> PyObject | t.CPtr | t.State: pass

def PyModule_GetName(mod: PyObject | t.CPtr) -> str | t.State: pass

def PyModule_GetDict(mod: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyModule_GetFilenameObject(mod: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyModule_AddObject(mod: PyObject | t.CPtr, name: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyModule_AddObjectRef(mod: PyObject | t.CPtr, name: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyModule_AddIntConstant(mod: PyObject | t.CPtr, name: t.CConst | str, val: t.CLong) -> t.CInt | t.State: pass

def PyModule_AddStringConstant(mod: PyObject | t.CPtr, name: t.CConst | str, val: t.CConst | str) -> t.CInt | t.State: pass

def PyGILState_Ensure() -> t.CInt | t.State: pass

def PyGILState_Release(state: t.CInt) -> t.CVoid | t.State: pass

def PyEval_SaveThread() -> t.CPtr | t.State: pass

def PyEval_RestoreThread(tstate: t.CPtr) -> t.CVoid | t.State: pass

def PyEval_AcquireThread(tstate: t.CPtr) -> t.CVoid | t.State: pass

def PyEval_ReleaseThread(tstate: t.CPtr) -> t.CVoid | t.State: pass

def PyEval_AcquireLock() -> t.CVoid | t.State: pass

def PyEval_ReleaseLock() -> t.CVoid | t.State: pass

def PyEval_ThreadsInitialized() -> t.CInt | t.State: pass

def PyEval_InitThreads() -> t.CVoid | t.State: pass

def PyErr_Occurred() -> PyObject | t.CPtr | t.State: pass

def PyErr_Clear() -> t.CVoid | t.State: pass

def PyErr_Fetch(tp: PyObject | t.CPtr | t.CPtr, val: PyObject | t.CPtr | t.CPtr, tb: PyObject | t.CPtr | t.CPtr) -> t.CVoid | t.State: pass

def PyErr_Restore(tp: PyObject | t.CPtr, val: PyObject | t.CPtr, tb: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PyErr_NormalizeException(tp: PyObject | t.CPtr | t.CPtr, val: PyObject | t.CPtr | t.CPtr, tb: PyObject | t.CPtr | t.CPtr) -> t.CVoid | t.State: pass

def PyErr_SetString(tp: PyObject | t.CPtr, msg: t.CConst | str) -> t.CVoid | t.State: pass

def PyErr_SetObject(tp: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PyErr_BadArgument() -> t.CPtr | t.State: pass

def PyErr_NoMemory() -> t.CPtr | t.State: pass

def PyErr_Print() -> t.CVoid | t.State: pass

def PyErr_ExceptionMatches(exc: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyErr_GivenExceptionMatches(given: PyObject | t.CPtr, exc: PyObject | t.CPtr) -> t.CInt | t.State: pass


PyExc_BaseException: t.CExtern | PyObject | t.CPtr | t.State
PyExc_Exception: t.CExtern | PyObject | t.CPtr | t.State
PyExc_TypeError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_ValueError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_RuntimeError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_KeyError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_IndexError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_AttributeError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_ImportError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_OSError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_IOError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_ZeroDivisionError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_OverflowError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_MemoryError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_NameError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_StopIteration: t.CExtern | PyObject | t.CPtr | t.State
PyExc_NotImplementedError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_SyntaxError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_FileNotFoundError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_PermissionError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_IsADirectoryError: t.CExtern | PyObject | t.CPtr | t.State
PyExc_NotADirectoryError: t.CExtern | PyObject | t.CPtr | t.State

def Py_BuildValue(fmt: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def Py_VaBuildValue(fmt: t.CConst | str, va: t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyLong_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyFloat_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyUnicode_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyBytes_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyList_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyTuple_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyDict_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyBool_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyNone_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyMem_Malloc(size: t.CSizeT) -> t.CPtr | t.State: pass

def PyMem_Realloc(ptr: t.CPtr, size: t.CSizeT) -> t.CPtr | t.State: pass

def PyMem_Free(ptr: t.CPtr) -> t.CVoid | t.State: pass

def PyMem_Calloc(nelem: t.CSizeT, elsize: t.CSizeT) -> t.CPtr | t.State: pass

def PyObject_Malloc(size: t.CSizeT) -> t.CPtr | t.State: pass

def PyObject_Realloc(ptr: t.CPtr, size: t.CSizeT) -> t.CPtr | t.State: pass

def PyObject_Free(ptr: t.CPtr) -> t.CVoid | t.State: pass

def PyObject_Calloc(nelem: t.CSizeT, elsize: t.CSizeT) -> t.CPtr | t.State: pass

def PyObject_Init(obj: PyObject | t.CPtr, tp: t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyObject_InitVar(obj: PyObject | t.CPtr, tp: t.CPtr, size: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PyFile_FromString(filename: t.CConst | str, mode: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyFile_AsFile(file: PyObject | t.CPtr) -> t.CPtr | t.State: pass

def PyFile_WriteObject(obj: PyObject | t.CPtr, file: PyObject | t.CPtr, flags: t.CInt) -> t.CInt | t.State: pass

def PyFile_WriteString(s: t.CConst | str, file: PyObject | t.CPtr) -> t.CInt | t.State: pass

def Py_CompileString(s: t.CConst | str, filename: t.CConst | str, start: t.CInt) -> PyObject | t.CPtr | t.State: pass

def PyEval_EvalCode(code: PyObject | t.CPtr, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyEval_EvalCodeEx(code: PyObject | t.CPtr, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr, args: PyObject | t.CPtr | t.CPtr, argc: t.CInt, kws: PyObject | t.CPtr | t.CPtr, kwc: t.CInt, defs: PyObject | t.CPtr | t.CPtr, defc: t.CInt, kwdefs: PyObject | t.CPtr, closure: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyEval_EvalFrame(frame: t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyEval_CallObject(callable: PyObject | t.CPtr, args: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyEval_CallFunction(callable: PyObject | t.CPtr, fmt: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyEval_CallMethod(obj: PyObject | t.CPtr, method: t.CConst | str, fmt: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyRun_SimpleString(cmd: t.CConst | str) -> t.CInt | t.State: pass

def PyRun_SimpleFile(fp: t.CPtr, filename: t.CConst | str) -> t.CInt | t.State: pass

def PyRun_AnyFile(fp: t.CPtr, filename: t.CConst | str) -> t.CInt | t.State: pass

def PyRun_String(s: t.CConst | str, start: t.CInt, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyRun_File(fp: t.CPtr, filename: t.CConst | str, start: t.CInt, globs: PyObject | t.CPtr, locs: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass


Py_single_input: t.CExtern | t.CInt | t.State
Py_file_input: t.CExtern | t.CInt | t.State
Py_eval_input: t.CExtern | t.CInt | t.State

def PyCapsule_New(ptr: t.CPtr, name: t.CConst | str, dtor: t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyCapsule_GetPointer(cap: PyObject | t.CPtr, name: t.CConst | str) -> t.CPtr | t.State: pass

def PyCapsule_GetName(cap: PyObject | t.CPtr) -> str | t.State: pass

def PyCapsule_IsValid(cap: PyObject | t.CPtr, name: t.CConst | str) -> t.CInt | t.State: pass

def PyCapsule_SetPointer(cap: PyObject | t.CPtr, ptr: t.CPtr) -> t.CInt | t.State: pass

def PyCapsule_SetName(cap: PyObject | t.CPtr, name: t.CConst | str) -> t.CInt | t.State: pass

def PyCapsule_SetDestructor(cap: PyObject | t.CPtr, dtor: t.CPtr) -> t.CInt | t.State: pass

def PySequence_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySequence_Size(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PySequence_Length(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PySequence_Concat(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PySequence_Repeat(obj: PyObject | t.CPtr, count: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PySequence_GetItem(obj: PyObject | t.CPtr, idx: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PySequence_SetItem(obj: PyObject | t.CPtr, idx: t.CSizeT, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySequence_DelItem(obj: PyObject | t.CPtr, idx: t.CSizeT) -> t.CInt | t.State: pass

def PySequence_GetSlice(obj: PyObject | t.CPtr, start: t.CSizeT, end: t.CSizeT) -> PyObject | t.CPtr | t.State: pass

def PySequence_SetSlice(obj: PyObject | t.CPtr, start: t.CSizeT, end: t.CSizeT, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySequence_DelSlice(obj: PyObject | t.CPtr, start: t.CSizeT, end: t.CSizeT) -> t.CInt | t.State: pass

def PySequence_Contains(obj: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySequence_Index(obj: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PySequence_Count(obj: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PySequence_List(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PySequence_Tuple(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyMapping_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyMapping_Size(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyMapping_Length(obj: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PyMapping_HasKey(obj: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyMapping_HasKeyString(obj: PyObject | t.CPtr, key: t.CConst | str) -> t.CInt | t.State: pass

def PyMapping_GetItemString(obj: PyObject | t.CPtr, key: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PyMapping_SetItemString(obj: PyObject | t.CPtr, key: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyMapping_Keys(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyMapping_Values(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyMapping_Items(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Add(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Subtract(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Multiply(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_MatrixMultiply(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_FloorDivide(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_TrueDivide(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Modulo(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Power(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr, o3: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Negative(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Positive(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Absolute(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Invert(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Lshift(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Rshift(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_And(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Xor(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Or(o1: PyObject | t.CPtr, o2: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Index(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Long(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Float(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyNumber_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyWeakref_NewRef(obj: PyObject | t.CPtr, cb: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyWeakref_GetObject(ref: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyWeakref_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass


class PyGetSetDef:
    name: t.CConst | str
    get: t.CPtr
    set: t.CPtr
    doc: t.CConst | str
    closure: t.CPtr
class PyMemberDef:
    name: t.CConst | str
    type: t.CInt
    offset: t.CPtrDiffT
    flags: t.CInt
    doc: t.CConst | str

def PySys_GetObject(name: t.CConst | str) -> PyObject | t.CPtr | t.State: pass

def PySys_SetObject(name: t.CConst | str, val: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySys_ResetWarnOptions() -> t.CVoid | t.State: pass

def PySys_AddWarnOption(s: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PySYS_AddXOption(s: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PySys_WriteStdout(fmt: t.CConst | str) -> t.CVoid | t.State: pass

def PySys_WriteStderr(fmt: t.CConst | str) -> t.CVoid | t.State: pass

def PySys_FormatStdout(fmt: t.CConst | str) -> t.CVoid | t.State: pass

def PySys_FormatStderr(fmt: t.CConst | str) -> t.CVoid | t.State: pass

def PyMemoryView_FromObject(obj: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyMemoryView_GetContiguous(obj: PyObject | t.CPtr, btype: t.CInt, order: t.CChar) -> PyObject | t.CPtr | t.State: pass

def PyMemoryView_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySet_New(iterable: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PySet_Add(s: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySet_Discard(s: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySet_Contains(s: PyObject | t.CPtr, key: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySet_Size(s: PyObject | t.CPtr) -> t.CSizeT | t.State: pass

def PySet_Clear(s: PyObject | t.CPtr) -> t.CVoid | t.State: pass

def PySet_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PyFrozenSet_New(iterable: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PyFrozenSet_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass

def PySlice_New(start: PyObject | t.CPtr, stop: PyObject | t.CPtr, step: PyObject | t.CPtr) -> PyObject | t.CPtr | t.State: pass

def PySlice_GetIndicesEx(sl: PyObject | t.CPtr, length: t.CSizeT, start: t.CSizeT | t.CPtr, stop: t.CSizeT | t.CPtr, step: t.CSizeT | t.CPtr, slicelen: t.CSizeT | t.CPtr) -> t.CInt | t.State: pass

def PySlice_Unpack(sl: PyObject | t.CPtr, start: t.CPtrDiffT | t.CPtr, stop: t.CPtrDiffT | t.CPtr, step: t.CPtrDiffT | t.CPtr) -> t.CVoid | t.State: pass

def PySlice_AdjustIndices(length: t.CSizeT, start: t.CPtrDiffT | t.CPtr, stop: t.CPtrDiffT | t.CPtr, step: t.CPtrDiffT) -> t.CSizeT | t.State: pass

def PySlice_Check(obj: PyObject | t.CPtr) -> t.CInt | t.State: pass


class PyLongObj:
    ptr: PyObject | t.CPtr
    def __new__(self: PyLongObj) -> 'PyLongObj' | t.CPtr: pass
    @staticmethod
    def from_long(val: t.CLong) -> 'PyLongObj' | t.CPtr: pass
    def __add__(self: PyLongObj, other: PyLongObj | t.CPtr) -> 'PyLongObj' | t.CPtr: pass
    def __sub__(self: PyLongObj, other: PyLongObj | t.CPtr) -> 'PyLongObj' | t.CPtr: pass
    def __mul__(self: PyLongObj, other: PyLongObj | t.CPtr) -> 'PyLongObj' | t.CPtr: pass
    def __neg__(self: PyLongObj) -> 'PyLongObj' | t.CPtr: pass
    def to_long(self: PyLongObj) -> t.CLong: pass
    def __str__(self: PyLongObj) -> PyObject | t.CPtr: pass
    def dec_ref(self: PyLongObj) -> t.CInt: pass
class PyFloatObj:
    ptr: PyObject | t.CPtr
    def __new__(self: PyFloatObj) -> 'PyFloatObj' | t.CPtr: pass
    @staticmethod
    def from_double(val: t.CDouble) -> 'PyFloatObj' | t.CPtr: pass
    def __add__(self: PyFloatObj, other: PyFloatObj | t.CPtr) -> 'PyFloatObj' | t.CPtr: pass
    def __sub__(self: PyFloatObj, other: PyFloatObj | t.CPtr) -> 'PyFloatObj' | t.CPtr: pass
    def __mul__(self: PyFloatObj, other: PyFloatObj | t.CPtr) -> 'PyFloatObj' | t.CPtr: pass
    def __truediv__(self: PyFloatObj, other: PyFloatObj | t.CPtr) -> 'PyFloatObj' | t.CPtr: pass
    def __neg__(self: PyFloatObj) -> 'PyFloatObj' | t.CPtr: pass
    def to_double(self: PyFloatObj) -> t.CDouble: pass
    def __str__(self: PyFloatObj) -> PyObject | t.CPtr: pass
    def dec_ref(self: PyFloatObj) -> t.CInt: pass
class PyUnicodeObj:
    ptr: PyObject | t.CPtr
    def __new__(self: PyUnicodeObj) -> 'PyUnicodeObj' | t.CPtr: pass
    @staticmethod
    def from_string(s: t.CChar | t.CPtr) -> 'PyUnicodeObj' | t.CPtr: pass
    def __add__(self: PyUnicodeObj, other: PyUnicodeObj | t.CPtr) -> 'PyUnicodeObj' | t.CPtr: pass
    def __len__(self: PyUnicodeObj) -> t.CPtrDiffT: pass
    def as_utf8(self: PyUnicodeObj) -> t.CChar | t.CPtr: pass
    def __str__(self: PyUnicodeObj) -> PyObject | t.CPtr: pass
    def dec_ref(self: PyUnicodeObj) -> t.CInt: pass
class PyListObj:
    ptr: PyObject | t.CPtr
    def __new__(self: PyListObj) -> 'PyListObj' | t.CPtr: pass
    @staticmethod
    def new() -> 'PyListObj' | t.CPtr: pass
    def __getitem__(self: PyListObj, idx: t.CSizeT) -> PyObject | t.CPtr: pass
    def __setitem__(self: PyListObj, idx: t.CSizeT, val: PyObject | t.CPtr) -> t.CInt: pass
    def __len__(self: PyListObj) -> t.CSizeT: pass
    def append(self: PyListObj, item: PyObject | t.CPtr) -> t.CInt: pass
    def dec_ref(self: PyListObj) -> t.CInt: pass
class PyDictObj:
    ptr: PyObject | t.CPtr
    def __new__(self: PyDictObj) -> 'PyDictObj' | t.CPtr: pass
    @staticmethod
    def new() -> 'PyDictObj' | t.CPtr: pass
    def __getitem__(self: PyDictObj, key: PyObject | t.CPtr) -> PyObject | t.CPtr: pass
    def __setitem__(self: PyDictObj, key: PyObject | t.CPtr, val: PyObject | t.CPtr) -> t.CInt: pass
    def __len__(self: PyDictObj) -> t.CSizeT: pass
    def get_string(self: PyDictObj, key: t.CChar | t.CPtr) -> PyObject | t.CPtr: pass
    def set_string(self: PyDictObj, key: t.CChar | t.CPtr, val: PyObject | t.CPtr) -> t.CInt: pass
    def dec_ref(self: PyDictObj) -> t.CInt: pass