septr — runtime security middleware for Python
Protects FastAPI and Flask apps at runtime: secrets leaking in responses, BOLA/IDOR, missing auth, business-logic tampering, PII, prompt injection, SSRF, and missing rate limits. Auto-verified against the Septr backend, with per-engine SOC 2 evidence for your dashboard.
Install
pip install septr
Add your key to .env:
SEPTR_API_KEY=septr_live_...
FastAPI
from fastapi import FastAPI
from septr.adapters.fastapi import SeptrASGIMiddleware
import os
app = FastAPI()
app.add_middleware(
SeptrASGIMiddleware,
api_key=os.getenv("SEPTR_API_KEY"),
)
Flask
from flask import Flask
from septr.adapters.flask import SeptrFlask
import os
app = Flask(__name__)
# ... your routes ...
app.wsgi_app = SeptrFlask(app.wsgi_app, {"apiKey": os.getenv("SEPTR_API_KEY")})
Config
| Option | Type | Default | Description |
|---|---|---|---|
apiKey |
str | env SEPTR_API_KEY |
Backend API key |
strictMode |
bool | False |
Block instead of detect |
secrets |
bool | True |
Secret/PII detection + response scrubbing |
bola |
bool | True |
BOLA/IDOR detection |
rateLimit |
bool | True |
Per-route rate limiting |
inputSanitize |
bool | True |
SQLi/XSS/NoSQLi sanitization |
ssrf |
bool | True |
SSRF heuristics |
promptInjection |
bool | True |
Prompt-injection shielding |
aiRateLimit |
bool | True |
Rate limiting for AI endpoints |
tamper |
bool | True |
Business-logic tamper detection |
missingAuth |
bool | True |
Missing-auth detection |
stripFields |
list[str] | [] |
Fields to strip from responses |
telemetry_url |
str | https://api.septr.com/v1/events |
Telemetry endpoint |
Environment variables
SEPTR_API_KEY— your project keySEPTR_SILENCE_ENV_WARNING— set to1to silence the fail-loud missing-key warning
License
MIT
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 septr-0.1.16.tar.gz.
File metadata
- Download URL: septr-0.1.16.tar.gz
- Upload date:
- Size: 48.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86debc23eb1bb87bce40b7087303f7c493c16d119a1212a59e1840d77080f5ef
|
|
| MD5 |
6ae1d6b6c96eae3baaa06e61be6b2a51
|
|
| BLAKE2b-256 |
f64fe34a8e52910cec3b0cb903175f950073d2b137abc81f82ff2c92ab943de8
|
Provenance
The following attestation bundles were made for septr-0.1.16.tar.gz:
Publisher:
publish.yml on LintGRC/septr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
septr-0.1.16.tar.gz -
Subject digest:
86debc23eb1bb87bce40b7087303f7c493c16d119a1212a59e1840d77080f5ef - Sigstore transparency entry: 2701403409
- Sigstore integration time:
-
Permalink:
LintGRC/septr@be6cdddcaffe574b209a4eb27ff2364b4f2aeab6 -
Branch / Tag:
refs/tags/v0.1.16 - Owner: https://github.com/LintGRC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be6cdddcaffe574b209a4eb27ff2364b4f2aeab6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file septr-0.1.16-py3-none-any.whl.
File metadata
- Download URL: septr-0.1.16-py3-none-any.whl
- Upload date:
- Size: 42.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfd62bb6c5e56ba168bfaf67adfc5e253fa82eb563b0bebfe4fbfda71f3141bc
|
|
| MD5 |
2ddbbf70e4eec8a454223715383ea5a5
|
|
| BLAKE2b-256 |
7fcbf4332d2eb250a984f7e04e9cc965efe670548724391681bfc99ae7c74aa6
|
Provenance
The following attestation bundles were made for septr-0.1.16-py3-none-any.whl:
Publisher:
publish.yml on LintGRC/septr
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
septr-0.1.16-py3-none-any.whl -
Subject digest:
cfd62bb6c5e56ba168bfaf67adfc5e253fa82eb563b0bebfe4fbfda71f3141bc - Sigstore transparency entry: 2701403458
- Sigstore integration time:
-
Permalink:
LintGRC/septr@be6cdddcaffe574b209a4eb27ff2364b4f2aeab6 -
Branch / Tag:
refs/tags/v0.1.16 - Owner: https://github.com/LintGRC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@be6cdddcaffe574b209a4eb27ff2364b4f2aeab6 -
Trigger Event:
push
-
Statement type: