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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f34c7064e0733e8a04739738a6e5e59eced3eaf3f7094970e1d898bddc2894ce
MD5 40f4efd955587d41f085d087c3d07501
BLAKE2b-256 ca2926efe90983d6355dad82eb9a81243cc8b38c39ccd4924c0eb2df40b7b7db

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9dcf1c64aedc88b57d479e72ba7491c290b88549a84c3b2af1fe11a9ed3ee67b
MD5 dbfe15d703c98e2b555586403aa094f9
BLAKE2b-256 3c415fd18c5e6b74cec1db8d45d1290cd659ed4cc5d7396e5ae0c8bd1be75e63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b89b41c8f6756c04124665925d6884ae6bba75d72ea155fea18e2c72a6b4df1f
MD5 6332813391cb2327ca093498feb21025
BLAKE2b-256 285fcfcc327848dfd2db13bc97acd7669d6584a15d1825aa4dce64bed0211346

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 22b6c7cbf502835bd23a40a7a7eab894ddbbaef389f787836f9c17f4dd373b42
MD5 52f8b5a36086c6d185f867fcb060a0da
BLAKE2b-256 8fb6314ad677f0c176fcd92f618233a36fe9fd1115d39c71404f6b8940b2f26f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 049983537273c608eb477fdf559cc818eb58362d3ac307533158c1988b92f906
MD5 818a5824873dabfd8db86ed2ade44591
BLAKE2b-256 048a7b4fc79992ea92abb73159935226381209b24506299b5d5c36541d5af2be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.8-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 790b7e30a84668a8d57be109094a50349bc3149ceea2a9306bf3c854ee411753
MD5 6717790dc3c054918e8cb238a4c3cfe4
BLAKE2b-256 ee1156703db801f54810a49ed867a82269ef4250aa1a430a15816958410c56d9

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