CFFI documentation¶
C Foreign Function Interface for Python. Interact with almost any C code from Python, based on C-like declarations that you can often copy-paste from header files or documentation.
- Goals
- Comments and bugs
- What’s New
- Installation and Status
- Overview
- Using the ffi/lib objects
- CFFI Reference
- Preparing and Distributing modules
- ffi/ffibuilder.cdef(): declaring types and functions
- ffi.dlopen(): loading libraries in ABI mode
- ffibuilder.set_source(): preparing out-of-line modules
- Letting the C compiler fill the gaps
- ffibuilder.compile() etc.: compiling out-of-line modules
- ffi/ffibuilder.include(): combining multiple CFFI interfaces
- ffi.cdef() limitations
- Debugging dlopen’ed C libraries
- ffi.verify(): in-line API-mode
- Upgrading from CFFI 0.9 to CFFI 1.0
- Using CFFI for embedding