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

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.7-cp313-cp313-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.7-cp312-cp312-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bb119ae9e735fdfcc1d83b76de82d742d33b57fb941b110178787ea8fde67fd6
MD5 f98283bbe124738b1221aeb2dfb64628
BLAKE2b-256 63e24d3178bf057cb16f04480fefbbf71a20717de3f2170c3c6b6dc9d400ad92

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 28c317662d52235f45b7adc932cad16956e123c5b1d792752e9c478140b46fa0
MD5 a0e84e72cb91178f22138174d36a418f
BLAKE2b-256 c135b903f82f221be6a9d7bc6137f64e84ed01d4a004d1a128a507854c21437b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82f3ed9986fcfefc51a2d542838863311c573f2d842b21974d525a9fc3a2bd6b
MD5 8052a412b8a1f9851fce92f47b24c6a5
BLAKE2b-256 1151c4be276983785bf94a8a80fbea9831d4fbe685bb3364cc82e02cb740892f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 04758bae57d8affc72e99db2157895740470a12501a84a72d00d0455376fd722
MD5 4940c5d70ac53c56c17ede7f6690cc96
BLAKE2b-256 0ea7045c838a246d07d7719e80d0beba1b7d28799ba3a6f018d149995fdc5b32

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2847f1caf857ea0c0002334103c557b8baf40e3554dccb06d72d6e516b3eb25a
MD5 ad1a692173ca73b89d1efc7d18d7b38d
BLAKE2b-256 dbccbb5b8fc5d500b3e937b691dd960da39783a0e0579eac5b9ce8a132021ade

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.7-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ae26a9d78eadb098f86cd4509d278ae3a275fc920b0a3d2228fd0b2941376d92
MD5 0b7a6c3d5e977837c33597117371a570
BLAKE2b-256 35bafcc48d81dd2fd8a3e9cdbf42d34116758ad46e5f08096fa21d0ae8c4afd4

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