Metadata-Version: 2.4
Name: quart-enciphers
Version: 0.1.0
Summary: Encrypted session interface for Quart using enciphers
Project-URL: Homepage, https://github.com/mjlad/quart-enciphers
Author: Mejlad Alsubaie
License: Apache-2.0
License-File: LICENSE
Keywords: enciphers,encryption,quart,session
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security :: Cryptography
Requires-Python: >=3.11
Requires-Dist: enciphers
Requires-Dist: orjson
Requires-Dist: quart>=0.18
Description-Content-Type: text/markdown

# quart-enciphers

Encrypted session interface for Quart using [enciphers](https://pypi.org/project/enciphers/).

Replaces Quart's default signed cookie session with a fully encrypted one.

## Installation

```bash
pip install quart-enciphers
```

## Usage

```python
from quart import Quart, session
from quart_enciphers import EnciphersSession

app = Quart(__name__)
EnciphersSession(app)

@app.route("/login")
async def login():
    session["user_id"] = 1
    return "logged in"
```

### Application Factory Pattern

```python
from quart_enciphers import EnciphersSession

es = EnciphersSession()

def create_app():
    app = Quart(__name__)
    es.init_app(app)
    return app
```

## Configuration

| Key | Type | Default | Description |
|---|---|---|---|
| `ENCIPHERS_STEP` | `int` | random | Encryption step |
| `ENCIPHERS_KEY` | `int` | random | Secret key |
| `ENCIPHERS_KEY_ENV` | `str` | None | Environment variable for key |

> If no configuration is provided, random values are generated at startup.

## License

Apache-2.0 — Copyright 2026 Mejlad Alsubaie
