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.11.10-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.11.10-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.11.10-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.11.10-cp311-cp311-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.10-cp310-cp310-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.10-cp39-cp39-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9b7bc70d6b620151b9039c209db2c304022d74d3454abefaf66e78981b6a4d0e
MD5 e770696d2577352fe236330b2fc786c9
BLAKE2b-256 7520e2c46ac3465e5d23aedfb512fe7b60f9f123ef1ecab40e1a025a0239b62a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93f593c50c01444c2d885b0aea473de3a492874bed9020c7053aa9288e02919d
MD5 773d80c2b97464008f0131bdae5f3ecd
BLAKE2b-256 a7a70d963fead952a19a0949c8af180593c634b8f274053066cd072e33bc61cf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6bf9e190a9d99087eecbcdf5787c0519194f78b688d223c3cd7f02d43f8a7e2b
MD5 8963f1ee5948f6b06eac23cbd05a1210
BLAKE2b-256 c728bb0de28cccf29c820b25d89feb858fcd2eba31ff4b9588de2fc567284160

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af8516b3cb1659938d2328d54237145c0c780de246539fe9fb50008c6e63dc72
MD5 5bdc39d81eecd627f8731e19507d9113
BLAKE2b-256 1094749b1c2d25eeabc8ef718f9317256166e10fa71c05326e7b19c941cacfa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ad982a20f1e5325c9c366437d3964eb6bacabe7df15b66f858a068a46e32b538
MD5 91904b07e49291eeb31f05a79f62e8c8
BLAKE2b-256 9b89d3bf59b0bad4384ac9d114bcc6028d227dbeca767224b0b7f452c388592c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.10-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 914091ed2403be6f2fca83e49ce786348a95e065d2458a4b2408c03e54131c6d
MD5 e9cd408de947fdca45d9d3787a9bd019
BLAKE2b-256 0e9e14adda51304de055d78658c98538c18a52894d4b91ce43f39c2e0afb489e

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