anybadge
Simple, flexible badge generator for project badges.
Decision gist · record as of 2026-08-14
Yes. anybadge is a lightweight, actively maintained tool with no security issues, permissive licensing, and low install friction. It solves a specific, real problem—generating SVG badges with threshold-based coloring—and is well-suited for CI/CD integration, internal projects, or any scenario where you need badge generation without external dependencies.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction: pure Python wheel with a single runtime dependency (packaging).
- Active maintenance with recent release (2025-01-11) and no known vulnerabilities.
License · maintenance · safety
permissive license (permissive) — MIT license (permissive): you can use, modify, and distribute anybadge freely in commercial and private projects with minimal restrictions.
last release 2025-01-11 (580 days) · last repo commit 2026-05-02 · 400 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,914,191 downloads/mo, #3,436 on PyPI
Alternatives
Verify before relying
pip install anybadge
import anybadge
thresholds = {2: 'red', 4: 'orange', 8: 'yellow', 10: 'green'}
badge = anybadge.Badge('pylint', 2.22, thresholds=thresholds)
badge.write_badge('pylint.svg')- Whether pre-built badge templates (e.g., 'pylint') cover your specific metrics or if custom thresholds are always required.
- Performance characteristics when generating many badges in batch or in high-frequency CI/CD pipelines.
- Specific use-case coverage for test coverage badges or other common metrics beyond the documented examples.
What it is and what it does
anybadge is a Python library and CLI tool for generating SVG badge images with dynamic coloring based on threshold rules. It lets you create badges by specifying a label, value, and a set of thresholds that map numeric ranges to colors—so a pylint score of 2.22 can automatically render red, while higher scores render green. The package supports both named colors (from Mozilla's CSS color keywords) and hex color codes.
You can use it either by importing into Python code or by running commands directly from the shell. It's designed for projects that need badge generation without calling external services, making it useful for internal development, CI/CD pipelines, or environments where external badge services are unavailable or undesirable. The single dependency (packaging) and pure-Python wheel keep installation friction minimal.
Use it for
- Generate pylint or code-quality score badges that change color based on thresholds in CI/CD pipelines.
- Create custom metric badges for internal dashboards or README files without relying on external badge services.
- Automate badge generation in build scripts to reflect real-time project health metrics.
- Generate badges for documentation completeness or API compliance status with threshold-driven colors.
- Build badges with both named colors and custom hex values for consistent project branding.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
anybadge is a lightweight, actively maintained tool with no security issues, permissive licensing, and low install friction. It solves a specific, real problem—generating SVG badges with threshold-based coloring—and is well-suited for CI/CD integration, internal projects, or any scenario where you need badge generation without external dependencies.
Install
anybadge on PyPI
Before you install
Low friction: pure Python wheel with a single runtime dependency (packaging). Active maintenance with recent release (2025-01-11) and no known vulnerabilities.
License in practice
MIT license (permissive): you can use, modify, and distribute anybadge freely in commercial and private projects with minimal restrictions.
Quickstart
pip install anybadge
import anybadge
thresholds = {2: 'red', 4: 'orange', 8: 'yellow', 10: 'green'}
badge = anybadge.Badge('pylint', 2.22, thresholds=thresholds)
badge.write_badge('pylint.svg')
Verify before relying
- Whether pre-built badge templates (e.g., 'pylint') cover your specific metrics or if custom thresholds are always required.
- Performance characteristics when generating many badges in batch or in high-frequency CI/CD pipelines.
- Specific use-case coverage for test coverage badges or other common metrics beyond the documented examples.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepackaging |
| Maintenance | Actively maintained 580 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,914,191 / month, #3,436 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT License |
Evidence: anybadge-1.16.0-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 › “svg badge generator”
- anybadgeGenerates SVG badge images with configurable thresholds and colors,…
- coverage-badgeGenerates SVG coverage badges from Coverage.py data files, displaying…
- genbadgeGenerates SVG badges for CI/CD tools and test frameworks that don't…
Give your agent the search over MCP, or paste the wish link into any chat.
More Build Tools packages
Provides reusable utilities for Python packaging interoperability, including version handling, specifiers, markers, requirements, tags, and metadata parsing according to standards like PEP 440 and PEP 425.
Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.
pip is the standard installer for Python packages, enabling you to download and install packages from the Python Package Index and other indexes into your Python environment.
Hatchling is a standards-compliant Python build backend that handles packaging, metadata, and distribution of Python projects when configured in a project's pyproject.toml file.
Generates Python gRPC service stubs and message classes from Protocol Buffer definitions, enabling developers to build gRPC clients and servers.
pre-commit is a framework for installing and running git hooks written in any language before commits are made, automating code quality and validation checks across multi-language projects.
Install it if your team needs consistent, automated validation at commit time.
See also coverage-badge · genbadge · drawsvg · colourmap · simple-colors · pdf417gen · ansicolors · ascii-colors · colorful · svgelements