AndreaCensi/contracts
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.
Join the conversation
Reviews · Questions · Posts
Share what you know about contracts — write a review from your real experience, ask an implementation question, or publish a post about how you use it.
Share your experience
Write or update your review
Explain what worked, what broke down, and what another team should know before adopting contracts.
Project Q&A
Questions and answers
Browse implementation threads tied directly to AndreaCensi/contracts. Each question links through to the full answer page.
Be the first to ask how teams run contracts in production. Every question you post becomes a durable, searchable answer page other developers can find.
Ask the first questionRelated posts
Posts tagged with the same topics
These posts come from the same topic surface as this repo, so readers can move from project evaluation into practical writeups and migration notes without leaving context.
Share how your team uses contracts — a migration note, an architecture writeup, or a comparison. Your post reaches everyone browsing these same topics.
Write the first post