--- id: coverage-badge version: "1.1.2" license: MIT license_treatment: permissive maintenance: active --- # coverage-badge — Generate coverage badges for Coverage.py. License: permissive · Maintenance: active · Downloads: 355.4K/mo ## What it is and what it does coverage-badge is a command-line tool that converts Coverage.py coverage data into an SVG badge graphic. It reads the .coverage file that Coverage.py generates and outputs a visual badge showing the coverage percentage, styled after shields.io templates. The tool is straightforward: run Coverage.py to collect metrics, then run coverage-badge to generate the badge SVG, either printing it to stdout or saving it to a file. The package is in maintenance mode, meaning it receives occasional fixes but no new features. It depends on coverage and setuptools. For projects seeking richer badge support (test counts, flake8 reports, etc.), the maintainer recommends genbadge as an alternative. The badge itself uses color ranges to indicate coverage levels, with a plain-color mode available via command-line flag. Use it for: - Display a live coverage percentage badge in a GitHub README to show project test coverage at a glance. - Automate badge generation in CI/CD pipelines after running test suites with Coverage.py. - Generate coverage badges for documentation sites or project dashboards that track code quality metrics. - Create visual indicators of coverage trends across multiple project branches or releases. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Generates SVG coverage badges from Coverage.py data files, displaying test coverage percentages in a visual format suitable for README files and CI/CD pipelines. Yes, if you use Coverage.py and want a simple, low-friction way to generate coverage badges for README files or CI/CD workflows. The tool is stable, actively maintained, and has no known vulnerabilities. Install it only if you need basic coverage badge generation; if you need richer badge types (test counts, linting reports), consider genbadge instead. ## Install pip install coverage-badge uv add coverage-badge poetry add coverage-badge ## Installing coverage-badge Before you install: Low friction install with just two runtime dependencies (coverage and setuptools). Actively maintained with recent commits, though in maintenance mode with no new features planned. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install coverage-badge Run coverage first, then generate the badge: coverage run -m pytest coverage-badge -o coverage.svg Requires a .coverage data file in the working directory, generated by running Coverage.py first. Verify before relying: - Whether the package works with all modern Python versions despite unspecified python_support. - Current state of maintenance mode and likelihood of bug fixes vs. feature requests. ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 355.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags coverage badge generator, coverage.py badge svg, test coverage visualization, coverage report badge, ci coverage badge, coverage percentage display, coverage-reporting, ci-cd-integration, badge-generation [View on SkillFed](https://skillfed.io/packages/coverage-badge) · [View on PyPI](https://pypi.org/project/coverage-badge/)