CFFI
latest
  • Goals
  • Comments and bugs
  • What’s New
  • Installation and Status
  • Overview
  • Using the ffi/lib objects
  • CFFI Reference
  • Preparing and Distributing modules
  • Using CFFI for embedding
CFFI
  • Docs »
  • CFFI documentation
  • View page source

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
    • v1.15.1
    • v1.15.0
    • v1.14.6
    • v1.14.5
    • v1.14.4
    • v1.14.3
    • v1.14.2
    • v1.14.1
    • v1.14
    • v1.13.2
    • v1.13.1
    • v1.13
    • Older Versions
  • Installation and Status
    • Platform-specific instructions
  • Overview
    • Main mode of usage
    • Other CFFI modes
    • Embedding
    • What actually happened?
    • ABI versus API
  • Using the ffi/lib objects
    • Working with pointers, structures and arrays
    • Python 3 support
    • An example of calling a main-like thing
    • Function calls
    • Variadic function calls
    • Memory pressure (PyPy)
    • Extern “Python” (new-style callbacks)
    • Callbacks (old style)
    • Windows: calling conventions
    • FFI Interface
  • CFFI Reference
    • FFI Interface
    • Conversions
  • 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
    • Usage
    • More reading
    • Troubleshooting
    • Issues about using the .so
    • Using multiple CFFI-made DLLs
    • Multithreading
    • Testing
    • Embedding and Extending
Next

© Copyright 2012-2018, Armin Rigo, Maciej Fijalkowski Revision 78c880fa3e16.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
release-1.9
release-1.8
release-1.7
release-1.6
release-1.5
release-1.4
release-1.3
release-1.2
release-1.15
release-1.14
release-1.13
release-1.12
release-1.11
release-1.10
release-1.1
release-1.0
release-0.9
release-0.8
release-0.7
release-0.6
release-0.5
Downloads
pdf
html
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.