Pact Python FFI
This sub-package is part of the Pact Python project and exists to expose the Pact FFI directly to Python. If you are looking for the main Pact Python library for contract testing, please see the root package.
Overview
- The module provides a thin Python wrapper around the Pact FFI (C API).
- Most classes correspond directly to structs from the FFI, and are designed to wrap the underlying C pointers.
- Many classes implement the
__del__method to ensure memory allocated by the Rust library is freed when the Python object is destroyed, preventing memory leaks. - Functions from the FFI are exposed directly: if a function
fooexists in the FFI, it is accessible aspact_ffi.foo. - The API is not guaranteed to be stable and is intended for use by advanced users or for building higher-level libraries. For typical contract testing, use the main Pact Python client library.
Installation
You can install this package via pip:
pip install pact-python-ffi
Usage
This package exposes the raw FFI bindings for Pact. It is suitable for advanced use cases, custom integrations, or for building higher-level libraries. For typical contract testing, prefer using the main Pact Python library.
Contributing
As this is a relatively thin wrapper around the Pact FFI, the code is unlikely to change frequently; however, contributions to improve the coverage of the FFI bindings or to improve existing functionality are welcome. See the main contributing guide for details.
To release a new version of pact-python-ffi, simply push a tag in the format pact-python-ffi/x.y.z.w. This will automatically trigger a release process, pulling in version x.y.z of the underlying Pact FFI. Before creating and pushing such a tag, please ensure that the Python wrapper has been updated to reflect any changes or updates in the corresponding FFI version.
Higher-level abstractions or utilities should be implemented in separate libraries (such as pact-python).
For questions or support, please visit the Pact Foundation Slack or GitHub Discussions
Metadata
Release files for pact-python-ffi 0.5.8.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pact_python_ffi-0.5.8.0.tar.gz | 45.6 kB | Details |
Built distributions (wheels)
Total release size: 83.3 MB
Release files / pact_python_ffi-0.5.8.0.tar.gz
| Download URL | pact_python_ffi-0.5.8.0.tar.gz |
|---|---|
| Size | 45.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e5662b069b744c031b4ab156c31eedff606dca21671f3eee7512839eda081db2
|
|
BLAKE2b-256 checksum How to use checksums |
1aadf50473c24d232fc840c5450fc42fabf99728e36c55ae6a8e25061d5b66d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-win_arm64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-win_arm64.whl |
|---|---|
| Size | 11.8 MB |
| Tags | CPython 3.10 Windows ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8f26757e67a7289f9f494672354461d7b1ce552cbc0dc7f0d9698ad738dadf50
|
|
BLAKE2b-256 checksum How to use checksums |
8a252218aa7eeed075ecb864c96a25d9c5f9e62ef7af9a55f2540057242d3934
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-win_amd64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 12.5 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
339fa5af42b45a9a1b831f2930199bcf45939d7b621a033dd64ef664bb50fca7
|
|
BLAKE2b-256 checksum How to use checksums |
eb9528858c31f8a75550badf4fd3c153aae830cdedd3cd388f0e472adb690a49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 16.2 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
f18c0fa26f4e1a581d28d9c565a30e01facee9218ddc4a6362ec06308b71ee1e
|
|
BLAKE2b-256 checksum How to use checksums |
7f62243cbb47ff15ff795d8aad3acd275026cdf78461003f4c3b7b6a57af67f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 17.0 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a9b616db4ee43078a9d1cff4ca7adda689921164460ed2aea06995c5a9506899
|
|
BLAKE2b-256 checksum How to use checksums |
bea2cf93aced002b506ee98e79bbbaf19c3aa14e1bc6af56017f2778dde51238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 7.1 MB |
| Tags | CPython 3.10 Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
37b83117efcb5f1f1ea1a118e43a48f149a9b22638afa1ee04badf721ca27b14
|
|
BLAKE2b-256 checksum How to use checksums |
9a47af709b95674ec5b69c4a2bcae793801ed156f1d6016e76e21f1cb4ed8f03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl |
|---|---|
| Size | 6.8 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
11bc6f9f691ccc9c410ca4b44c0a6ac51e8d6954d548d3e1b79f300c5955d3a8
|
|
BLAKE2b-256 checksum How to use checksums |
3b6f056f5e5b8d4cfebda9914c74ecefc138e5ba6eb3c9b22a0a067e2baa1fd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-macosx_12_0_x86_64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-macosx_12_0_x86_64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.10 abi3 macOS 12.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
7b194302c781049d91ec8db6099d0ed50997dd5344a042b4ceacae552b2ed1b6
|
|
BLAKE2b-256 checksum How to use checksums |
f798f64543cf6e1747851d2dfd1baa1f47cfed8a9b895f4ceccbdf1013a6a3ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency logRelease files / pact_python_ffi-0.5.8.0-cp310-abi3-macosx_12_0_arm64.whl
| Download URL | pact_python_ffi-0.5.8.0-cp310-abi3-macosx_12_0_arm64.whl |
|---|---|
| Size | 5.8 MB |
| Tags | CPython 3.10 abi3 macOS 12.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3ea0f44793e918006376b0f15ed6a1520dfa2bbbbafd9185f55b0b13fb2c14d9
|
|
BLAKE2b-256 checksum How to use checksums |
6f1ed963a0aec0655050f28794a23ecccca69c46daf533f5e830830d202e976d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.
Transparency log