--- id: pact-python-ffi version: "0.5.4.1" license: MIT license_treatment: permissive maintenance: active --- # pact-python-ffi — Python bindings for the Pact FFI library License: permissive · Maintenance: active · Downloads: 1.4M/mo ## 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 above — verify before relying. Provides direct Python bindings to the Pact FFI (Foreign Function Interface), exposing low-level C API functions for contract testing without higher-level abstraction. 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 pip install pact-python-ffi uv add pact-python-ffi poetry add pact-python-ffi ## Installing pact-python-ffi 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. 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 Requires Python ≥3.10. Binary wheels are platform-specific; installation pulls the appropriate wheel for your OS and architecture. 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_current - Install friction: medium - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags pact ffi python bindings, contract testing low-level api, pact c interface wrapper, ffi bindings for pact, advanced pact testing, contract testing framework, pact foreign function interface, ffi-bindings, contract-testing, low-level-api [View on SkillFed](https://skillfed.io/packages/pact-python-ffi) · [View on PyPI](https://pypi.org/project/pact-python-ffi/)