{ "info": { "author": "Paul Becotte", "author_email": "pjbecotte@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Testing" ], "description": "# Contractual\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/python/black)\n[![pipeline status](https://gitlab.com/pjbecotte/contractual/badges/master/pipeline.svg)](https://gitlab.com/pjbecotte/contractual/commits/master)\n[![coverage report](https://gitlab.com/pjbecotte/contractual/badges/master/coverage.svg)](https://gitlab.com/pjbecotte/contractual/commits/master)\n\n## Installation\n\n`pip install contractual`\n\n\n## Use\n\nhow to use-\n\n## Contract Files\n\nContract files comply with the Pact file format seen at\nhttps://github.com/pact-foundation/pact-specification/tree/version-2\nThere is a key difference though-\n\nContractual supports mocking out arbitrary interfaces, while Pact limits itself\nto http requests. As such, a Contractual file can only be used with a Pact verifier\nif you limit the unchecked mocks to `HttpContractMock`. In the files themselves,\nyou will see a list of interactions having the form\n\n\n```json\n{\n \"description\": \"get all users for max\",\n \"request\": {},\n \"response\": {},\n \"providerState\": \"a user with an id named 'u:ser' exists\"\n}\n```\n\n\n\nThat is a valid HTTP contract. A more general `ContractMock` contract would have the\nform\n\n\n```json\n{\n \"description\": \"get all users for max\",\n \"contractMock\": {\n \"contractName\": \"Name\",\n \"args\": []\n },\n \"response\": {},\n \"providerState\": \"a user with an id named 'user' exists\"\n}\n```\n\n## Development\n\n### Development Environment\n\nPoetry is used to manage the project and dependencies. Once you have poetry installed \n`pip install --user poetry`, you can run `poetry install` to setup a virtaulenv for\nyour project. Dependencies can be updated using `poetry add` or `poetry remove` and\ncommitting the updated pyproject.toml and poetry.lock files.\n\n### Release\n\nCI is handled on Gitlab at https://gitlab.com/pjbecotte/contractual. There is a make\ntarget to create a new release by tagging a new version and then incrementing to the\nnext beta version. (This requires permissions to push to master)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/pjbecotte/contractual", "keywords": "contract test pact verify", "license": "", "maintainer": "", "maintainer_email": "", "name": "contractual", "package_url": "https://pypi.org/project/contractual/", "platform": "", "project_url": "https://pypi.org/project/contractual/", "project_urls": { "Homepage": "https://gitlab.com/pjbecotte/contractual" }, "release_url": "https://pypi.org/project/contractual/0.4.6/", "requires_dist": null, "requires_python": ">=3.7, <4", "summary": "Contractual provides a method for verifying the function of mocks across modules and projects", "version": "0.4.6" }, "last_serial": 5390370, "releases": { "0.4.6": [ { "comment_text": "", "digests": { "md5": "474c22330c48d55c040a03e32e1013f2", "sha256": "dd7da2911f5d17a71b4a5ceee9278d756cc289b1ff9975110c97943429af5355" }, "downloads": -1, "filename": "contractual-0.4.6-py3-none-any.whl", "has_sig": false, "md5_digest": "474c22330c48d55c040a03e32e1013f2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7, <4", "size": 3337, "upload_time": "2019-06-11T04:10:01", "url": "https://files.pythonhosted.org/packages/01/80/7699c0eaef62c7e86fa3e890b45bea8c52d2f8690e815e77138ed731755d/contractual-0.4.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e4ca0d9cba29aa71ebe24f0574121a7", "sha256": "8a5d54e6bfca7854331e721aa84ddf27483843d1e6968932435f0918eccedba3" }, "downloads": -1, "filename": "contractual-0.4.6.tar.gz", "has_sig": false, "md5_digest": "7e4ca0d9cba29aa71ebe24f0574121a7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 6407, "upload_time": "2019-06-11T04:10:03", "url": "https://files.pythonhosted.org/packages/e2/28/1d9d2de7ebbd2e56acd440295703d3734781a4e099a0827a6c8236dc23a0/contractual-0.4.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "474c22330c48d55c040a03e32e1013f2", "sha256": "dd7da2911f5d17a71b4a5ceee9278d756cc289b1ff9975110c97943429af5355" }, "downloads": -1, "filename": "contractual-0.4.6-py3-none-any.whl", "has_sig": false, "md5_digest": "474c22330c48d55c040a03e32e1013f2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7, <4", "size": 3337, "upload_time": "2019-06-11T04:10:01", "url": "https://files.pythonhosted.org/packages/01/80/7699c0eaef62c7e86fa3e890b45bea8c52d2f8690e815e77138ed731755d/contractual-0.4.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7e4ca0d9cba29aa71ebe24f0574121a7", "sha256": "8a5d54e6bfca7854331e721aa84ddf27483843d1e6968932435f0918eccedba3" }, "downloads": -1, "filename": "contractual-0.4.6.tar.gz", "has_sig": false, "md5_digest": "7e4ca0d9cba29aa71ebe24f0574121a7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7, <4", "size": 6407, "upload_time": "2019-06-11T04:10:03", "url": "https://files.pythonhosted.org/packages/e2/28/1d9d2de7ebbd2e56acd440295703d3734781a4e099a0827a6c8236dc23a0/contractual-0.4.6.tar.gz" } ] }