coverage
Code coverage measurement for Python
Decision gist · record as of 2026-08-14
Yes. Coverage.py is a production-stable, actively maintained tool with zero known vulnerabilities, low install friction, and a permissive Apache 2.0 license. It has no runtime dependencies and is the de facto standard for Python code coverage measurement. Install it if you want to measure test completeness or enforce coverage thresholds in your project.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Low install friction; pure Python wheel.
- Actively maintained with a release 8 days ago and 3407 repository stars.
License · maintenance · safety
Apache-2.0 (permissive) — Apache 2.0 permissive license; you can use, modify, and distribute coverage.py freely in commercial and open-source projects with minimal restrictions.
last release 2026-08-06 (8 days) · last repo commit 2026-08-09 · 3,407 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 335,774,033 downloads/mo, #125 on PyPI
Alternatives
Verify before relying
pip install coverage
import coverage
cov = coverage.Coverage()
cov.start()
# ... run your code ...
cov.stop()
cov.save()
cov.report()- Whether the package supports measuring coverage for compiled C extensions or only pure Python code.
- Performance characteristics when measuring coverage on very large codebases or long-running test suites.
What it is and what it does
Coverage.py is a mature code coverage measurement tool for Python that integrates with your test suite to track which lines of code are executed. It uses Python's standard library tracing hooks to determine executable lines and which ones have actually run, then generates reports showing coverage percentages and gaps. The tool runs on Python 3.10 through 3.15 rc1, including PyPy3, and has no runtime dependencies beyond the Python standard library.
Typically used during test execution to identify untested code paths, measure test suite completeness, and enforce coverage thresholds in CI/CD pipelines. It can generate HTML reports, XML output for CI systems, and terminal summaries. The project has been actively maintained since 2009 and is widely used across the Python ecosystem.
Use it for
- Measure test suite completeness and identify untested code branches in your application.
- Generate coverage reports for CI/CD pipelines to enforce minimum coverage thresholds before merging.
- Create HTML coverage reports to visualize which lines are covered and which are not.
- Track coverage trends over time to ensure test quality doesn't regress as code evolves.
- Integrate with pytest or other test runners to automatically measure coverage during test execution.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Coverage.py is a production-stable, actively maintained tool with zero known vulnerabilities, low install friction, and a permissive Apache 2.0 license. It has no runtime dependencies and is the de facto standard for Python code coverage measurement. Install it if you want to measure test completeness or enforce coverage thresholds in your project.
Install
coverage on PyPI
Before you install
Low install friction; pure Python wheel. Actively maintained with a release 8 days ago and 3407 repository stars. Supports Python 3.10 through 3.15 rc1, including free-threading and PyPy3.
Requires Python 3.10 or later.
License in practice
Apache 2.0 permissive license; you can use, modify, and distribute coverage.py freely in commercial and open-source projects with minimal restrictions.
Quickstart
pip install coverage
import coverage
cov = coverage.Coverage()
cov.start()
# ... run your code ...
cov.stop()
cov.save()
cov.report()
Verify before relying
- Whether the package supports measuring coverage for compiled C extensions or only pure Python code.
- Performance characteristics when measuring coverage on very large codebases or long-running test suites.
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 8 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 335,774,033 / month, #125 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.16Programming Language :: Python :: Free Threading :: 3 - StableProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Quality AssuranceTopic :: Software Development :: Testing |
Evidence: coverage-7.15.4-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “line coverage reporting”
- coverageCoverage.py measures which lines of Python code are executed during…
- codecov-cliA command-line interface for interacting with Codecov directly from…
- django-coverage-pluginA coverage.py plugin that measures test coverage of Django templates,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
A pytest plugin that measures code coverage during test runs, automatically combining coverage data and supporting distributed testing with pytest-xdist.
Install it if you want coverage reports as part of your normal test workflow.
See also dbt-coverage · django-coverage-plugin · slipcover · coverage_enable_subprocess · coverage-conditional-plugin · coveralls · pylint · coverage-badge · pytest-mock · atheris