Starlette middleware for hmac access key
Project description
starlette-hmac
HMAC Middleware for the pythonic Starlette API framework
Installation
$ pip install starlette-hmac
Usage
import os
from starlette.applications import Starlette
from starlette_hmac.middleware import HMACMiddleware
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.2.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for starlette_hmac-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1952ad62ae808a30920959f7e3b4754989e3f1d9abc6d3e43c18650daf7f322b |
|
MD5 | ee5a4eee38d518601713480962977edd |
|
BLAKE2b-256 | 7304d8e6767c47b1c2d574599e8af0f63155d22cf91d96091c0bf32bc0e41df6 |