Encrypted session interface for Flask using enciphers
Project description
flask-enciphers
Encrypted session interface for Flask using enciphers.
Replaces Flask's default signed cookie session with a fully encrypted one.
Installation
pip install flask-enciphers
Usage
from flask import Flask, session
from flask_enciphers import EnciphersSession
app = Flask(__name__)
EnciphersSession(app)
@app.route("/login")
def login():
session["user_id"] = 1
return "logged in"
Application Factory Pattern
from flask_enciphers import EnciphersSession
es = EnciphersSession()
def create_app():
app = Flask(__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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_enciphers-0.1.1.tar.gz.
File metadata
- Download URL: flask_enciphers-0.1.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
20494d632c01562b41c3a0e4e2b33bfaedc8be6955f894acef073a9806816e55
|
|
| MD5 |
f49604d1f25a32adb8eefbc18d319258
|
|
| BLAKE2b-256 |
bb4be0833713616fe67e4b74a0a6453aa0fb93102b2c8f4fdec4840f29c53bc2
|
Provenance
The following attestation bundles were made for flask_enciphers-0.1.1.tar.gz:
Publisher:
publish.yml on mjlad/flask-enciphers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_enciphers-0.1.1.tar.gz -
Subject digest:
20494d632c01562b41c3a0e4e2b33bfaedc8be6955f894acef073a9806816e55 - Sigstore transparency entry: 1808879435
- Sigstore integration time:
-
Permalink:
mjlad/flask-enciphers@7d0bf826de3ba8a2f4f18a7b5432a78d353222ae -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mjlad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d0bf826de3ba8a2f4f18a7b5432a78d353222ae -
Trigger Event:
push
-
Statement type:
File details
Details for the file flask_enciphers-0.1.1-py3-none-any.whl.
File metadata
- Download URL: flask_enciphers-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f5685b0ab7ef487abe2d9ea8ad7b4d09d81c75c6d3898efd63ebe671a7d65b3
|
|
| MD5 |
046f16f2764bbdead7e0a1652d3c69c8
|
|
| BLAKE2b-256 |
ec9c042afcb293caf316b26c0ee15dc14925809a42dd6bb857d648a2936fe406
|
Provenance
The following attestation bundles were made for flask_enciphers-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on mjlad/flask-enciphers
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flask_enciphers-0.1.1-py3-none-any.whl -
Subject digest:
9f5685b0ab7ef487abe2d9ea8ad7b4d09d81c75c6d3898efd63ebe671a7d65b3 - Sigstore transparency entry: 1808879460
- Sigstore integration time:
-
Permalink:
mjlad/flask-enciphers@7d0bf826de3ba8a2f4f18a7b5432a78d353222ae -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/mjlad
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7d0bf826de3ba8a2f4f18a7b5432a78d353222ae -
Trigger Event:
push
-
Statement type: