Metadata-Version: 2.1
Name: starlette-hmac
Version: 0.0.1
Summary: Starlette middleware for hmac access key
License: MIT
Author: Luca Simone
Author-email: info@lucasimone.info
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: starlette (>=0.31.1,<0.32.0)
Description-Content-Type: text/markdown

# starlette-hmac

HMAC Middleware for the pythonic Starlette API framework

### Installation

```shell
$ pip install starlette-hmac
```

### Usage

```shell
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:

```shell
$ poetry install
```

To run the tests:

```shell
$ poetry shell
$ pytest
```


