types-assertpy
Typing stubs for assertpy
What it is and what it does
types-assertpy is a type stub package that provides type annotations for a testing assertion library. It contains type information that allows mypy 2.1.0, pyright 1.1.409, and other static type checkers to understand and validate code using the library's fluent assertion API. The stubs are generated from typeshed, the community-maintained repository of type information for Python packages, and target version 1.1.*.
You install this as a development dependency to enable type checking in test code. Type checkers will use these stubs to catch type errors at analysis time rather than runtime, providing IDE autocomplete and inline documentation for the library's methods.
Use it for:
- Enable type checkers to validate test files that use the target library's assertions
- Catch type mismatches in assertion chains before running tests
- Provide IDE autocomplete and inline documentation for assertion methods
- Support strict type checking workflows in projects using this testing library
- Validate assertion arguments match expected types in CI/CD pipelines
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs enabling static type checkers like mypy and pyright to understand the assertion API of a popular testing library.
Yes, if you use static type checking with this testing library. Install it as a dev dependency to get type safety in your test code. No installation friction and no known security issues. Skip it only if you don't use static type checking or don't use this library.
Install
types-assertpy on PyPI
pip
pip install types-assertpyuv
uv add types-assertpypoetry
poetry add types-assertpyInstalling types-assertpy
Before you install
Low friction installation with no runtime dependencies. Actively maintained as part of typeshed; last commit on 2026-08-14.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restrictions.
Quickstart
pip install types-assertpy
# Type checkers now understand the testing library's API
from assertpy import assert_that
assert_that([1, 2, 3]).contains(2)
Requires Python 3.10 or later.
Verify before relying
- Whether this stub package is automatically discovered by type checkers or requires explicit configuration
- Compatibility with versions of the target library outside the 1.1.* series
- Whether installation alongside the target library is required or optional
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 146,528/month — #11,097 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_assertpy-1.1.0.20260518-py3-none-any.whl
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
types-cffiProvides type stubs for the cffi package,…
permissive · top 5,000 on PyPI
types-mockProvides type stubs for the mock library,…
permissive · top 5,000 on PyPI
types-aws-xray-sdkProvides type stubs for aws-xray-sdk, enabling…
permissive · top 15,000 on PyPI
assertpyProvides a fluent assertion API for writing…
permissive · top 5,000 on PyPI
types-greenletProvides type stubs for the greenlet package,…
permissive · top 15,000 on PyPI
types-grpcio-health-checkingProvides type stubs for grpcio-health-checking,…
permissive · top 15,000 on PyPI
types-PySocksProvides type stubs for PySocks, enabling…
permissive · top 15,000 on PyPI
optypeoptype provides single-method protocols and…
permissive · top 5,000 on PyPI
types-pexpectProvides type stubs for pexpect, enabling type…
permissive · top 5,000 on PyPI
types-vobjectProvides type stubs for the vobject package,…
permissive · top 15,000 on PyPI