{"id":24297,"library":"pybadges","title":"pybadges","description":"A library and command-line tool for generating Github-style badges (SVG images). Current version: 3.0.1, requires Python >=3.4, release cadence is irregular.","status":"active","version":"3.0.1","language":"python","source_language":"en","source_url":"https://github.com/google/pybadges","tags":["badge","svg","github-style","shields"],"install":[{"cmd":"pip install pybadges","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Used internally for SVG generation","package":"xml.etree.ElementTree","optional":false}],"imports":[{"note":"The correct function is `badge` (lowercase). Older examples may use `generate_badge` or uppercase `Badge`, but those are not valid in 3.x.","wrong":"from pybadges import Badge from pybadges import generate_badge","symbol":"badge","correct":"from pybadges import badge"}],"quickstart":{"code":"from pybadges import badge\n\nsvg = badge(left_text='version', right_text='3.0.1', right_color='green')\nprint(svg[:100])  # prints first 100 characters of SVG","lang":"python","description":"Generate a simple SVG badge and print its beginning."},"warnings":[{"fix":"Use `from pybadges import badge` and call `badge(left_text='...', right_text='...', ...)`.","message":"In version 3.0.0, the import path and function signature changed. `from pybadges import badge` is the only supported import; the old `generate_badge` function was removed.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use `from pybadges import badge` in Python scripts.","message":"The command-line tool `pybadges` is still available but may be deprecated in future releases. Use programmatic API instead.","severity":"deprecated","affected_versions":">=3.0.0"},{"fix":"Wrap the SVG string with `<a href=\"...\">...</a>` in your HTML.","message":"The `whole_link` parameter does not exist. To make the whole badge clickable, use `<a>` tags around the SVG output manually.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from pybadges import badge`.","cause":"Importing `from pybadges.badge import badge` (submodule) instead of `from pybadges import badge`.","error":"ModuleNotFoundError: No module named 'pybadges.badge'"},{"fix":"Use `badge(...)` instead.","cause":"Using the old function name `generate_badge` which was removed in version 3.0.0.","error":"AttributeError: module 'pybadges' has no attribute 'generate_badge'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}