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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c4c22356158534719be53f854cf48c8cd70a2c9de31ef2afc00f6943face8d99
MD5 d8cdbe3690a6ae786e9d339c4e13da8b
BLAKE2b-256 0bd890a08a3dfe8bcacfaf8a61a08ac5799846ef8e4cc0a45cdbb2c7f89be1aa

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 737922c884ec4fbdf0a4cf8ea4bbc01a463d2bf12ad43a529212145a544885dd
MD5 53641b89854bfe0b16290986166f9f59
BLAKE2b-256 79eac0967fc2238d3821474b1da1b8c142f084260d32efadc77f6e2f160a090f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e3eb61056b03bc4f5bc614baec96f15f76c9ab2584900f5a32f883d1fdb66927
MD5 0f1e5da0e9d4f584c3498fb166a3a933
BLAKE2b-256 cab52f266baf16cc176c917b986391e805ec9e1c249dbeeb8ffb22474864763a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c593dc7013b61b742e4d7e2c4c6bece24a1ec545e01fd8be2914a68755172e6d
MD5 fe560c4b143c86182b6f69823e2c004f
BLAKE2b-256 33a4ff15d4c4b6052d0387eb53ef76cbd0005f3a42ed10117383864c0012a7c9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5e8d74d1f66493028b0fc6f93aa578e554a9829d53dee5c4da15438bcca33765
MD5 ca10b1c2b0527948018d0cd94ec72387
BLAKE2b-256 8a3e8d4c9982e7419e2f9ca400d084878e4e11ffd2e14cc8bffb86181636ca3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.4-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b133b2be04191ca389c83b077e7f44515054c058267a909ca4ce467b96b64e1
MD5 7f3c286d8d4b87baf6c7456a77a1bb2e
BLAKE2b-256 138c3339a90b5f9342c9c3d5c75a4a69e5394b61c6fb28ec6ff638ff59e5d9cf

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