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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0e037b4936b3a2a51cfc176d3230beda14f99ecd318ae53930957bc195a8990c
MD5 a920900e333d7a9ee202a38813dd166b
BLAKE2b-256 5876be8af6bbd68bf9002a5a9ee3f41fb7214b331f854119afb5099df17f5244

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df0e06f948954b7ddb7bda4b9d9522599eef46e9307eb0f3a0c675512e83d39b
MD5 69ec3036efa4fa55375539885f50c831
BLAKE2b-256 710006f4894a6738430a129ee7b9bf96a17cd187a02204716eed97b3410737d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2f1923fc097db94f39fc1e64db352cfeae50668a80f07b7cec7c600e5450c7c5
MD5 d3747692634da0a8be659d3dbf81d7f2
BLAKE2b-256 21d144b9e86b90385cf0985b1fe8bff5ca884cdab223963bcf319c9f9f4a896c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1a5431ab5e3bb4391705a2fa5562dc747462464369196ae284fd63f7ba40a6b5
MD5 2deac4530624c883e08b93bbd257e41c
BLAKE2b-256 47ab0cfdde036b36cc04c7a08bd3bd94356546f5053f8a2f353983c121841632

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9df6cb4e3aa9779b44ae0623b443b3554b21c21624a5ae22904fe2b1d7f3eff9
MD5 c9b0e68a101c8feca8f3e7191618ec21
BLAKE2b-256 ba7caeeef95b3a0c20f4fbb1ddb4f6d280cdd64e507be124528ee5e3bd5f29f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.10-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b47fdd1164537395adff2bc4e624630bde13f8f9e5434b94ce503b7f220704d1
MD5 914e7a0eba626673969ef51a92bac1a8
BLAKE2b-256 bb882c81b18e91d513a0fb282a53a7635ddbfb36d67c4893b9089229c7fb8a46

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