{"id":15524553,"url":"https://github.com/sergeyklay/consumer-pact-example","last_synced_at":"2025-04-23T07:32:08.121Z","repository":{"id":83149753,"uuid":"606233562","full_name":"sergeyklay/consumer-pact-example","owner":"sergeyklay","description":"Consumer-side demo using contract driven development","archived":false,"fork":false,"pushed_at":"2024-10-21T22:04:44.000Z","size":417,"stargazers_count":3,"open_issues_count":7,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T22:41:20.656Z","etag":null,"topics":["api-testing","consumer-driven-contracts","contract-driven-development","contract-testing","contract-tests","contracts","pact","pact-consumer","pacts"],"latest_commit_sha":null,"homepage":"","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/sergeyklay.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.rst","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-24T22:50:07.000Z","updated_at":"2024-10-07T08:16:07.000Z","dependencies_parsed_at":"2023-03-01T02:45:13.093Z","dependency_job_id":"efb26a68-1e96-453a-80aa-7d00b358d00c","html_url":"https://github.com/sergeyklay/consumer-pact-example","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fconsumer-pact-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fconsumer-pact-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fconsumer-pact-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergeyklay%2Fconsumer-pact-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergeyklay","download_url":"https://codeload.github.com/sergeyklay/consumer-pact-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250391702,"owners_count":21422953,"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":["api-testing","consumer-driven-contracts","contract-driven-development","contract-testing","contract-tests","contracts","pact","pact-consumer","pacts"],"created_at":"2024-10-02T10:51:41.414Z","updated_at":"2025-04-23T07:32:08.095Z","avatar_url":"https://github.com/sergeyklay.png","language":"Python","readme":".. raw:: html\n\n    \u003ch1 align=\"center\"\u003eConsumer API Example\u003c/h1\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://github.com/sergeyklay/consumer-pact-example/actions/workflows/test-code.yaml\"\u003e\n            \u003cimg src=\"https://github.com/sergeyklay/consumer-pact-example/actions/workflows/test-code.yaml/badge.svg\" alt=\"Test Code\" /\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://codecov.io/gh/sergeyklay/consumer-pact-example\"\u003e\n            \u003cimg src=\"https://codecov.io/gh/sergeyklay/consumer-pact-example/branch/main/graph/badge.svg?token=9FdBH27I9K\" alt=\"Coverage Status\" /\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n\n.. teaser-begin\n\nThis is a Python application for explanation of Contract Testing based on\n`Pact \u003chttps://docs.pact.io\u003e`_.\n\nHere you can find out how to use Pact using the Python language. You can find\nmore of an overview on Pact in the `Pact Introduction \u003chttps://docs.pact.io/\u003e`_.\n\nThis project uses:\n\n* `Pact \u003chttps://pact.io\u003e`_, a code-first tool for testing HTTP and message\n  integrations using contract tests\n* `pact-python \u003chttps://github.com/pact-foundation/pact-python\u003e`_, to create\n  and verify consumer driven contracts\n\n.. teaser-end\n\n.. image:: https://raw.githubusercontent.com/sergeyklay/consumer-pact-example/main/cdc-example.png\n  :alt: Interaction diagram\n\nConsumer (this project)\n=======================\n\nConsumer API Example is a simple HTTP client that makes requests to Provider,\ngets response from API server and creates data model using the data from\nresponses. For demonstration purposes, the project has simplified\nlogic and should not be considered as a full-fledged Production-ready solution.\n\nProvider\n========\n\nFor the purity of the experiment, the provider is implemented as a separate\nproject and can be found at\n`the following repo \u003chttps://github.com/sergeyklay/provider-pact-example\u003e`_.\n\nPact\n====\n\nSample contracts (pacts) are located in\n`tests/pacts \u003chttps://github.com/sergeyklay/consumer-pact-example/tree/main/tests/pacts\u003e`_.\n\nGetting Started\n===============\n\nPrerequisites\n-------------\n\nWhat kind of things you need to install on your workstation to start:\n\n* Python \u003e= 3.11\n* Docker / Rancher\n* Docker Compose / Rancher Compose\n\nInstalling\n----------\n\nFirst, install Python dependencies for consumer:\n\n.. code-block:: console\n\n   $ make init\n   $ make install\n\nRun tests\n---------\n\nTo run unit tests use the command as follows:\n\n.. code-block:: console\n\n   $ make test\n\nRun the dockerized broker using the ``docker-compose.yml`` file in the root of\nthe project:\n\n.. code-block:: console\n\n   $ docker compose -d\n\n\nTo publish contracts (pacts) to the broker use the following command:\n\n.. code-block:: console\n\n   $ ./publish-contracts.sh\n\nRun lint check\n--------------\n\nTo run code style checking use the command as follows:\n\n.. code-block:: console\n\n   $ make lint\n\n\n.. -project-information-\n\nProject Information\n===================\n\nConsumer API Example is released under the `MIT License \u003chttps://choosealicense.com/licenses/mit/\u003e`_,\nand its code lives at `GitHub \u003chttps://github.com/sergeyklay/consumer-pact-example\u003e`_.\nIt’s rigorously tested on Python 3.11+.\n\nIf you'd like to contribute to Consumer API Example you're most welcome!\n\n.. -support-\n\nSupport\n=======\n\nShould you have any question, any remark, or if you find a bug, or if there is\nsomething you can't do with the Consumer API Example, please\n`open an issue \u003chttps://github.com/sergeyklay/consumer-pact-example/issues\u003e`_.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fconsumer-pact-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergeyklay%2Fconsumer-pact-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergeyklay%2Fconsumer-pact-example/lists"}