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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d5a333dc29b7cb891af07934f4ca18c66884691fcf2772acb007c542cfcf5312
MD5 3601413f36d77aaef9dd3baf28136fd4
BLAKE2b-256 0f8486ba3209ff8b7f2f054e2958046ab4b9103c399c7ed91e7de2bf121da9de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f961729cdebc77bc947c945fc5741754a1dcd54373cab914076a6c5a3a1e2a6f
MD5 6d22012b4cb9c201799deae7d545ac59
BLAKE2b-256 21080d80e261d8d3a71d501d07580514924b8fb0c37ca6e10ff34e6bb858c1b0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 410ba773f32aa16a75a8c3c870d60e45967d1712fe1ca108d9248e239ff66f39
MD5 67a9bc6bc9a7da5ad350f4fb1b8de7b5
BLAKE2b-256 312177b578f625f88a14061665ec5fdcbda4c0ec5c0ea41349a8a4e75e5b7da5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8aa8e89e9a3cfb007771a4320f24ebcbb5b1c3b267944edf37671fc8434c02f4
MD5 e81e851fbf8e43ad6a59a75224d5ffe7
BLAKE2b-256 fb3d6655a76a415259987d0d9a78f39b7ef2ccc0a90c9e33f6dc1593756f24d9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 35fede8cd45d422509a5ca2774df5d8dde1826298214d0cf2445bd381c608197
MD5 dd2b875389440b5e5805a8b7764d2bc2
BLAKE2b-256 3d41b33f5c888fb3d4e435b5d5ec08178d92e5b92098fc92080351cacc56485c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.9-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 202b273c356b75716a6802672d2dde52722e877791270be747148b2b1a7e19b6
MD5 4565aaad07e6133d15cc8b56cbd19ef5
BLAKE2b-256 00af8ae9cb6ac88437cfcfc8b9204cf55fd6aba69391aafe5298767d130129aa

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