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

Uploaded CPython 3.10+Windows ARM64

pact_python_ffi-0.5.4.0-cp310-abi3-win_amd64.whl (13.3 MB view details)

Uploaded CPython 3.10+Windows x86-64

pact_python_ffi-0.5.4.0-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.0-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.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.4.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.4.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.4.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.4.0.tar.gz.

File metadata

  • Download URL: pact_python_ffi-0.5.4.0.tar.gz
  • Upload date:
  • Size: 43.7 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.0.tar.gz
Algorithm Hash digest
SHA256 dd0d4eeab8fc183800bce0f499a90d1b8306b2f3122f95ab0c34d6dd1f066986
MD5 eb3d1525f60e9dff9b800bbf2fe03a98
BLAKE2b-256 a085199a6d800563bbf6402b93d29b10542d2b0b70a07aa6e7a6c7b7382b48ac

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 94876f6a5a19b2f66214dcdd793ce7c911b88649dfabb98fddfcb10e40fed740
MD5 79dd34fb1283d0d322341c2287fc86dd
BLAKE2b-256 3d1abbdb8ddf844b58dc6cb76c8ab0e27f965e3633d5fbc956d5f76a2296a8c3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 192761cc8a668e08b189f517417cdb71b846da09b20812fac9d690d7b9a5b152
MD5 46cb302a60879eee1275337d5c399382
BLAKE2b-256 4af425e676f4414102dc3852ccc0aab894e91e8a627b6cc463686523064b527c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 3afddaf461df078f94256157993680ea2bcbc8be215499bd2f54c3aa2f54afd3
MD5 2b5f0be508925a4d5fe8b7d5b73ed147
BLAKE2b-256 aa146fb062da39c3277a28727a41eeea3f5f9f88ca332f867f850da20bd2d6d9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 563ed5af2e61fae9d2f9d3704056f0ac93d581174815433ee94eff60d7d63fc5
MD5 2aaa24aca470aa933522951051fa1dbf
BLAKE2b-256 a07b91e436dc1b5b12aacccb1c8b24b7453afe9e54b76d3e4d8d009d6774bc8c

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.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.4.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.4.0-cp310-abi3-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0f7b34209976695551bd630a642f775cfb7b4bd510a1f03a658ec701e2a620d3
MD5 837841c80d2f77d3864524401e13933d
BLAKE2b-256 1a141b898aca91cd2d59cc8ae8142f519df4131f250ca13edad678693d09e5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.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.4.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.4.0-cp310-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 42238b9c2f96e541733f766fb1975e63f90b71dad7353ae6b1d8ba972f69f424
MD5 4d360224fa1708689dcc44fba56f7de0
BLAKE2b-256 ada9e0aceaa45a0b58a57d4bb0319d841f1215805f5e4775727a20d7dd1967a1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-macosx_12_0_x86_64.whl
Algorithm Hash digest
SHA256 7b90c0b5b17b70852b17fa1321d46a3272c9fd7fae7cf6dff2f3610dd6b30251
MD5 8c923eb2d906c3f6647c1f75b0629871
BLAKE2b-256 c460cb32cd3473af25bcd8766644bb98995916eed5a0928cd35ba1bc2da6423a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for pact_python_ffi-0.5.4.0-cp310-abi3-macosx_12_0_arm64.whl
Algorithm Hash digest
SHA256 64ca6ff1b6054cc233e9543e6976609ad32e415ade993855cf4f167741c2b753
MD5 d2b06819342f3bf27d801d5246170b17
BLAKE2b-256 ed7c4c09c720a7b1c5842c7c4ffb6442170b901074fb1617227851014f6a5994

See more details on using hashes here.

Provenance

The following attestation bundles were made for pact_python_ffi-0.5.4.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