Skip to main content

Pact Python FFI

[!NOTE]

This package provides direct access to the Pact Foreign Function Interface (FFI) with minimal abstraction. It is intended for advanced users who need low-level control over Pact operations in Python.

Package Version Python Versions Downloads
CI/CD Test Status Build Status Build Status
Meta Hatch project linting - Ruff style - Ruff types - Mypy License
Community Issues Discussions GitHub Stars
Slack Stack Overflow Twitter

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 foo exists in the FFI, it is accessible as pact_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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pact_python_ffi-0.5.4.1.tar.gz (43.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pact_python_ffi-0.5.4.1-cp310-abi3-win_arm64.whl (10.9 MB view details)

Uploaded CPython 3.10+Windows ARM64

pact_python_ffi-0.5.4.1-cp310-abi3-win_amd64.whl (11.6 MB view details)

Uploaded CPython 3.10+Windows x86-64

pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_x86_64.whl (14.3 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_aarch64.whl (15.0 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

pact_python_ffi-0.5.4.1-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (6.6 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pact_python_ffi-0.5.4.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (6.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64manylinux: glibc 2.28+ ARM64

pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_x86_64.whl (5.7 MB view details)

Uploaded CPython 3.10+macOS 12.0+ x86-64

pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_arm64.whl (5.5 MB view details)

Uploaded CPython 3.10+macOS 12.0+ ARM64

File details

Details for the file pact_python_ffi-0.5.4.1.tar.gz.

File metadata

  • Download URL: pact_python_ffi-0.5.4.1.tar.gz
  • Upload date:
  • Size: 43.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for pact_python_ffi-0.5.4.1.tar.gz
Algorithm Hash digest
SHA256 375eec4c604f85bffd60728feaf7f511ea81c612a4ea05ee45bae392f1e96d58
MD5 1b8e3c7a2392adf3db81f9803b446497
BLAKE2b-256 46e446f3e9be515c0452d37b35a04dd0becd56f29e6121cff92bcbb4dc9feada

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1.tar.gz:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 bacc6f3eb0939091cdc5f3872bef93b4d7a2154f4ccd23559686eef83e20e415
MD5 8d4bfa6a01b7207ebea5ff45cc2e5140
BLAKE2b-256 7bed03ba96f25a47f5274fb724ea91ced7ba5a9fde10bd0a0310ac6d01ab1a2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-win_arm64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 346c69b325f7699d2979c5ee8b51af7eca44ebe0115b4f54fdb13c03b1ad6a97
MD5 feead8c1df7c03aaf308202f1b3bdada
BLAKE2b-256 24062c07f0e1f78f817746f07fae455dc5a999500b640c1147d608a700438142

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-win_amd64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 11ae1f28c2f4a03d4f116c1f449ec743b6ed2555cddf6a66075141118dc1a9b3
MD5 524c216c483b2b727cdbcf5881931972
BLAKE2b-256 7c7d3144453392667b5143a8b8c4f9c4d45be6057572e2abfef6b3c0b99d0995

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_x86_64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 3753df1debd4ec91e8a34d8b1c542b681ed5bc7e9d2c161557f86418bbc372d2
MD5 28deac84cf33cfbf54aa567a6eeaa277
BLAKE2b-256 85f92b0ef9b07a0de5833eb6d46905e8d1564b493024beed028c363a558597f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-musllinux_1_2_aarch64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18e5cfa9121d75a6f2a54624f7c45d451f468b7ad0d0082afb5688d598d12db1
MD5 84753f35c4392e51e064b17ce1486963
BLAKE2b-256 4dbe72f454650eb97afad9fbff9f9f3118e0e6a8ae4d883874c8475cd17a5964

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 383d6c4e6ec41d37b3b52d1a3058c0754e959d749183e8b647d9dfadfa7e57a5
MD5 ef02f3ce3eccdbc58e48299c800a9e03
BLAKE2b-256 84ccf951b2d5742f121364c29d4b9585b9a754e1af8fc2219bade838739e7f11

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 37f39846be87db7f05622b5cf7e1990a7921c752c7ec3aebcad56859ade66f63
MD5 a60b6fc99cda4f24120eb321730ceb10
BLAKE2b-256 15d60649a3231f2d8b0ee343a16b2600cd235afd5cae24cb10f1c31123d57797

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_x86_64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 7a76c5aaafe8678fea0c9c640662c1fe988556c6a6b84c57fd2821c57689acf4
MD5 51c1e265b3d8279948367af9a19d7e55
BLAKE2b-256 8d40c31bde98525f3776181ddd62b8da8d2aae729597a5a70a551c603e8bb6b0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.1-cp310-abi3-macosx_12_0_arm64.whl:

Publisher: release-ffi.yml on pact-foundation/pact-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page