--- id: assertpy version: "1.1" license: BSD license_treatment: permissive maintenance: aging --- # assertpy — Simple assertion library for unit testing in python with a fluent API License: permissive · Maintenance: aging · Downloads: 885.7K/mo ## What it is and what it does assertpy is a lightweight assertion library that adds a fluent, chainable API on top of Python's standard assertions for unit testing. Instead of writing flat assert statements, you chain readable method calls like .is_equal_to(), .starts_with(), and .contains() to build expressive test conditions. It has no runtime dependencies and works with test runners like pytest and Nose. The library was last released on 2020-07-19 and is classified as Production/Stable, but the project shows signs of age—the repository has not been actively maintained, and the latest classifiers only declare support up to Python 3.8. While it remains in the top popularity tier, relying on it for new projects means accepting that bug fixes and compatibility updates are unlikely. Use it for: - Writing more readable unit tests with fluent assertion chains instead of nested assert statements - Migrating from verbose unittest assertions to a cleaner, method-chaining style within pytest or Nose - Testing collections and strings with readable predicates like .contains(), .starts_with(), .is_length() - Building test suites where assertion readability is a priority for team maintainability ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a fluent assertion API for writing readable unit test assertions in Python, supporting method chaining for cleaner test code. Yes, for existing projects already using it or for teams that prioritize assertion readability in test code. No, for new projects—the package is unmaintained since 2020 and shows no active development. Modern alternatives like pytest's built-in assertions or other actively maintained fluent libraries are safer choices for long-term codebases. ## Install pip install assertpy uv add assertpy poetry add assertpy ## Installing assertpy Before you install: High install friction due to source distribution format. Maintenance status is aging—last release was 2020-07-19, with no commits since 2025-06-15, indicating the project is no longer actively maintained despite Production/Stable classification. License in practice: BSD permissive license means you can use, modify, and distribute the package freely in both open-source and commercial projects with minimal restrictions. Quickstart: pip install assertpy from assertpy import assert_that def test_example(): assert_that(1 + 2).is_equal_to(3) assert_that('foobar').is_length(6).starts_with('foo') Verify before relying: - Whether the package works reliably with modern Python versions beyond 3.8, given the last release was in 2020 - Current status of the conda-forge feedstock and whether conda installation remains viable - Active maintenance status given the repository shows no recent commits despite being marked Production/Stable ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: high - Maintenance: aging - Downloads: 885.7K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags fluent assertions testing, unit test assertion library, readable test assertions python, assert_that fluent api, pytest assertion helpers, test framework assertions, testing, unmaintained, fluent-api [View on SkillFed](https://skillfed.io/packages/assertpy) · [View on PyPI](https://pypi.org/project/assertpy/)