Anybadge is a Python library and command-line tool designed for simple and flexible generation of SVG badges for your projects. It allows users to define custom labels, values, and configurable thresholds to color badges dynamically. The library is actively maintained, with its current version being 1.16.0, and receives regular updates.
pip install anybadgeVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to create a PyLint score badge using thresholds to determine its color and then save it as an SVG file. Values can be integers, floats, or strings, and custom colors (hex codes or named colors) are supported.
Ensure your project runs on Python >= 3.4. Upgrade your Python environment if necessary.
Upgrade to anybadge v1.16.0 or newer. Ensure threshold definitions are correctly formatted (e.g., `{'value': 'color'}`).Upgrade to anybadge v1.16.0 or newer to benefit from fixes for label and value escaping.
Upgrade to anybadge v1.16.0 or newer to resolve any internal package versioning inconsistencies.
Upgrade to the latest version of anybadge where this issue has been resolved.
Install anybadge using pip: 'pip install anybadge'.
Ensure that the 'thresholds' argument is correctly defined as a dictionary mapping numeric thresholds to color names.
Rename your local Python file or directory from `anybadge.py` (or `anybadge`) to something else to avoid name collision with the installed library.
Ensure you have the latest version of `anybadge` installed by running `pip install --upgrade anybadge`. If the issue persists, consider recreating your Python environment and reinstalling the package.
No dependency data recorded yet.