Skip to main content

Middleware for Django, Flask, and FastAPI to intercept requests, logs, and exceptions.

Project description

SF3 Middleware - Currently transmissions are diabled

Middleware for Python (Django, Flask, and FastAPI) to intercept requests, print statements, logs, and exceptions while persisting tracing.

Installation

Use Poetry to install:

poetry add sf-veritas

Usage

Django, etc

Switch the following:

python manage.py runserver 0.0.0.0:8000

To:

sf-veritas API-KEY python manage.py runserver 0.0.0.0:8000

TODO - Rename all Sailfish artifacts to Sailfish.ai

Network Hop Calculation Time

To evaluate the performance impact of this package, we benchmarked 1000 HTTP requests with and without the package enabled.

Configuration Mean (ms) Median (ms) Std Dev (ms)
✅ With Package 79.12 54.00 111.18
❌ Without Package 69.70 52.00 73.78

⚠️ Note: The package introduces a slight increase in mean response time and variance. This trade-off may be acceptable depending on the value the package provides (e.g., additional logging, monitoring, or security features).


Optimized Entrypoint Capture (Post-Refactor)

After optimizing how the user-code entrypoint is captured (via faster stack inspection), we observed improved stability and performance across 1015 analyzed requests:

Configuration Mean (ms) Median (ms) Std Dev (ms)
✅ With Package 142.45 138.50 80.78
❌ Without Package 131.07 127.00 35.75

⚠️ The optimized implementation added a slight increase in mean latency (~8.7%), but this tradeoff is offset by improved accuracy of entrypoint capture.


Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

sf_veritas-0.12.7-cp314-cp314-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

sf_veritas-0.12.7-cp313-cp313-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

sf_veritas-0.12.7-cp312-cp312-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

sf_veritas-0.12.7-cp311-cp311-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

sf_veritas-0.12.7-cp310-cp310-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

sf_veritas-0.12.7-cp39-cp39-manylinux_2_28_x86_64.whl (5.0 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

Details for the file sf_veritas-0.12.7-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ba2330f1c4f965b155a869dffebccb6fb5b7e01224f393cc6424b117a47c1713
MD5 61150e9d266fb6dde2e1c46efbea33f5
BLAKE2b-256 ae6b919d4ca25acef4ad87e7cf1b77d26601f67f753ff34ff2cd04ca51e59a87

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.7-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 19ebebbbbb2e309f75c2120069d5a98a94bf43c9bc508cf893303644ed902906
MD5 cb114f8578777b57d1dd650748ccb44a
BLAKE2b-256 ee43e6f79d02845c870445b7d5a4e94242af334f0d19d5c93218af84a2c8ce61

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.7-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7e6b5fa913c89db8142939c75539bd4ad71bc7a7d438081e7be2869fa9b9ba6c
MD5 389002e65a4280a2210ce5192c4980ac
BLAKE2b-256 f60cfe98ab40e7e362fa88bba226d0d858f750c265e1ed83e64e6ea6ad70acc6

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.7-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9731da8928c29b38670342ff94a7fb58687e2a9e23df7618262e456eacb477e4
MD5 9bf1e40a5e404db480213f249b911495
BLAKE2b-256 688c9fcb797b75759330b7ddc8f37f03c81827f853202ee8cc5d9baa81c6c22f

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.7-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 def7f074097fd0b0cae465f7ccbde3ad4c038b5bb1f390532964a8a12ff73800
MD5 850eff138ca32c1511404f53858d4b05
BLAKE2b-256 392b9700f372cb2835e0758a1dd1ee888bf27f25a848fe3763117088f329bf88

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.7-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.7-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 252b1efe70bb5c11853130f4ac0d50a787a3a6796bc94ad39e80727c5d5481c4
MD5 ae0b0dc4e24ed0b3ec05f2c90bd00bbf
BLAKE2b-256 415ef752e4398e64ebd581970da6a3d3a0ea6267b97fdf4720704d0e5e327541

See more details on using hashes here.

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