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

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

sf_veritas-0.10.4-cp313-cp313-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

sf_veritas-0.10.4-cp312-cp312-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

sf_veritas-0.10.4-cp311-cp311-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

sf_veritas-0.10.4-cp310-cp310-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

sf_veritas-0.10.4-cp39-cp39-manylinux_2_28_x86_64.whl (4.8 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 db8bcd4393be3d7d446c7228d92594aef9193801880b8edbdf78d68864df721b
MD5 4d8405582774fab54e55b0fc54c9b18b
BLAKE2b-256 e547b82e9daa276582542afd63db1bceb8b8a83202eb43e0b48995ce6eb2f056

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 16609c3058d52c334cf4290f84dbde0e1da0701a5f9596bd37aaccc748ef3912
MD5 c888f85336fda294adbaa111ff934ba9
BLAKE2b-256 307c7900d9f3b006c384b40c75cac470d480832f8f09aca4e49ed1c1ba5289a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 585ea05f4f027c88ff01dfcc312f7846b7011691300ad8144ba8bc6f2ffd9b14
MD5 e8d9f0ffb32da6aa19093751e4098ba2
BLAKE2b-256 29217e8e2b5687bf64a763882e3970f9b2501c5cc1233abd3ddd5e10122b7775

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ff77f61e469037d6fa68230c97a8b87f1f31ca8699d6fae804ac160f83c16c1a
MD5 c92e1b64c2d8557bfb48caa0afd13b17
BLAKE2b-256 e8b9623d9b6af7e292863ddac97951d6643eb3a22b9400aa7c3300399b6a110a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 335173d8b425f544ee0cf02a6f8a1b0188a533b805bf0a0a3ad9c3dd09e13ba2
MD5 bed2749608f0ef33088fad6009edee90
BLAKE2b-256 c2a3722842ade1b4b95875a3c1dec53949939e9094635a45ddfcf9d023623654

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.4-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 82eb7334dc9207355894734f5d3363ff50c2e35d414e20b5c08c9f6248911de1
MD5 2ca1275399642b2f9ff02dcca57ce421
BLAKE2b-256 7e81178c9483043c8e8a402baf62dc35bb3e6b8a3903af6cbba4a69317f940a9

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