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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3eb00445b068d1ae3ae7cd870b30f56af0adfffbc9a799c3b8fe49620a2dbffc
MD5 124e7800897b75a6b12faec3e9a10149
BLAKE2b-256 580f58a116d76066a1210e99935604b4fcf898b4be6347bcdaf9f7aec46c14a0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1b32e49f4ba301cbe4aa8cf2fe2668de324cd5e08652546ee032d64923c2bd49
MD5 29a408e50cf88ddc9ff0d046fe9fc83c
BLAKE2b-256 697ede97dcb90d218aad8bf11e8a4540aea8f9e51bb651b853be7e72bbaf5603

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93a3786ae4fa1f9921d85f5fd3b49d7a5b22b81ab6fc7c9915d1ebce4dc0df01
MD5 559467c5a2ef35ed72e844385ec54b6d
BLAKE2b-256 e7fbd2ecc1b6e90a4b405a9eec83a4d4be228d38d2e1fed0bb8f919c2b0d429f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1c2f775980b0213022a65453cc8aa9ca413747e3dad3fd681547e5a3a0804044
MD5 69be732d2d0424185d244f109455f56a
BLAKE2b-256 a1b8bd823338a8a7b4415cd7438a9f666e7f24eb73b95448c3441d9201c6063f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 fd461139e74b9238aa143b8951096389fcbeb86e478659160b8ef9ee10f4680e
MD5 37e6056384777534331abe4fd2df9108
BLAKE2b-256 a6139b0827dcf16901cc71e0f4b72864e79df447036f15b9f15ecb6303c9317d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.13.1-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 27386dd1a4a1bc55f086376c25261f2d4f16c480eab29abe55d020e5e4cc7c12
MD5 d2b955776804e7780b3d9eef60f7fc1e
BLAKE2b-256 2e6f2a1423a525be5add55bb8e7503e2c272b7d148bc5a4f7db89507f25c35f8

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