Skip to content
github-actions[bot] edited this page Jul 1, 2026 · 4 revisions

CI PyPI Python

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.

Install

pip install openbadgeslib

All dependencies (pycryptodome, ecdsa, pypng, PyJWT[crypto], defusedxml) are installed automatically. See Installation for development setup and extras.

What next

  • 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 OB2OB2Signer, OB2Verifier, Assertion for strict OpenBadges 2.0
  • Python API OB3OpenBadgeCredential, OB3Signer, OB3Verifier for 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)

Version

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.

Clone this wiki locally