{"categories":[{"label":"Software Development","url":"https://skillfed.io/packages/category/software-development/17"},{"label":"Python Modules","url":"https://skillfed.io/packages/category/software-development-libraries-python-modules/20"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/4"}],"enrichment":{"capability":"Deal is a Python library for design by contract that adds decorators to enforce preconditions, postconditions, invariants, and side-effect tracking, enabling static analysis, property-based testing, and runtime verification.","skillfed_tags":["design-by-contract","formal-verification","testing-framework"],"use_cases":["Add precondition and postcondition decorators to functions to catch invalid inputs and outputs early in development.","Generate property-based tests automatically from contract decorators using deal.cases() integration.","Run static contract checking via flake8 or deal's built-in linter to find violations before runtime.","Enforce that functions are pure (no side-effects) and detect unexpected memory retention in pure functions.","Formally verify critical code paths to prove correctness for all possible inputs."],"what_it_does":"Deal is a design-by-contract library that lets you annotate Python functions with decorators to declare expected behavior: what inputs are valid (preconditions), what outputs must satisfy (postconditions), what invariants must hold, and what side-effects are allowed. Once annotated, the same contract declarations power multiple verification modes\u2014runtime checking, static linting via flake8, property-based test generation, and formal verification\u2014without requiring separate test code. The library has zero runtime dependencies, so you can add contracts during development and leave them enabled or disabled in production.\n\nDeal integrates with pytest, flake8, sphinx, and hypothesis, and supports type annotations. It tracks exceptions and side-effects, detects memory leaks in pure functions, and performs partial execution to statically check possible values. The package has been in production use since 2018 and is actively maintained, though the last release was several months ago.","worth_installing":"Yes, with conditions. Deal is worth installing if you want to add design-by-contract discipline to Python code and benefit from both runtime and static verification. The zero-dependency runtime, production track record since 2018, and integration with standard tools (pytest, flake8) make it low-risk to adopt. However, the aging maintenance status (257 days since last release) means you should verify that the version works with your Python version and toolchain before committing to it in a new project."},"id":"deal","links":{"html":"https://skillfed.io/packages/deal","md":"https://skillfed.io/packages/deal.md","pypi":"https://pypi.org/project/deal/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-11-30","license_spdx":null,"license_treatment":"permissive","name":"deal","python_support":"supports_current","summary":"**Deal** is a Python library for [design by contract][wiki] (DbC) programming."},"popularity":{"monthly_downloads":97100,"position":13168,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.24.6"}
