Python/C API Reference Manual¶
This manual documents the API used by C and C++ programmers who want to write extension modules or embed Python. It is a companion to Extending and Embedding the Python Interpreter, which describes the general principles of extension writing but does not document the API functions in detail.
- Introduction
- C API Stability
- The Very High Level Layer
Py_Main()Py_BytesMain()PyRun_AnyFile()PyRun_AnyFileFlags()PyRun_AnyFileEx()PyRun_AnyFileExFlags()PyRun_SimpleString()PyRun_SimpleStringFlags()PyRun_SimpleFile()PyRun_SimpleFileEx()PyRun_SimpleFileExFlags()PyRun_InteractiveOne()PyRun_InteractiveOneFlags()PyRun_InteractiveLoop()PyRun_InteractiveLoopFlags()PyOS_InputHookPyOS_ReadlineFunctionPointerPyRun_String()PyRun_StringFlags()PyRun_File()PyRun_FileEx()PyRun_FileFlags()PyRun_FileExFlags()Py_CompileString()Py_CompileStringFlags()Py_CompileStringObject()Py_CompileStringExFlags()PyEval_EvalCode()PyEval_EvalCodeEx()PyFrameObjectPyEval_EvalFrame()PyEval_EvalFrameEx()PyEval_MergeCompilerFlags()Py_eval_inputPy_file_inputPy_single_inputPyCompilerFlagsCO_FUTURE_DIVISION
- Reference Counting
- Exception Handling
- Utilities
- Abstract Objects Layer
- Concrete Objects Layer
- Initialization, Finalization, and Threads
- Before Python Initialization
- Global configuration variables
- Initializing and finalizing the interpreter
- Process-wide parameters
- Thread State and the Global Interpreter Lock
- Sub-interpreter support
- Asynchronous Notifications
- Profiling and Tracing
- Advanced Debugger Support
- Thread Local Storage Support
- Python Initialization Configuration
- Memory Management
- Object Implementation Support
- API and ABI Versioning