A previous release had provenance metadata, but this release does not. View details.
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_...
Telemetry, heartbeat, and auto-verification are on by default whenever
SEPTR_API_KEY is set. Set "telemetry": False to run detection only
locally.
FastAPI
from fastapi import FastAPI
from septr import create_septr
import os
app = FastAPI()
create_septr(app, {
"apiKey": os.getenv("SEPTR_API_KEY"),
})
(from septr.adapters.fastapi import create_septr works too.)
Flask
from flask import Flask
from septr import create_septr_flask
import os
app = Flask(__name__)
# ... your routes ...
create_septr_flask(app, {"apiKey": os.getenv("SEPTR_API_KEY")})
(from septr.adapters.flask import create_septr works too.)
Config
| Option | Type | Default | Description |
|---|---|---|---|
apiKey |
str | env SEPTR_API_KEY |
Backend API key |
telemetry |
bool | True |
Send detections + heartbeat to the dashboard |
telemetry_url |
str | https://app.septr.dev/v1/events |
Telemetry endpoint |
projectId |
str | derived from key | Project id; auto-read from septr_live_* keys |
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 |
publicRoutes |
list[str] | [] |
Path prefixes treated as public (e.g. ["/api/v1/feed"]) |
publicRoutesExact |
list[str] | [] |
Exact paths treated as public (e.g. ["/"]) |
stripFields |
list[str] | [] |
Fields to strip from responses |
maxResponseScanBytes |
int | 262144 |
Max response size scanned (bytes); larger responses stream through unscanned |
maxRequestInspectBytes |
int | 262144 |
Max request body inspected (bytes); larger bodies stream through untouched |
engineFailureThreshold |
int | 3 |
Consecutive engine failures before the breaker skips that engine |
engineBudgetMs |
float | 50.0 |
Per-engine time budget; slower calls count as failures |
disabled |
bool | False |
Emergency bypass — pass every request through untouched |
securityHeaders |
bool | True |
Report responses missing security headers (disable when another layer manages them) |
Environment variables
SEPTR_API_KEY— your project keySEPTR_TELEMETRY_URL— override the telemetry endpoint (e.g.http://127.0.0.1:8000/v1/eventsfor a local backend)SEPTR_HEARTBEAT_INTERVAL_MS— heartbeat cadence in ms (default60000; set0to disable heartbeats)SEPTR_ENV— environment label sent with events (defaultproduction)SEPTR_SILENCE_ENV_WARNING— set to1to silence the fail-loud missing-key warningSEPTR_DISABLED=true— emergency bypass: pass every request through untouched (no scanning, no blocking) while the SDK stays installed
License
MIT
Metadata
Release files for septr 0.1.24
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| septr-0.1.24-py3-none-any.whl | Python 3 | none | any | Details for septr-0.1.24-py3-none-any.whl |
Release files / septr-0.1.24-py3-none-any.whl
Loss of provenance
This file belongs to a release without provenance metadata, despite a prior release including this data.
We recommend further investigation before installing this file. View details.
| Download URL | septr-0.1.24-py3-none-any.whl |
|---|---|
| Size | 49.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b4044de21fc85927e0d809b993153a36584fdb399795506ba4d883a1009c79a
|
|
BLAKE2b-256 checksum How to use checksums |
c8cec9d145b7ca60f878ca2bdb725dbea4b2761d1914c740ec238d9d1655564d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.10.12
|
Security for septr 0.1.24
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Loss of provenance
A previous release of these files had provenance metadata, but this release does not.
While this could reflect a routine change by the project maintainers, it may also indicate that the release files have been compromised.
Release comparison
- Removed 0.1.23 2 files With provenance
- Added 0.1.24 1 file Without provenance
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.