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

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c635fb109c9a8a5df2d1b7e40afa4a0edab92f9b852dc1958f3d1248e21d8cc7
MD5 38ef1957e1a357b7873ad6b334caf21b
BLAKE2b-256 2e7f45400bfa34326ef0a78e15dd1e0b4ca74abb1c1db3f17f3c8bf2f9e11c95

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.10a0-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 696fd745509031b0504865efc2c74773a51a6e03de6ede5860fc27ff02227854
MD5 d308b978438f6dec2c0f249065d7285e
BLAKE2b-256 8040a5c1b968e5e01addae7ed395401eb02267ead0350863909284e4d0a548e7

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.10a0-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bb97f153df29efd5895c151aae1b6bc48b540fc683a9c06a954c5148bc5dae3f
MD5 8f7f7e02f050a3b8742c04368a6fafa4
BLAKE2b-256 25aac28d6ce83270f7e12dd2595dff80bf9bc34b5162a236b4b322c77409f6dc

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.10a0-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d6f741e21fb2d4ebc0f19484e7afd9890d80c215d92c650e21e717db4eee59b9
MD5 cd4567a892e66aeb5f8e8496694a2015
BLAKE2b-256 299477276d6569b930e12e524c52dbfe3dcea575d32fa5bed7ce1c7112372a16

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.10a0-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b39476035ec5ca23d7f91b367bffebec24f2e272ed15bdc555c750d067655e53
MD5 f24cc1712d6c724ac4c8758846c51450
BLAKE2b-256 ce76a38aa0d53356f96d868b3bd720a0b6ecf73fcdfb09ba2bd7c3e37b4c8dfe

See more details on using hashes here.

File details

Details for the file sf_veritas-0.12.10a0-cp39-cp39-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.12.10a0-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 76c76f61d0a892c0d5724569930ec254f545463446ec10c6ae42006ef75774e7
MD5 aceb91e5741a3120d721bd4c9309bbb8
BLAKE2b-256 2767ed4e2d29b5cb2ea7e7d7219465f3ba1aa77323641ae9834748b9959fb916

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