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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d0a2eddc037eb070b6bf432f0e5ad3fbb18b02dc4395281c3a0d677cf454c62
MD5 1a6cea719aedcec03a02a97b3795471d
BLAKE2b-256 68868c17dba5af5bca9c5acc3449f3e8b6303bef341dd040f5f3038cc51129e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eb56e916917ab2e803f7809958d2ecd736ac2a9b8a0722fb7dc90829f5c80efd
MD5 b893340a600290b1260e2774c48a4763
BLAKE2b-256 1bf1681bd8203d42a185368a589621dd3dd4ae964f3fa75f1bfe781193a894b8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4220a5300c2822edd12dfbfb8ff76a6004bcbe4d259f4efd88ad962942838700
MD5 53b1b7c51aecc3b01210009ff5ecb376
BLAKE2b-256 019e86da14e155b65be535129d699c9641b86b2139d1580525245199e1d265f8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 941c8f9211fdeaa6dfbe63ebf74a59f7e8fe0855a8571116e96295c6d16f168e
MD5 52851d916d1df56c3a665058c066c04b
BLAKE2b-256 57b95d365e4ca809d1be45d6f7bbeec7c0a591444a6e761a8ec12d31e6d76232

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8d42ad8826eb91491425205e7dffa758ae77e51f852372e48952724bcfea0af7
MD5 5661808cd19a721354bed213f114f92e
BLAKE2b-256 3092a562c4415ddc5698c5b6a577f21f894064fb0ca5d4a3c8453617a4a7ed2c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 260b1cc277fdeae216613584adb11b9ef1e4b0c2b4f38d4b4e17bdc9534db5e1
MD5 69cfef2f483a2d146b4784b44a06a342
BLAKE2b-256 6667e1020e725886c747748bcf8ab4269a153270be2670e77170525e489fe00a

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