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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b004f5d3b5e296450e8d778ec44478e1e21acb19a7d8de7a40af88472c828e64
MD5 ac60d1d61ba7b5c9feb9afa58f49087f
BLAKE2b-256 5b1c56355730bfc42826f51cb8cf368458d4d63b68f0a8a033c5021eefc0931a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dd8744ee48371c436d7d9d4c97339cf56001109501df81a8658d7e167bf6be61
MD5 b1c9cb85e51c99609647126f14027715
BLAKE2b-256 c8b81898eabd9b9616fc37602666e40128d307c654b78fec13d6166282e50d9d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 927a2dff2087854d7461d6b76adae423a0c526fa88c8ebb442d4267e8087a5da
MD5 c769611753f86181b6bf4072b2debe00
BLAKE2b-256 64a8ad04aa6a857264db5bf23c690184f125113e89189f809f06d763f12880cc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8fda12c268765d4c4c974213a2674803150c56af831c25f38eb09b76a767e9bc
MD5 b85716fb11987f12fe36976718f980f9
BLAKE2b-256 2ad67f36c37ca5a432714a5b126caaeb51a175a4d2fd448ddc16254ef98f0036

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd930f57f19225fe08e98921009e5d3a0fb2a0eae81f3afa085c450bd75baea7
MD5 55c6aadcb79b9d7b141132f8caa0f4da
BLAKE2b-256 36b94ba749c1d1b8e044a20adb7352e4899b01135fe3469c15169e63eaacf5b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1d69c936a1af8cecac0c563e277434d3cf941b31c801a63472d722221dd9ab6c
MD5 f1a6587e2160014537932feba76b0f5c
BLAKE2b-256 c198a2b239531a1ee3573bd037c53cc52e5c4f86d83242029e1a051f705e07c2

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