{"id":13450169,"url":"https://github.com/pact-foundation/pact-python","last_synced_at":"2026-04-17T01:01:54.616Z","repository":{"id":39737806,"uuid":"85806183","full_name":"pact-foundation/pact-python","owner":"pact-foundation","description":"Python version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.","archived":false,"fork":false,"pushed_at":"2025-06-16T04:28:37.000Z","size":14288,"stargazers_count":609,"open_issues_count":46,"forks_count":143,"subscribers_count":21,"default_branch":"main","last_synced_at":"2025-06-16T05:29:50.507Z","etag":null,"topics":["apis","contract-testing","hacktoberfest","pact","smartbear-supported"],"latest_commit_sha":null,"homepage":"https://pact-foundation.github.io/pact-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pact-foundation.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-03-22T08:57:34.000Z","updated_at":"2025-06-16T04:28:40.000Z","dependencies_parsed_at":"2023-09-24T05:09:22.105Z","dependency_job_id":"bfba7985-541c-427b-b89e-115c72b55962","html_url":"https://github.com/pact-foundation/pact-python","commit_stats":{"total_commits":972,"total_committers":71,"mean_commits":"13.690140845070422","dds":0.7211934156378601,"last_synced_commit":"e2d1982e46234813c18ad0f38d346085146203dd"},"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"purl":"pkg:github/pact-foundation/pact-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pact-foundation%2Fpact-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pact-foundation%2Fpact-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pact-foundation%2Fpact-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pact-foundation%2Fpact-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pact-foundation","download_url":"https://codeload.github.com/pact-foundation/pact-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pact-foundation%2Fpact-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260855236,"owners_count":23073237,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apis","contract-testing","hacktoberfest","pact","smartbear-supported"],"created_at":"2024-07-31T07:00:31.762Z","updated_at":"2026-04-17T01:01:54.599Z","avatar_url":"https://github.com/pact-foundation.png","language":"Python","readme":"# Pact Python\n\n\u003c!-- markdownlint-disable no-inline-html --\u003e\n\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/pact-foundation/pact-python/main/docs/img/mascot.svg\"\n        alt=\"Pact Python Mascot\"\n        height=\"250\" width=\"225\"\n        align=\"left\" hspace=\"20\"\u003e\n    \u003cspan\u003e\n        \u003cb\u003eFast, easy and reliable testing for your APIs and microservices.\u003c/b\u003e\n    \u003c/span\u003e\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd\u003ePackage\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca href=\"https://pypi.python.org/pypi/pact-python\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/pact-python.svg\" alt=\"Version\"\u003e\u003c/a\u003e\n            \u003ca href=\"https://pypi.python.org/pypi/pact-python\"\u003e\u003cimg src=\"https://img.shields.io/pypi/pyversions/pact-python.svg\" alt=\"Python Versions\"\u003e\u003c/a\u003e\n            \u003ca href=\"https://pypi.python.org/pypi/pact-python\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/pact-python.svg\" alt=\"Downloads\"\u003e\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCI/CD\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python/actions/workflows/test.yml?query=branch:main\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/actions/workflow/status/pact-foundation/pact-python/test.yml?branch=main\u0026label=test\"\n                alt=\"Test Status\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python/actions/workflows/build.yml?query=branch:main\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/actions/workflow/status/pact-foundation/pact-python/build.yml?branch=main\u0026label=build\"\n                alt=\"Build Status\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python/actions/workflows/docs.yml?query=branch:main\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/actions/workflow/status/pact-foundation/pact-python/docs.yml?branch=main\u0026label=docs\"\n                alt=\"Build Status\"\u003e\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eMeta\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca\n                href=\"https://github.com/pypa/hatch\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg\"\n                alt=\"Hatch project\"\u003e\u003c/a\u003e\n            \u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/ruff-ruff?label=linting\u0026color=%23261230\"\n                alt=\"linting - Ruff\"\u003e\u003c/a\u003e\n            \u003ca href=\"https://github.com/astral-sh/ruff\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/ruff-ruff?label=style\u0026color=%23261230\"\n                alt=\"style - Ruff\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://github.com/python/mypy\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/types-Mypy-blue.svg\"\n                alt=\"types - Mypy\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://pypi.python.org/pypi/pact-python\"\u003e\u003cimg\n                src=\"https://img.shields.io/pypi/l/pact-python.svg\"\n                alt=\"License\"\u003e\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003eCommunity\u003c/td\u003e\n        \u003ctd\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python/issues\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/issues/pact-foundation/pact-python.svg\"\n                alt=\"Issues\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python/discussions\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/discussions/pact-foundation/pact-python.svg\"\n                alt=\"Discussions\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://github.com/pact-foundation/pact-python\"\u003e\u003cimg\n                src=\"https://img.shields.io/github/stars/pact-foundation/pact-python.svg?style=flat\"\n                alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n            \u003cbr/\u003e\n            \u003ca\n                href=\"http://slack.pact.io\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/slack-pact--foundation-4A154B.svg\"\n                alt=\"Slack\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://stackoverflow.com/questions/tagged/pact\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/stackoverflow-pact-F48024.svg\"\n                alt=\"Stack Overflow\"\u003e\u003c/a\u003e\n            \u003ca\n                href=\"https://twitter.com/pact_up\"\u003e\u003cimg\n                src=\"https://img.shields.io/badge/X-@pact__up-black.svg\"\n                alt=\"Twitter\"\u003e\u003c/a\u003e\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\n\u003cb\u003ePact\u003c/b\u003e 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.\n\n\u003cul style=\"list-style-type: none\"\u003e\n    \u003cli\u003e⚡ Lightning fast\u003c/li\u003e\n    \u003cli\u003e🎈 Effortless full-stack integration testing - from the front-end to the back-end\u003c/li\u003e\n    \u003cli\u003e🔌 Supports HTTP/REST and event-driven systems\u003c/li\u003e\n    \u003cli\u003e🛠️ Configurable mock server\u003c/li\u003e\n    \u003cli\u003e😌 Powerful matching rules prevents brittle tests\u003c/li\u003e\n    \u003cli\u003e🤝 Integrates with Pact Broker / PactFlow for powerful CI/CD workflows\u003c/li\u003e\n    \u003cli\u003e🔡 Supports 12+ languages\u003c/li\u003e\n\u003c/ul\u003e\n\n\u003cb\u003eWhy use Pact?\u003c/b\u003e Contract testing with Pact lets you:\n\n\u003cul style=\"list-style-type: none\"\u003e\n    \u003cli\u003e⚡ Test locally\u003c/li\u003e\n    \u003cli\u003e🚀 Deploy faster\u003c/li\u003e\n    \u003cli\u003e⬇️ Reduce the lead time for change\u003c/li\u003e\n    \u003cli\u003e💰 Reduce the cost of API integration testing\u003c/li\u003e\n    \u003cli\u003e💥 Prevent breaking changes\u003c/li\u003e\n    \u003cli\u003e🔎 Understand your system usage\u003c/li\u003e\n    \u003cli\u003e📃 Document your APIs for free\u003c/li\u003e\n    \u003cli\u003e🗄 Remove the need for complex data fixtures\u003c/li\u003e\n    \u003cli\u003e🤷‍♂️ Reduce the reliance on complex test environments\u003c/li\u003e\n\u003c/ul\u003e\n\nWatch our \u003ca href=\"https://www.youtube.com/playlist?list=PLwy9Bnco-IpfZ72VQ7hce8GicVZs7nm0i\"\u003eseries\u003c/a\u003e on the problems with end-to-end integrated tests, and how contract testing can help.\n\n\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\u003c/div\u003e\n\n\u003c!-- markdownlint-enable no-inline-html --\u003e\n\n## Documentation\n\nThis readme provides a high-level overview of the Pact Python library. For detailed documentation, please refer to the [full Pact Python documentation](https://pact-foundation.github.io/pact-python). For a more general overview of Pact and the rest of the ecosystem, please refer to the [Pact documentation](https://docs.pact.io).\n\n-   [Installation](#installation)\n-   [Consumer testing](docs/consumer.md)\n-   [Provider testing](docs/provider.md)\n-   [Examples](examples/README.md)\n\nDocumentation for the API is generated from the docstrings in the code which you can view at [`pact-foundation.github.io/pact-python/pact`](https://pact-foundation.github.io/pact-python/api).\n\n### Need Help\n\n-   [Join](https://slack.pact.io) our community [slack workspace][Pact Foundation Slack].\n-   [Stack Overflow](https://stackoverflow.com/questions/tagged/pact) is a great place to ask questions.\n-   Say 👋 on Twitter: [@pact_up](https://twitter.com/pact_up)\n-   Join a discussion 💬 on [GitHub Discussions]\n-   [Raise an issue][GitHub Issues] on GitHub\n\n[Pact Foundation Slack]: https://pact-foundation.slack.com/\n[GitHub Discussions]: https://github.com/pact-foundation/pact-python/discussions\n[GitHub Issues]: https://github.com/pact-foundation/pact-python/issues\n\n## Installation\n\nThe latest version of Pact Python can be installed from PyPi:\n\n```console\npip install pact-python\n# 🚀 now write some tests!\n```\n\n### Requirements\n\nPact 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.\n\nIn 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.\n\n### Telemetry\n\nIn order to get better statistics as to who is using Pact, we collect some anonymous telemetry. The only things we [record](https://docs.pact.io/metrics) 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`:\n\n## Contributing\n\nWe 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](CONTRIBUTING.md).\n\n[![Table of contributors](https://contrib.rocks/image?repo=pact-foundation/pact-python)](https://github.com/pact-foundation/pact-python/graphs/contributors)\n","funding_links":[],"categories":["Python","Design by Contract","Contract Testing"],"sub_categories":["Pact Ecosystem"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpact-foundation%2Fpact-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpact-foundation%2Fpact-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpact-foundation%2Fpact-python/lists"}