skillfed

genbadge

Generate badges for tools that do not provide one.

genbadge v1.1.3 589.7K downloads/30d#5,859 on PyPI87
Permissive license BSD 3-Clause AGING released

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 genbadge

uv

uv add genbadge

poetry

poetry add genbadge

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Information TechnologyLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming 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.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Topic :: Software Development :: Libraries :: Python Modules

Tags

generate svg badgespytest coverage badgeci test result badgesbadge generator climarkdown badge shieldflake8 test badge
ci-cdbadge-generationtest-reporting

More Python Modules packages