-
Notifications
You must be signed in to change notification settings - Fork 1
Home
openbadgeslib is a Python library and CLI for signing and verifying Open Badges baked into SVG and PNG image files. It supports strict OpenBadges 2.0 (JWS / hosted assertions) and OpenBadges 3.0 (W3C Verifiable Credentials as JWT-VC), plus a frozen OpenBadges 1.0 legacy format — selected with -V {1,2,3} (default 3).
OB 2.0 (JWS) vs OB 3.0 (JWT-VC): OB2 embeds a JWS-signed assertion in the badge image; OB3 issues a W3C Verifiable Credential as a JWT-VC and bakes that token into the image instead. See OB2 vs OB3 for the full comparison.
pip install openbadgeslibAll dependencies (pycryptodome, ecdsa, pypng, PyJWT[crypto], defusedxml) are installed automatically. See Installation for development setup and extras.
- Installation — requirements and how to install
- Quick Start — init, generate keys, sign, and verify a badge in four commands
-
CLI Reference — the five console scripts:
openbadges-init,openbadges-keygenerator,openbadges-signer,openbadges-verifier,openbadges-publish -
Python API OB2 —
OB2Signer,OB2Verifier,Assertionfor strict OpenBadges 2.0 -
Python API OB3 —
OpenBadgeCredential,OB3Signer,OB3Verifierfor OpenBadges 3.0 -
Python API OB1 — legacy
Signer/Verifier/Badge(frozen OpenBadges 1.0) - Security Model — algorithm pinning, trusted keys, and hardened parsing
- API Reference — full reference generated from the docstrings (pdoc)
Tested on Python 3.10–3.13 (see the CI badge above). For what's in the current release and the full history, see the Changelog; for how releases are cut, see Releasing.
openbadgeslib · LGPLv3 (library) / BSD (CLI) · Issues
Getting Started
Concepts
Reference
Guides
Project