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.4.28.2.tar.gz (46.6 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.4.28.2-cp310-abi3-win_arm64.whl (11.9 MB view details)

Uploaded CPython 3.10+Windows ARM64

pact_python_ffi-0.4.28.2-cp310-abi3-win_amd64.whl (12.7 MB view details)

Uploaded CPython 3.10+Windows x86-64

pact_python_ffi-0.4.28.2-cp310-abi3-musllinux_1_2_x86_64.whl (15.6 MB view details)

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

pact_python_ffi-0.4.28.2-cp310-abi3-musllinux_1_2_aarch64.whl (16.4 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

pact_python_ffi-0.4.28.2-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (7.3 MB view details)

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

pact_python_ffi-0.4.28.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (7.0 MB view details)

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

pact_python_ffi-0.4.28.2-cp310-abi3-macosx_12_0_x86_64.whl (6.3 MB view details)

Uploaded CPython 3.10+macOS 12.0+ x86-64

pact_python_ffi-0.4.28.2-cp310-abi3-macosx_12_0_arm64.whl (6.1 MB view details)

Uploaded CPython 3.10+macOS 12.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for pact_python_ffi-0.4.28.2.tar.gz
Algorithm Hash digest
SHA256 fd961d58f95add48db3235bd49c631bcdc36e71fd01a5eea458f58e1a6b8029c
MD5 7f0979d93e3aeb9e1536b249cf510481
BLAKE2b-256 92f7171d4e478254fb3458873af5cf59524bf546cf09f8e57c04b1ca0c1b7cb0

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 b515cae612da0ed8bf538290502ab20686211815d48064a0a0cd05fa6a343583
MD5 9efced54ee6d46faf4e12969b38a5b53
BLAKE2b-256 51fb8df51b290b918d37ad75310d3b4458131ba9a4a76425d186b780ce36de5a

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 3e5e24772270da78efbd430af369fb487371a712375f8db98eb9445045ea42bc
MD5 2a2f7a984e73db621bed78a8120b85cd
BLAKE2b-256 df0a411748c68d66d16c0d8ecf99008ab364a974b21b9d9f3d60e4118fb94124

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 28d81cabb1a3d40b0de69feee140e062b2b4b06aaa74cdd053dd0f6bfcdfeb6b
MD5 167a6e7c5df759835b840447109e11e7
BLAKE2b-256 2e540ab87f204e07efe437f4c610219fbbe14c2e6436f09f57505491381746d3

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 e50b258660f1e5d708462725cc66ea53804add0102d3b8d017f38061dc47cf88
MD5 40204a7a9450e95067b768074d7eac04
BLAKE2b-256 36b6cd4cb183305c81513a9c4c583802ba1651af19b422a265a8d747e1157aac

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fb4c1417aa575331717204a4ef46c5df9bb7d30a457951834404fb59bcb75c69
MD5 829f1c85653c2dfe30ca35e369acd8c7
BLAKE2b-256 91a4de7610041d88a20db37199db9fe2c6c444cf4aead878adbc77d899ce4810

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 08d75a86fc0afb6198e7f9841c174e6e882102209fcc7a47f45724e975709349
MD5 5914cef1665bd1909f8cf9fbd8f02caf
BLAKE2b-256 c686d36eb4efe291c4556e216f5f12e30153e756457bde85c238168d9c4b805d

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-macosx_12_0_x86_64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 607c331a0decafe93d06286ed6ca37de0a01be460830b39b32fa0138eb804e44
MD5 2b147da7b809dbb7f5003e1eedd58ed5
BLAKE2b-256 326806f51c484e9023404afda63ac0d7bc2aed985048e07d0177ae2560a5de63

See more details on using hashes here.

Provenance

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

Publisher: build-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.4.28.2-cp310-abi3-macosx_12_0_arm64.whl.

File metadata

File hashes

Hashes for pact_python_ffi-0.4.28.2-cp310-abi3-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 32b7a2fcc107007c7c49509f028dceef3677b700bc92f65482685ff45fab6e98
MD5 66a4532c5a11a0fac348f01c60a39934
BLAKE2b-256 39d642500a35261bf8a87952a76f647a65fb11c40c03050a29e52fb1a77b3467

See more details on using hashes here.

Provenance

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

Publisher: build-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