A Foreign Function Interface package for calling C libraries from Python. https://cffi.readthedocs.io/en/latest/
Find a file
Christian Clauss 519949a47c
Some checks failed
CFFI CI / merge_artifacts (push) Has been cancelled
CFFI CI / python_sdist (push) Has been cancelled
CFFI CI / make_linux_matrix (push) Has been cancelled
CFFI CI / make_macos_matrix (push) Has been cancelled
CFFI CI / make_windows_matrix (push) Has been cancelled
CFFI CI / make_ios_matrix (push) Has been cancelled
CFFI CI / make_run_parallel_matrix (push) Has been cancelled
CFFI CI / clang_TSAN (push) Has been cancelled
CFFI CI / linux (push) Has been cancelled
CFFI CI / macos (push) Has been cancelled
CFFI CI / windows (push) Has been cancelled
CFFI CI / ios (push) Has been cancelled
CFFI CI / pytest-run-parallel (push) Has been cancelled
CFFI CI / check (push) Has been cancelled
GitHub Actions: macOS 13 runner image is closing down
2025-12-01 12:34:22 +02:00
.github GitHub Actions: macOS 13 runner image is closing down 2025-12-01 12:34:22 +02:00
demo Fix undefined names in Python code (#99) 2024-07-26 17:10:51 +02:00
doc BLD: catch the rest of the places the version is hard-coded 2025-12-01 09:33:48 +02:00
src BLD: catch the final (non-string) version of version 2025-12-01 09:33:48 +02:00
testing Migrate away from the "py" module 2025-12-01 09:30:15 +02:00
tools Add a tool to update release version numbers (#15) 2023-09-28 09:55:11 -07:00
.gitignore prepare for 1.16.0rc1 2023-09-25 10:09:20 -07:00
.readthedocs.yaml Add this, see https://blog.readthedocs.com/migrate-configuration-v2/ 2023-06-14 14:17:39 +02:00
AUTHORS Add my employer in AUTHORS 2016-04-23 22:10:16 +02:00
LICENSE Change the license from MIT to MIT-no-attribution, which is the same without the line that says "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software." 2025-06-25 08:44:53 +03:00
MANIFEST.in move project sources to src/ subdir (#12) 2023-09-25 21:49:44 -07:00
pyproject.toml Prefer well-known labels 2025-12-01 11:04:25 +02:00
README.md doc: update test commands in Section Testing/development tips (#158) 2025-03-09 09:59:46 +00:00
setup.py Add support for the free-threaded build (#178) 2025-07-28 10:42:03 -07:00
setup_base.py test for pushing to heptapod 2020-11-28 15:29:35 +01:00
suppressions_free_threading.txt Add support for the free-threaded build (#178) 2025-07-28 10:42:03 -07:00

GitHub Actions Status PyPI version Read the Docs

CFFI

Foreign Function Interface for Python calling C code.

Please see the Documentation or uncompiled in the doc/ subdirectory.

Download

Download page

Source Code

Source code is publicly available on GitHub.

Contact

Mailing list

Testing/development tips

After git clone or wget && tar, we will get a directory called cffi or cffi-x.x.x. we call it repo-directory. To run tests under CPython, run the following in the repo-directory:

pip install pytest
pip install -e .  # editable install of CFFI for local development
pytest src/c/ testing/