genbadge
Generate badges for tools that do not provide one.
What it is and what it does
genbadge is a command-line tool and Python library that generates SVG badges for test and code quality metrics. It fills the gap for tools like pytest, flake8, and coverage that either don't produce badges natively or require manual badge creation. The package accepts metric data and renders them as shield-style SVG badges suitable for embedding in README files and documentation.
The package depends on click for CLI handling, pillow for image operations, and requests for potential remote operations. It supports Python 2.7 through 3.14 and is distributed as a pure-Python wheel, making installation straightforward. The repository remains active with broad Python version support.
Use it for:
- Generate a coverage badge from pytest output to display test coverage in a GitHub README.
- Create a flake8 code quality badge showing linting status for CI/CD pipelines.
- Build custom metric badges for build status, dependency health, or custom test suites in markdown.
- Automate badge generation as part of a CI workflow to keep project metrics visible without manual updates.
- Generate shields for multiple test frameworks in a single project to consolidate quality signals.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates SVG badges for CI/CD tools and test frameworks that don't natively provide them, such as pytest, flake8, and coverage reports.
Yes, if you need to generate badges for test or quality tools that don't provide them natively. The package is stable, has low install friction, and carries no known vulnerabilities. The aging maintenance is a minor concern for a mature tool, but the active repository and broad Python version support suggest it remains usable.
Install
genbadge on PyPI
pip
pip install genbadgeuv
uv add genbadgepoetry
poetry add genbadgeInstalling genbadge
Before you install
Low install friction with a pure-Python wheel distribution. Aging maintenance status, but the repository remains active and the package is marked Production/Stable.
License in practice
BSD 3-Clause is permissive; you can use this package in commercial and proprietary projects with minimal restrictions, provided you include the license notice.
Quickstart
pip install genbadge
from genbadge import badge
badge.create_badge('coverage', 'percentage', 'green', 'coverage.svg')
Verify before relying
- Whether the package generates badges from live tool output or requires pre-computed metrics as input.
- What badge styles or customization options are available beyond basic color and label parameters.
- Whether the CLI tool supports batch badge generation or only single-badge workflows.
- Exact API surface and parameter names for the Python library interface.
Package facts
| License | BSD 3-Clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — setuptools, click, pillow, requests, pathlib2, importlib_resources |
| Maintenance | aging — 263 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 589,669/month — #5,859 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: genbadge-1.1.3-py2.py3-none-any.whl
Keywords: commandline, cli, generate, badge, shield, svg, flake8, pytest, test, coverage, markdown
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
coverage-badgeGenerates SVG coverage badges from Coverage.py…
permissive · top 15,000 on PyPI
anybadgeGenerates SVG badge images with configurable…
permissive · top 5,000 on PyPI
schemdrawSchemdraw generates high-quality electrical…
permissive · top 15,000 on PyPI
sphinxcontrib-svg2pdfconverterConverts SVG images to PDF or PNG for Sphinx…
permissive · top 15,000 on PyPI
pytest-harvestpytest-harvest captures and stores data…
permissive · top 15,000 on PyPI
svg.pyGenerates SVG files programmatically in Python…
permissive · top 15,000 on PyPI
markdown-graphviz-inlineA Markdown extension that converts inline…
permissive · top 15,000 on PyPI
pytest-casespytest-cases lets you separate test case data…
permissive · top 5,000 on PyPI
markdown-inline-graphviz-extensionA Markdown extension that converts inline…
permissive · top 15,000 on PyPI
pylint-gitlabProvides custom pylint output formatters that…
copyleft · top 5,000 on PyPI