types-cffi
Typing stubs for cffi
Decision gist · record as of 2026-08-14
Yes, if you use cffi and want static type checking. Install it as a dev dependency alongside cffi to enable type checkers to validate your C bindings. No runtime overhead; purely a type-checking aid. No known vulnerabilities.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >=3.10.
- Only useful when used alongside a type checker (mypy, pyright, etc.) in your development workflow.
- Low friction install as a pure-Python wheel.
License · maintenance · safety
Apache-2.0 (permissive) — Apache-2.0 permissive license allows use in most projects without significant restrictions.
last release 2026-05-18 (88 days) · last repo commit 2026-08-14 · 37 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 20,698,785 downloads/mo, #1,028 on PyPI
Alternatives
Verify before relying
pip install types-cffi
# In your code, import cffi normally; type checkers will use the stubs
import cffi
ffi = cffi.FFI()- Whether type coverage is complete for all cffi 2.0.* APIs or if gaps remain
- Compatibility with type checkers other than mypy 2.1.0 and pyright 1.1.409
What it is and what it does
types-cffi is a type stub package that bridges the gap between cffi and Python's static type checkers. It provides type annotations for the cffi library so that tools like mypy and pyright can understand and validate code that uses cffi to call C functions from Python. The stubs are maintained as part of the typeshed project and target cffi version 2.0.*.
This package is not a runtime dependency of your application—it's a development-time tool that helps catch type errors during static analysis. You install it alongside cffi, and your type checker automatically uses it when analyzing code. It requires Python >=3.10 and has been tested with mypy 2.1.0 and pyright 1.1.409.
Use it for
- Enable mypy or pyright to type-check code that calls cffi functions and classes
- Catch type errors in cffi bindings before runtime in CI/CD pipelines
- Provide IDE autocomplete and type hints for cffi APIs in editors that support type stubs
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use cffi and want static type checking.
Install it as a dev dependency alongside cffi to enable type checkers to validate your C bindings. No runtime overhead; purely a type-checking aid. No known vulnerabilities.
Install
types-cffi on PyPI
Before you install
Low friction install as a pure-Python wheel. Actively maintained through typeshed; last commit 2026-08-14 and release 88 days ago indicate current upkeep.
Requires Python >=3.10. Only useful when used alongside a type checker (mypy, pyright, etc.) in your development workflow.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restrictions.
Quickstart
pip install types-cffi
# In your code, import cffi normally; type checkers will use the stubs
import cffi
ffi = cffi.FFI()
Verify before relying
- Whether type coverage is complete for all cffi 2.0.* APIs or if gaps remain
- Compatibility with type checkers other than mypy 2.1.0 and pyright 1.1.409
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetypes-setuptools |
| Maintenance | Actively maintained 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 20,698,785 / month, #1,028 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Programming Language :: Python :: 3Typing :: Stubs Only |
Evidence: types_cffi-2.0.0.20260518-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “type stubs cffi”
- types-cffiProvides type stubs for the cffi package, enabling static type…
- cffiCFFI enables Python code to call C functions directly by parsing C…
- brotlicffiProvides Python CFFI bindings to the Brotli compression library,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also cffi · types-assertpy · types-greenlet · types-protobuf · types-vobject · types-mock · types-aiofiles · types-pyflakes · types-PySocks · types-polib