pact-python-ffi
Python bindings for the Pact FFI library
Decision gist · record as of 2026-08-14
Yes, if you are an advanced user or library author building on Pact and need direct FFI access. No, if you are doing standard contract testing—use the main Pact Python library instead. Active maintenance, no known vulnerabilities, permissive license, and broad platform support make it safe to adopt for its intended use case.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python ≥3.10.
- Binary wheels are platform-specific; installation pulls the appropriate wheel for your OS and architecture.
- Medium install friction due to platform-specific binary wheels across macOS, Linux, Windows, and ARM variants.
License · maintenance · safety
MIT (permissive) — MIT license (permissive). No restrictions on commercial or private use; attribution required.
last release 2026-07-08 (37 days) · last repo commit 2026-08-13 · 677 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,434,855 downloads/mo, #3,901 on PyPI
Alternatives
Verify before relying
pip install pact-python-ffi
import pact_python_ffi
# Access FFI functions directly- Stability guarantees for the FFI API surface across minor/patch versions.
- Performance characteristics or overhead of the wrapper layer compared to direct usage.
- Compatibility with the main pact-python library when both are used together.
What it is and what it does
pact-python-ffi is a thin Python wrapper around the Pact FFI, a C API exposed by the Pact reference implementation. It provides direct access to low-level Pact operations for developers who need fine-grained control or are building higher-level libraries. Most classes wrap C pointers directly and implement `__del__` methods to manage memory allocated by the underlying library, preventing leaks.
The package is intended for advanced users and library authors rather than typical contract-testing workflows. Functions from the FFI are exposed directly as module-level callables; the API is not guaranteed stable. For standard contract testing, the main Pact Python library is recommended instead.
Use it for
- Building custom higher-level abstractions or domain-specific testing frameworks on top of the raw FFI.
- Integrating contract testing into specialized CI/CD or testing orchestration systems requiring low-level control.
- Accessing FFI functionality not yet exposed by higher-level libraries.
- Advanced debugging or introspection of Pact operations at the C API level.
- Porting or adapting FFI bindings from other languages to Python-based toolchains.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are an advanced user or library author building on Pact and need direct FFI access.
No, if you are doing standard contract testing—use the main Pact Python library instead. Active maintenance, no known vulnerabilities, permissive license, and broad platform support make it safe to adopt for its intended use case.
Install
pact-python-ffi on PyPI
Before you install
Medium install friction due to platform-specific binary wheels across macOS, Linux, Windows, and ARM variants. Active maintenance with recent release; last commit 2026-08-13. Supports Python 3.10–3.14.
Requires Python ≥3.10. Binary wheels are platform-specific; installation pulls the appropriate wheel for your OS and architecture.
License in practice
MIT license (permissive). No restrictions on commercial or private use; attribution required.
Quickstart
pip install pact-python-ffi
import pact_python_ffi
# Access FFI functions directly
Verify before relying
- Stability guarantees for the FFI API surface across minor/patch versions.
- Performance characteristics or overhead of the wrapper layer compared to direct usage.
- Compatibility with the main pact-python library when both are used together.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Medium. Platform-specific wheel |
| Runtime dependencies | 1 packagecffi |
| Maintenance | Actively maintained 37 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,434,855 / month, #3,901 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Testing |
Evidence: pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_arm64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_x86_64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_aarch64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_x86_64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-win_amd64.whl; pact_python_ffi-0.5.4.1-cp310-abi3-win_arm64.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 › “pact ffi python bindings”
- pact-python-ffiProvides direct Python bindings to the Pact FFI (Foreign Function…
- pact-pythonPact Python implements consumer-driven contract testing for APIs and…
- ctypesgenctypesgen parses C header files and automatically generates Python…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also pact-python · argon2-cffi-bindings · pemja · apache-tvm-ffi · cffi · anchorpy-core · hip-python · python-interface · deal · github-copilot-sdk