Authenticated and encrypted API tokens using modern crypto
Project description
Branca Tokens for Python
Authenticated and encrypted API tokens using modern crypto.
Install
Install the library using pip. Note that you also must have libsodium installed.
$ brew install libsodium
$ pip install pybranca
Usage
import json
from branca import Branca
branca = Branca(key="supersecretkeyyoushouldnotcommit")
string = json.dumps({
"user" : "someone@example.com",
"scope" : ["read", "write", "delete"]
})
token = branca.encode(string)
payload = branca.decode(token)
License
The MIT License (MIT). Please see License File for more information.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pybranca-0.1.2.tar.gz
(4.6 kB
view hashes)