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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dad545376f718a49e0abafe9c02c62073150b056d8e695f776b24266ab980ab3
MD5 51fac7ae842cd57acc7f50427bb2c983
BLAKE2b-256 cdce08595538010097bd4403d6ff25209b9232423166a07d5ea48a3013fc6103

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 00675e96d9d2984cbadccf87e124917f028972cb1ff874b347550c2e6287e6e5
MD5 0e9bcfc1a04d79a5863b948d819282f1
BLAKE2b-256 6c5c248412f421fef799db20bea1caa434a1b06ea784e8ec407ef846f24bd2f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2dd7dec9210cf9307dd74496ac73beaea8703a739ba7b7077dc64db0a897cc5b
MD5 859cbbd9e364f5fb17bc959780178e5d
BLAKE2b-256 1bb2c691445b36488ee43f17c56cecda0c214cde6d293510d9f9c32f677ccd88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d869b3d65201f470c7b48bfb6a9ee8c6156eedc9863b4aa8c2511c43ea2fdd1a
MD5 4545dc058b0a88d3abad97fdafb61eeb
BLAKE2b-256 eeed645fee2a36d9f0fbeab132a79d4d6646550e9fba015953fcc415e64d6ae7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 26cf9895f58ebc8809f399dabaf3f10b2c8840fee9476bf5badaef414b532e8a
MD5 012aee3932e8ca2a8365baaa33c45057
BLAKE2b-256 71ea71e04d24f6636f22c467abbccd069714a28aee52767fcbe2d16126f0cba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2304998d437d5dfc6a40f05d5a41677829093bd14ef711da3b10579f0005d28e
MD5 0f3964a57e3efd6abdb86f04c610fe9a
BLAKE2b-256 3e4391cbd080d64d7e8fd2fc5101814cc0e7d8ea86d9e4a212fe3c34da6263d8

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