Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_enciphers-0.1.1.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

flask_enciphers-0.1.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for flask_enciphers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 20494d632c01562b41c3a0e4e2b33bfaedc8be6955f894acef073a9806816e55
MD5 f49604d1f25a32adb8eefbc18d319258
BLAKE2b-256 bb4be0833713616fe67e4b74a0a6453aa0fb93102b2c8f4fdec4840f29c53bc2

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_enciphers-0.1.1.tar.gz:

Publisher: publish.yml on mjlad/flask-enciphers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_enciphers-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_enciphers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9f5685b0ab7ef487abe2d9ea8ad7b4d09d81c75c6d3898efd63ebe671a7d65b3
MD5 046f16f2764bbdead7e0a1652d3c69c8
BLAKE2b-256 ec9c042afcb293caf316b26c0ee15dc14925809a42dd6bb857d648a2936fe406

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_enciphers-0.1.1-py3-none-any.whl:

Publisher: publish.yml on mjlad/flask-enciphers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page