Skip to main content

Python bindings for the Pact FFI library

Project description

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


Project details


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.3.0.tar.gz (43.3 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.3.0-cp310-abi3-win_arm64.whl (10.9 MB view details)

Uploaded CPython 3.10+Windows ARM64

pact_python_ffi-0.5.3.0-cp310-abi3-win_amd64.whl (13.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

pact_python_ffi-0.5.3.0-cp310-abi3-musllinux_1_2_x86_64.whl (14.4 MB view details)

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

pact_python_ffi-0.5.3.0-cp310-abi3-musllinux_1_2_aarch64.whl (15.1 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

pact_python_ffi-0.5.3.0-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.3.0-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.3.0-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.3.0-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.3.0.tar.gz.

File metadata

  • Download URL: pact_python_ffi-0.5.3.0.tar.gz
  • Upload date:
  • Size: 43.3 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.3.0.tar.gz
Algorithm Hash digest
SHA256 5ed278138580b8fe1bcf5b1e39ab14910c6078c80c5434ab726ad6c0c411a52b
MD5 a27a53b4ab109cc9f83051d5b8b21e9f
BLAKE2b-256 eedbeebfb8c13d888e47af2a6f1256fa022f1df85eff6824ea464b2c7e112146

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0.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.3.0-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 7e967265209675b03508d70fbf6d76599ea9942761987efefbacd95fd0298ecd
MD5 a2917c6c4cb21bbc03f7990478dd3610
BLAKE2b-256 587f328945f22d914d352ca8fb6886c246b6265c7ea93d24ed8aa44fe2ae788e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 9f0a026f1884fd424df6e72533b398fcc9d49c9542b7efe452ad54d05f0efeb7
MD5 64cfc2f66152065d12bd13495484f0da
BLAKE2b-256 c63bf9f864aef19b8e89795cc6e2daf27134fde818aae51367dce5f73b3b331b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 17c29dbe0eaaf48e204f577a9d9c011bd807cfce1829eb426b24a324f9e810e0
MD5 4a86da3d5f98d21d0510401d349d5def
BLAKE2b-256 f82fecb99a5399912a72a3cbe7502fca8b686a2a48d04455051e87c42b7db05e

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 cea651535ec4faf8fccc22ea9dc34351c8b66d828247b713e4ecffbd40966748
MD5 e32ff55f550a3f4bfdeb11ceb645744c
BLAKE2b-256 6c1817e9799a88c59708c57ea3cfb0b7e0540b1924195a84f2fea69abd8b9d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 501be4d4ad8b9963c60e296ca318230787ab45f9b9f4ab66b051e710b5ac59b0
MD5 a2809e63f57b49ff053e4ef3cc5fd6c1
BLAKE2b-256 1c0f482612e5cda921d0184b8b74278d6d3f72d1f57f28d493cb2eb72be24b98

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8811c6056b6df33ed23b004a4efd03d72824e84c0bd0ec09eafdb1e50ff6e0d9
MD5 ce28e2ad4d8b38ff25295f2faf9eeae9
BLAKE2b-256 66c9f73c7f64b7aba1b7776d84c5d559f18df0dc73657da8694e29703e8e237b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 48e4947d0dc05e0b4f7b28e62784a4b8f7d94b1ffe03283707502fc8616d1e64
MD5 fce209d8a90c576614e727ecfe68e980
BLAKE2b-256 abd77731b2281e50c2aa3dba63e47610b25779d8fee1a487d4c667ba48a159fb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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.3.0-cp310-abi3-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.5.3.0-cp310-abi3-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 27b48bca1ee25eb612fc5cc674252b1608ba55e4d5cee8fdb529e7b2f50bc8a2
MD5 73361efb32e23b717f529801f2723c7e
BLAKE2b-256 5ea7c537f5ae303957baf578212650afb05703e605f89ca9e5c1e65605b9904b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.3.0-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 Pingdom Monitoring Sentry Error logging StatusPage Status page