pact-python 3.4.1


pip install pact-python

  Latest version

Released: Sep 17, 2026


Meta
Author: Joshua Ellis, Matthew Balvanz
Maintainer: Joshua Ellis
Requires Python: >=3.10

Classifiers

Development Status
  • 5 - Production/Stable

Environment
  • Console

Intended Audience
  • Developers

License
  • OSI Approved :: MIT License

Operating System
  • MacOS :: MacOS X
  • Microsoft :: Windows
  • POSIX :: Linux

Programming Language
  • Python
  • Python :: 3 :: Only
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: 3.14

Topic
  • Software Development :: Testing

Pact Python

Pact Python Mascot Fast, easy and reliable testing for your APIs and microservices.
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
Pact is the de-facto API contract testing tool. Replace expensive and brittle end-to-end integration tests with fast, reliable and easy to debug unit tests.
  • โšก Lightning fast
  • ๐ŸŽˆ Effortless full-stack integration testing - from the front-end to the back-end
  • ๐Ÿ”Œ Supports HTTP/REST and event-driven systems
  • ๐Ÿ› ๏ธ Configurable mock server
  • ๐Ÿ˜Œ Powerful matching rules prevents brittle tests
  • ๐Ÿค Integrates with Pact Broker / PactFlow for powerful CI/CD workflows
  • ๐Ÿ”ก Supports 12+ languages

Why use Pact? Contract testing with Pact lets you:

  • โšก Test locally
  • ๐Ÿš€ Deploy faster
  • โฌ‡๏ธ Reduce the lead time for change
  • ๐Ÿ’ฐ Reduce the cost of API integration testing
  • ๐Ÿ’ฅ Prevent breaking changes
  • ๐Ÿ”Ž Understand your system usage
  • ๐Ÿ“ƒ Document your APIs for free
  • ๐Ÿ—„ Remove the need for complex data fixtures
  • ๐Ÿคทโ€โ™‚๏ธ Reduce the reliance on complex test environments

Watch our series on the problems with end-to-end integrated tests, and how contract testing can help.

Documentation

This readme provides a high-level overview of the Pact Python library. For detailed documentation, please refer to the full Pact Python documentation. For a more general overview of Pact and the rest of the ecosystem, please refer to the Pact documentation.

Documentation for the API is generated from the docstrings in the code which you can view at pact-foundation.github.io/pact-python/pact.

Need Help

Installation

The latest version of Pact Python can be installed from PyPi:

pip install pact-python
# ๐Ÿš€ now write some tests!

Requirements

Pact Python tries to support all versions of Python that are still supported by the Python Software Foundation. Older version of Python may work, but are not officially supported.

In order to support the broadest range of use cases, Pact Python tries to impose the least restrictions on the versions of libraries that it uses.

Telemetry

In order to get better statistics as to who is using Pact, we collect some anonymous telemetry. The only things we record are your type of OS, and the version information for the package. No personally identifiable information is sent as part of this request. You can disable telemetry by setting the environment variable PACT_DO_NOT_TRACK=1:

Contributing

We welcome contributions to the Pact Python library in many forms. There are many ways to help, from writing code, to providing new examples, to writing documentation, to testing the library and providing feedback. For more information, see the contributing guide.

Table of contributors

3.4.1 Sep 17, 2026
3.4.0 May 04, 2026
3.3.1 Apr 22, 2026
3.3.0 Apr 17, 2026
3.2.1 Dec 10, 2025
3.2.0 Dec 02, 2025
3.1.0 Oct 07, 2025
3.0.1 Oct 06, 2025
3.0.0 Oct 06, 2025
3.0.0a1 Aug 12, 2025
2.3.3 Jul 17, 2025
2.3.2 Jul 17, 2025
2.3.1 Jan 23, 2025
2.3.0 Dec 31, 2024
2.2.2 Oct 10, 2024
2.2.1 Jul 22, 2024
2.2.0 Apr 11, 2024
2.1.3 Mar 07, 2024
2.1.2 Mar 06, 2024
2.1.1 Nov 03, 2023
2.0.1 Jul 28, 2023
2.0.0 Jul 11, 2023
1.7.0 Feb 19, 2023
1.6.0 Sep 11, 2022
1.5.2 Mar 22, 2022
1.5.1 Mar 10, 2022
1.5.0 Feb 05, 2022
1.4.6 Jan 03, 2022
1.4.5 Oct 11, 2021
1.4.4 Oct 02, 2021
1.4.3 Sep 05, 2021
1.4.2 Aug 22, 2021
1.4.1 Aug 17, 2021
1.4.0 Aug 07, 2021
1.3.9 May 13, 2021
1.3.8 May 01, 2021
1.3.7 Apr 24, 2021
1.3.6 Apr 20, 2021
1.3.5 Mar 28, 2021
1.3.4 Mar 27, 2021
1.3.3 Mar 25, 2021
1.3.2 Mar 21, 2021
1.3.1 Feb 27, 2021
1.3.0 Jan 26, 2021
1.2.11 Dec 29, 2020
1.2.10 Dec 19, 2020
1.2.9 Oct 19, 2020
1.2.8 Oct 18, 2020
1.2.7 Oct 09, 2020
1.2.6 Sep 11, 2020
1.2.5 Sep 10, 2020
1.2.4 Aug 27, 2020
1.2.3 Aug 26, 2020
1.2.2 Aug 24, 2020
1.2.1 Aug 08, 2020
1.2.0 Jul 24, 2020
1.1.0 Jun 25, 2020
1.0.1 Jun 03, 2020
1.0.0 May 22, 2020
0.22.0 May 11, 2020
0.21.0 Feb 17, 2020
0.20.0 Jan 16, 2020
0.19.0 Oct 01, 2019
0.18.0 Aug 21, 2018
0.17.0 Jul 21, 2018
0.16.1 Mar 16, 2018
0.16.0 Mar 03, 2018
0.15.0 Mar 03, 2018
0.14.0 Feb 04, 2018
0.13.0 Jan 20, 2018
0.12.0 Dec 17, 2017
0.10.0 Nov 19, 2017
0.9.0 Oct 22, 2017
0.8.0 Aug 11, 2017
0.7.0 Jul 16, 2017
0.6.2 Jun 27, 2017
0.6.1 Jun 27, 2017
0.6.0 Jun 21, 2017
0.5.0 Jun 19, 2017
0.4.1 May 31, 2017
0.4.0 May 24, 2017

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
pact-python-ffi (~=0.5.0)
typing-extensions (~=4.0)
yarl (~=1.0)