PyContracts is a Python package that allows to declare constraints on function parameters and return values. Contracts can be specified using Python3 annotations, or inside a docstring. PyContracts supports a basic type system, variables binding, arithmetic constraints, and has several specialized contracts and an extension API.
☆416Jul 19, 2026Updated 3 weeks ago
Alternatives and similar repositories for contracts
Users that are interested in contracts are comparing it to the libraries listed below. We may earn a commission when you buy through links labeled 'Ad' on this page.
Sorting:
- Design-by-contract in Python3 with informative violation messages and inheritance☆411Jan 29, 2026Updated 6 months ago
- An implementation of contracts for Python.☆352Aug 30, 2019Updated 6 years ago
- The property-based testing library for Python☆8,860Updated this week
- Persistent/Immutable/Functional data structures for Python☆2,195Jan 31, 2026Updated 6 months ago
- Python 3.5+ runtime type checking for integration testing and data validation☆552Jun 2, 2024Updated 2 years ago
- 1-Click AI Models by DigitalOcean Gradient • AdDeploy popular AI models on DigitalOcean Gradient GPU virtual machines with just a single click. Zero configuration with optimized deployments.
- Build languages on Python.☆12May 2, 2021Updated 5 years ago
- MathLib is a versatile C++ library that provides a wide range of mathematical algorithms and functions, including but not limited to tran…☆10Jun 6, 2023Updated 3 years ago
- Typing-toolbox for Python 3 _and_ 2.7 w.r.t. PEP 484.☆203Apr 29, 2023Updated 3 years ago
- A functional standard library for Python.☆5,151Jan 1, 2026Updated 7 months ago
- Run-time type checker for Python☆1,778Jul 26, 2026Updated 2 weeks ago
- For Python3, e.g. @typecheck add_count(count: int, when: any(datetime, timedelta) = datetime.now)☆168Sep 1, 2021Updated 4 years ago
- QuickCheck specification-based testing for Julia☆17Jan 24, 2021Updated 5 years ago
- Functional programming in Python: implementation of missing features to enjoy FP☆3,368Aug 30, 2022Updated 3 years ago
- A fancy and practical functional tools☆3,509Apr 19, 2026Updated 3 months ago
- Managed Kubernetes at scale on DigitalOcean • AdDigitalOcean Kubernetes includes the control plane, bandwidth allowance, container registry, automatic updates, and more for free.
- Canonical JSON☆30May 6, 2026Updated 3 months ago
- A Python library that generates static type annotations by collecting runtime types☆5,001Feb 11, 2026Updated 6 months ago
- 🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library.…☆6,913Updated this week
- Good Curio!☆4,126Dec 21, 2025Updated 7 months ago
- Cython implementation of Toolz: High performance functional utilities☆1,112Dec 1, 2025Updated 8 months ago
- 🤝 Design by contract for Python. Write bug-free code. Add a few decorators, get static analysis and tests for free.☆902Nov 30, 2025Updated 8 months ago
- Simple, elegant, Pythonic functional programming.☆4,348Feb 16, 2026Updated 5 months ago
- A python lens library for manipulating deeply nested immutable structures☆339Nov 15, 2023Updated 2 years ago
- A lightweight library for converting complex objects to and from simple Python datatypes.☆7,242Updated this week
- 1-Click AI Models by DigitalOcean Gradient • AdDeploy popular AI models on DigitalOcean Gradient GPU virtual machines with just a single click. Zero configuration with optimized deployments.
- Python Classes Without Boilerplate☆5,827Updated this week
- Auto-generate PEP-484 annotations☆1,443Jul 6, 2026Updated last month
- Proxies and wrappers for ordinary Python objects☆21Jul 24, 2015Updated 11 years ago
- Multiple dispatch☆847Dec 5, 2024Updated last year
- pdfcli is a CLI tool for manipulating PDFS from the command line.☆13Dec 8, 2022Updated 3 years ago
- Macros in Python: quasiquotes, case classes, LINQ and more!☆3,304Jun 10, 2023Updated 3 years ago
- Bottom-up approach to refactoring in python☆725Jan 29, 2022Updated 4 years ago
- Easy anonymous functions by partial application of operators☆104Dec 14, 2023Updated 2 years ago
- Collection of library stubs for Python, with static types☆5,107Updated this week
- Managed hosting for WordPress and PHP on Cloudways • AdManaged hosting for WordPress, Magento, Laravel, or PHP apps, on multiple cloud providers. Deploy in minutes on Cloudways by DigitalOcean.
- Schema validation just got Pythonic☆2,944Jun 20, 2026Updated last month
- Inspects Python source files and provides information about type and location of classes, methods etc☆2,085Updated this week
- Mutation testing for Python☆647Updated this week
- Python S-expression emulation using tuple-like objects.☆25Oct 20, 2025Updated 9 months ago
- A pythonic wrapper over `atd` to schedule deletion of files/directories.☆53Aug 6, 2017Updated 9 years ago
- Type-level lenses using singletons because why not☆15Dec 19, 2018Updated 7 years ago
- Guild will be a web aware pipelineable actor system, with a pythonic syntax☆26May 19, 2025Updated last year