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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0729309d0409d48a6809e9daa7a64623774b986b53e62547e4858fa3b63b21df
MD5 523fb373716ae0112790828d63bf0fbe
BLAKE2b-256 aa1aaf6d5f889ecddfe772ddbcfab413f5f6b46502e8f7d17aeeab9e9645c2ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bea6a8999d49287b13f0ac2a06acc057e5273883ab6cbc4f3b2756f2a1f81c40
MD5 669a348b341cad910a43694e7008141f
BLAKE2b-256 d0ae1cf9d09bf2fb326594f566ba45dff61fdb3dfde0b24f58ac8d6a414ccc91

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 66635904cd9d243ac88ffae18e47e025ea6f93dcee67dca03b3ec17e7f896a1e
MD5 40f712589395b271f415a323d3be1388
BLAKE2b-256 35167cead16f6308e9eba3f5795858127cb700d74e7d707a6eb7edf184a2bb69

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8b0187d03fd917bba46cc7a7a8ed0d43ddcb27331f5a6176bd7c0cced53ba970
MD5 388cc99758810d56834d5339d72e1078
BLAKE2b-256 b156a0c4803d6cf36c6f83a52b91ef61b572fc63083ea88546b25954fa0af9a9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3f24e0e16bd66670d0eb57cf11488f4c94a310d07915bd51b4964ca91ed78cc2
MD5 5915c3a3ebd86b80edda0a2e5b2b41cd
BLAKE2b-256 0027c8f370f4d6d6db2bb8c558459746fcbec6064460fef3e9badcad3c7412f6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.10.5-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1cb6905924751f71f829b9c95544e7002e258db43ae3f832fe913b206bb94abe
MD5 b32c2d1b359cb04eee81f2b7c51eaf65
BLAKE2b-256 db3ab084eca13a03f8774c96b09f5f656baef4656a248800f3abc79064f0a946

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