Skip to content
github-actions[bot] edited this page Jun 27, 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 both OpenBadges 2.0 (JWS assertions) and OpenBadges 3.0 (W3C Verifiable Credentials as JWT-VC).

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 OB2Badge, Signer, Verifier for OpenBadges 2.0
  • Python API OB3OpenBadgeCredential, OB3Signer, OB3Verifier for OpenBadges 3.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