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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9586e0f79d3501b8f658088d67e85d94ae0cae275a677e2d436452f518a9c99f
MD5 33bc09d1a7f8c8eeffae9373efd06f6f
BLAKE2b-256 6690bb4eeec0d8579928a864ddc001b0b182a2ffa36c2ba9c23c5185f6a489e8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7c6f568d5daf08881eb0de1e5b0ffd96ba0449c9aa2f4b01df6b66ce88097614
MD5 8906bb56cad804deb20304d343fd82cd
BLAKE2b-256 242b73ad80d6ecff0c060394cf2fa425c0588882186417cceca421414bc17494

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ac05c20fb2e551a56331a80c05481874ad8410bd4e0161e9127c91704b4178db
MD5 2b80bff21ac82a08d0de4514912ddafa
BLAKE2b-256 5549135049f18f0769ab8f3e09039e52a383c81bb03b68e573ecd0b0787bc051

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 825a51699da211e14a0e5d8cc15c6457f08cc7a29fe6ae6eeadf7aa061a07ed6
MD5 2c947faaf9c1090bd5ae5dcd50f7f0b5
BLAKE2b-256 ee3d1a7d5dfde8a1e86f399ec6fb0d1a68a2a9162e1f36e6a2e46be7f1859c07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5cd99ff7c66bd36ee39034a0c0d4a25da7c9130def3c967f3a0e2439a012798a
MD5 18b2e42a53e17c1de0e8683fad837f9f
BLAKE2b-256 b41c271f1f1a183f94eb2294b9a8742aedf428b2fcb04fcf4afeeae9018ebcfd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.11-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dc7bce55ab354f5ceeea5f00bb57c3213e3742e25c2beeb930d9f832c7dbfb6b
MD5 290491bfaca7de9aee31fa9d54ee4b7f
BLAKE2b-256 9bc7ab14418a77fd2495fc9c1b5ce667f5cb9a269f03ddc59bdf921f45d50e34

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