Skip to main content

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

Environment variables

  • SEPTR_API_KEY — your project key
  • SEPTR_TELEMETRY_URL — override the telemetry endpoint (e.g. http://127.0.0.1:8000/v1/events for a local backend)
  • SEPTR_HEARTBEAT_INTERVAL_MS — heartbeat cadence in ms (default 60000; set 0 to disable heartbeats)
  • SEPTR_ENV — environment label sent with events (default production)
  • SEPTR_SILENCE_ENV_WARNING — set to 1 to silence the fail-loud missing-key warning

License

MIT

Metadata

Release files for septr 0.1.23

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for septr 0.1.23
File Size Uploaded Provenance Actions
septr-0.1.23.tar.gz 50.2 kB With provenance Details for septr-0.1.23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for septr 0.1.23
File Interpreter ABI Platform Actions
septr-0.1.23-py3-none-any.whl Python 3 none any Details for septr-0.1.23-py3-none-any.whl

Total release size: 93.6 kB

Release files / septr-0.1.23.tar.gz

Download URL septr-0.1.23.tar.gz
Size 50.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b8f91b0ead8630a91faed4e9e4fc90d3a47c1a738d00ab1d20c4787fd394a3a6
BLAKE2b-256 checksum
How to use checksums
c5b8d936f4d384f103f55ae948cade9f4f33df3301f10dbc16d886ade93bc98f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / septr-0.1.23-py3-none-any.whl

Download URL septr-0.1.23-py3-none-any.whl
Size 43.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e05e390f7979c5987f50e12d262cca6e14eee4116b212740990b43e79fb105d4
BLAKE2b-256 checksum
How to use checksums
9df2cd5db4e6bda6251ae3fc653ececd82fbda865b273dc67fb8f66ced4702a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Security for septr 0.1.23

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for septr-0.1.23.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page