Starlette middleware for hmac access key
Project description
starlette-hmac
HMAC Middleware for the pythonic Starlette API framework
Installation
$ pip install starlette-hmac
Usage
from starlette.applications import Starlette
from starlette_hmac.middleware import HMACMiddleware
from starlette.middleware.authentication import AuthenticationMiddleware
shared_secret = os.environ.get("SHARED_SECRET")
app = Starlette()
app.add_middleware(HMACMiddleware, shared_secret=shared_secret)
Develop
This project uses poetry to manage its development environment, and pytest as its test runner. To install development dependencies:
$ poetry install
To run the tests:
$ poetry shell
$ pytest
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
starlette_hmac-0.0.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for starlette_hmac-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09ea8518384658938c58f5a13035c719941c1bf951ded40a81b850a155dc12d9 |
|
MD5 | 663c516af5d5beb16b74c9034bcff0a3 |
|
BLAKE2b-256 | a2ee8de0972b45423fe5b1a811244c924c1ba6a1933cf55e0de2241d0fb9a24d |