sphinx-badges
Bootstrap-style status badges for Sphinx documentation.
Attach coloured badges to any API element, filter a toctree or autosummary table by badge group with a single click, and add per-group icons and tooltips to make status immediately scannable.
Installation
pip install sphinx-badges
Or with uv:
uv add sphinx-badges
Quick start
-
Add the extension to
conf.py:extensions = ["sphinx_badges"]
-
Define grouped badges in
conf.py:badges_group_labels = { "stability": { "label": "Stability", "tooltip": "API stability level", "icon": "⚡", # prepended to every badge in this group }, "area": { "label": "Area", "tooltip": "Functional area", }, } badges_definitions = { "stability:stable": {"label": "Stable", "color": "#198754", "text_color": "#fff"}, "stability:experimental": {"label": "Experimental", "color": "#ffc107", "text_color": "#000"}, "area:core": {"label": "Core", "color": "#6f42c1", "text_color": "#fff"}, "area:utils": {"label": "Utils", "color": "#fd7e14", "text_color": "#fff"}, }
Badge IDs use a
group:nameformat.badges_group_labelsmaps group keys to display labels shown above each row of filter buttons. Each group can also carry anicon(prepended to every badge in the group) and atooltip(shown on hover). Per-badgeiconandtooltipcan be set directly inbadges_definitionsto override the group-level values.Ungrouped IDs (no colon) are also supported for simpler setups.
-
Attach badges to a page:
my_function =========== .. badges:: stability:stable area:core Description here. Also inline: :badge:`stability:stable`.
-
Filter a toctree by badge group:
.. badge-filter:: stability:stable stability:experimental area:core area:utils :filter-mode: or .. toctree:: api/module_a api/module_b
Each group renders as its own labelled row of filter buttons.
filter-modecan beor(any active badge matches) orand(all active badges must match; default). -
Add badges via numpy-style docstrings (autodoc):
def my_function(x, y): """Return the sum. Badges ------ stability:stable area:core """
Licence
MIT
Metadata
Release files for sphinx-badges 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sphinx_badges-0.1.6.tar.gz | 98.5 kB | With provenance | Details for sphinx_badges-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sphinx_badges-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for sphinx_badges-0.1.6-py3-none-any.whl |
Total release size: 119.5 kB
Release files / sphinx_badges-0.1.6.tar.gz
| Download URL | sphinx_badges-0.1.6.tar.gz |
|---|---|
| Size | 98.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e66f84d6a24e10d6205e796c1eb1a8cf05d35c7412bd58cc43b3a1199cb8b7c
|
|
BLAKE2b-256 checksum How to use checksums |
237f5e47edaa1b67e7206814e1259ee81c0f285678a4f8f13e4f2a45a76b8639
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logRelease files / sphinx_badges-0.1.6-py3-none-any.whl
| Download URL | sphinx_badges-0.1.6-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
534a67ddd088fee2d34fbcee1d460509d949d784ef269a6aa9130eb1df2b08d8
|
|
BLAKE2b-256 checksum How to use checksums |
c051c87f2b3d4d1fb62abbfef7fdfda8c2d59f3c87396de9e6993d3059b14dbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logSecurity for sphinx-badges 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sphinx_badges-0.1.6.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.