PASETO for Python
// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Around since 2018 and still shipping
// how to help
// readme
PASETO Tokens for Python
This is an unofficial implementation of PASETO: Platform-Agnostic Security Tokens for Python.
PASETO versions supported: v2 (deprecated), v3, and v4.
Use v4 for new projects (or v3 if you need NIST-approved algorithms).
PASETO v2 is deprecated by the specification; pypaseto still verifies and
creates v2 tokens but emits a DeprecationWarning, and v2 support will be
removed in a future major release.
Installation
pip install paseto
Python 3.10 or newer is required. All cryptographic dependencies ship as wheels (libsodium is bundled in PyNaCl), so no system libraries are needed.
Usage
Build tokens with paseto.Builder and read them with paseto.Parser. These
follow the API of paragonie/paseto,
the reference implementation, and are secure by default: