---
title: "cffi | pypx"
description: "Foreign Function Interface for Python calling C code."
canonical_url: "https://pypx.app/packages/cffi"
meta:
  "og:description": "Foreign Function Interface for Python calling C code."
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_cffi%2Cversion_2.1.1%2Csummary_Foreign%2BFunction%2BInterface%2Bfor%2BPython%2Bcalling%2BC%2Bcode.%2Clicense_MIT-0%2Cp_Ii9wYWNrYWdlcy9jZmZpIg%2Cs_N34r8r5T9Z3oawsu.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "cffi 2.1.1"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_cffi%2Cversion_2.1.1%2Csummary_Foreign%2BFunction%2BInterface%2Bfor%2BPython%2Bcalling%2BC%2Bcode.%2Clicense_MIT-0%2Cp_Ii9wYWNrYWdlcy9jZmZpIg%2Cs_N34r8r5T9Z3oawsu.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **cffi**

v2.1.1

Foreign Function Interface for Python calling C code.

170 KB Python 3.10+ platform-specificMIT-01 deps

[**Diff **](https://pypx.app/packages/cffi/diff)

`$ uv add cffi`

[![GitHub Actions Status](https://github.com/python-cffi/cffi/actions/workflows/ci.yaml/badge.svg?branch=main)](https://github.com/python-cffi/cffi/actions/workflows/ci.yaml?query=branch%3Amain++) [![PyPI version](https://img.shields.io/pypi/v/cffi.svg)](https://pypi.org/project/cffi) [![Read the Docs](https://img.shields.io/badge/docs-latest-blue.svg)](http://cffi.readthedocs.org/)

# CFFI

Foreign Function Interface for Python calling C code.

Please see the [Documentation](http://cffi.readthedocs.org/) or uncompiled in the `doc/` subdirectory.

## Download

[Download page](https://github.com/python-cffi/cffi/releases)

## Source Code

Source code is publicly available on [GitHub](https://github.com/python-cffi/cffi).

## Contact

[Mailing list](https://groups.google.com/forum/#!forum/python-cffi)

## 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/
```

## **Details **

<dl>

<dt>Version</dt>
<dd>2.1.1</dd>

<dt>License</dt>
<dd>MIT-0</dd>

<dt>Python</dt>
<dd>&gt;=3.10</dd>

<dt>Maintainer</dt>
<dd>Armin Rigo, Maciej Fijalkowski</dd></dl>

## **Links**

- [Changelog](https://cffi.readthedocs.io/en/latest/whatsnew.html)
- [Contact](https://groups.google.com/forum/#!forum/python-cffi)
- [Documentation](https://cffi.readthedocs.io/)
- [Download](https://github.com/python-cffi/cffi/releases)
- [Issue Tracker](https://github.com/python-cffi/cffi/issues)
- [Source Code](https://github.com/python-cffi/cffi)
- [View on PyPI](https://pypi.org/project/cffi/)

## **Release Cadence **

**2**

releases in the past year

avg 65 days between releases

## **Platforms **

linuxarm64mac-x86mac-armwinmusl

## **Maintainers **

- Armin Rigo
- Maciej Fijalkowski

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/cffi#webpage","@type":"WebPage","description":"Foreign Function Interface for Python calling C code.","name":"cffi","url":"https://pypx.app/packages/cffi","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/cffi"]}]},{"@id":"https://pypx.app/packages/cffi#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Foreign Function Interface for Python calling C code.","license":"MIT-0","name":"cffi","softwareVersion":"2.1.1"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
