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_...

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 key
  • SEPTR_SILENCE_ENV_WARNING — set to 1 to 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

septr-0.1.22.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

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

septr-0.1.22-py3-none-any.whl (42.6 kB view details)

Uploaded Python 3

File details

Details for the file septr-0.1.22.tar.gz.

File metadata

  • Download URL: septr-0.1.22.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

Hashes for septr-0.1.22.tar.gz
Algorithm Hash digest
SHA256 ada4df7ce88eebf7a2e5254c2b7422b5a8c3f9fc33d8c123f184329b2a7350c9
MD5 d905dcd7254d4503ade589e26ce82436
BLAKE2b-256 aff3d4de1d29805b7812adec4bdcca52c21a5f32dcde2e34e356ad4753dbb367

See more details on using hashes here.

Provenance

The following attestation bundles were made for septr-0.1.22.tar.gz:

Publisher: publish.yml on LintGRC/septr

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

File details

Details for the file septr-0.1.22-py3-none-any.whl.

File metadata

  • Download URL: septr-0.1.22-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

Hashes for septr-0.1.22-py3-none-any.whl
Algorithm Hash digest
SHA256 3bea1a81c8eb5875e4cf91c9527b2b21708b451d9149b2db8589c57efe8c61d3
MD5 f26ea52359154ef4b3993487225be136
BLAKE2b-256 09366eeee9c6df95fa54d1b99e43de0169374de761e063d6fe3f884ec3a8d765

See more details on using hashes here.

Provenance

The following attestation bundles were made for septr-0.1.22-py3-none-any.whl:

Publisher: publish.yml on LintGRC/septr

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

Release history Release notifications | RSS feed

This release

0.1.22 This release

2 files

0.1.21

2 files

0.1.20

2 files

0.1.19

2 files

0.1.18

2 files

0.1.17

2 files

0.1.16

2 files

0.1.15

2 files

0.1.14

2 files

0.1.13

2 files

0.1.12

2 files

0.1.11

2 files

0.1.10

2 files

0.1.7

2 files

0.1.0

2 files

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