Provide design-by-contract with informative violation messages.
Project description
icontract
icontract provides design-by-contract to Python3 with informative violation messages and inheritance.
It also gives a base for a flourishing of a wider ecosystem:
A linter pyicontract-lint,
A sphinx plug-in sphinx-icontract,
A tool icontract-hypothesis for automated testing and ghostwriting test files which infers Hypothesis strategies based on the contracts,
together with IDE integrations such as icontract-hypothesis-vim, icontract-hypothesis-pycharm, and icontract-hypothesis-vscode,
Directly integrated into CrossHair, a tool for automatic verification of Python programs,
together with IDE integrations such as crosshair-pycharm and crosshair-vscode, and
An integration with FastAPI through fastapi-icontract to enforce contracts on your HTTP API and display them in OpenAPI 3 schema and Swagger UI, and
An extensive corpus, Python-by-contract corpus, of Python programs annotated with contracts for educational, testing and research purposes.
Installation
Install icontract with pip:
pip3 install icontract
Versioning
We follow Semantic Versioning. The version X.Y.Z indicates:
X is the major version (backward-incompatible),
Y is the minor version (backward-compatible), and
Z is the patch version (backward-compatible bug fix).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file icontract-2.6.3.tar.gz
.
File metadata
- Download URL: icontract-2.6.3.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 479a21b89d1ddeedafa06b5cf47824b64bc1b4259b4ff6eaba7df9f90ab97b5e |
|
MD5 | a9dea8150aa63b3eb975db8c9e45813a |
|
BLAKE2b-256 | 54f72263c799565d98ddd0a8521212f9c57931d3d6be12013e1bdf8bac6ae20d |
File details
Details for the file icontract-2.6.3-py3-none-any.whl
.
File metadata
- Download URL: icontract-2.6.3-py3-none-any.whl
- Upload date:
- Size: 38.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd282d81e7036c8c4509f22ec9bc16d3624025219157b4c0cdcbe09ac8228cc7 |
|
MD5 | 8cb77dab8796315d5968a776164a224d |
|
BLAKE2b-256 | 87ab675f4ca6be46ef03016370a5ae8ad04ed9c35f967a362bdd5d39b596a8dc |