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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 476024093d1673525e765c05ece4ab463c1ef8ae642c10c37f61280b2775a2e7
MD5 62c4e9ef6a2d87fc5d75cbb054a93929
BLAKE2b-256 9a3aeabe38403f4728b59045a2a06e2e9f23d4b9cd358e6f9fabb6c15d985870

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 47ecd3bdce914065e6052c81684382a83aa81ac8829f1dd0db58a75f0340f563
MD5 61ebbcc1712cd24449b862b1f61d8f71
BLAKE2b-256 65b9f0affe412f41e917323c2a759cb17cc3df76042f4500ce5544a4537c4d5d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2ea8694a71e6d883e6091909116a18b14da8d487c582b175f043c1c7483a714d
MD5 d788f8ae407e9088620de7321dfc656a
BLAKE2b-256 05b2a6e02a1fb1a310ea353509e52cd74766a10d99c3cf3cf2edd526eea59bcd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2944bce8cae21b6a2a2e8efa2e8e06ebc3590f6a0f8165c09bac4585e38a07a2
MD5 cbc45c69105a7a3a46683102ff93ece3
BLAKE2b-256 b2b7033e5b31b8b44f7d7c7c6b7d0429818bebbed80ef71921d4b628c1649710

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a784a19f5f0db73b0ad8d04fc0bfc1268fd1f94fa4849e2b7e72801d27d70272
MD5 b79e38dcb86f8f485dee54dc02332a7c
BLAKE2b-256 c7cec0ffd41b2a606ef3019e336d7411bcec6b0740b6a7a2fb41f82e7d8e12d0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.9-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38d888083fc7d518a17600cfb3e863209fdf31157dee1d103c89303cbec98681
MD5 ac61b173c4293c072cf978d7d8732a4e
BLAKE2b-256 41383dcbd1e8cf4b355deee7e213b925d16d1c52931203a1bb322422ecd07eb4

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