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.5-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.5-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.5-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.5-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.5-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.5-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.5-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 be73b0efda6d0938355ed79171be95475dcc2184b8cb10c66915af44e5c6855e
MD5 989f7aae600b94bd448b1c4863f44cf8
BLAKE2b-256 f511b4b30df3642fa4b5688ed62a289f7acaf09be433cc820222ab0642f1ed84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4d9539aca9221ebdd6a2ad482206adfa6534c346bddd923d4d82195cfaf0f854
MD5 7721db1e3bd92bd42c9a938a70fa625b
BLAKE2b-256 f009d9334f8a3db74b469193331cc418be526495fec75add7c3355c3784a42aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c9059ec9dd9f5eb2f24240c82cdf4d7e64fc80b855b32d6882e97d51f44eb98a
MD5 e31a5a58d2143784a6c409e2f19b0917
BLAKE2b-256 7b3779cbd51cfff90c022c6416da37159c78a7a45cc21fc022801f3c89ea51c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a06f0fddf1371d6058f650eab862c072cbc0ff08eec7b8b64505923bf5d382f1
MD5 d7aaa1db4635a5cfaf1d09bb24935138
BLAKE2b-256 f693ff4f0bbe6624be81f976a3139f42b063d7b162160bbb4866345d833d4be3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b209e92b4346814e88ed1b1735c3999bdb55706812bca64e561f5bc882cc9a2
MD5 5df93749454efb7e9c9d42ef68b61ef1
BLAKE2b-256 850e01d63e6a7c8b54d716dc090e877140eb4dc61df715902e830486d546630f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a48f7d71a4c601072c70a4999a144c0d9bef5328b4a7c5236a13f1f0baae6d55
MD5 66950ff05f9030272212c5ab6d24cb71
BLAKE2b-256 825862e16792cf7f11eb77a709bc4ef3d0884d4de4717e3a3b13cf013fa9aaab

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