flask-praetorian
Strong, Simple, and Precise security for Flask APIs
API security should be strong, simple, and precise like a Roman Legionary. This package aims to provide that. Using JWT tokens as implemented by PyJWT, flask_praetorian uses a very simple interface to make sure that the users accessing your API’s endpoints are provisioned with the correct roles for access.
This project was heavily influenced by Flask-Security, but intends to supply only essential functionality. Instead of trying to anticipate the needs of all users, flask-praetorian will provide a simple and secure mechanism to provide security for APIs specifically.
The flask-praetorian package can be used to:
Encrypt (hash) passwords for storing in your database
Verify plaintext passwords against the encrypted, stored versions
Generate authorization tokens upon verification of passwords
Check requests to secured endpoints for authorized tokens
Ensure that the users associated with tokens have necessary roles for access
Parse user information from request headers for use in client route handlers
All of this is provided in a very simple to confiure and initialize flask extension. Though simple, the security provided by flask-praetorian is strong due to the usage of the proven security technology of JWT and python’s PassLib package.
Super-quick Start
requirements: python3.5, python3.6, or python3.7
install through pip: $ pip install flask-praetorian
minimal usage example: example/basic.py
Documentation
The complete documentation can be found at the flask-praetorian home page
Metadata
Release files for flask-praetorian 0.3.18
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flask-praetorian-0.3.18.tar.gz | 14.7 kB | Without provenance | Details |
Release files / flask-praetorian-0.3.18.tar.gz
| Download URL | flask-praetorian-0.3.18.tar.gz |
|---|---|
| Size | 14.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c39a353b402b0f586fd8573de2b6a9b86a3ac50904b209100cad5a78072d57b2
|
|
BLAKE2b-256 checksum How to use checksums |
0420dbf2a01aa4c8145838b4bb5e50177b6c893ebd263e6c7c50c22943444d25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flask-praetorian 0.3.18
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.