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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5930c23e8a76c68225b4109c5a8b1f476314033ff7da05623d4e185aeee6690a
MD5 98c5ab0b129873ff833ae956d5a4df20
BLAKE2b-256 5f4357a12067b91c8ba4cf86289acac44e2d35186b835275153777ef3eb797e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2298ef91b65c97f3861dc616ad3c705f037c31a5672d5069248ffa741affb62d
MD5 0ee02e3cb7130e71594b72b3f56276e4
BLAKE2b-256 c34568613025b091d723175ccf4714e20009a0f2d158e6f9dd8f1295b79c222c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c73acfa3e9fd4563084e431cca6182055806ce6a9573e7a3002e38fef3b9ea61
MD5 ccaf7053eef22197ac5b0dbde2ea2075
BLAKE2b-256 f45e2764233ccaff76698c3949598e0705d4f0fca6caa0348cc47c2404110b02

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 39788bbcbb62d96de0bf3efd38695877b6be705e71f0343ead809fe6c76670b1
MD5 4ec2d46e0370e3772bbe4d7fa6c1cfcf
BLAKE2b-256 44b43c4f5b4bce0c6c0991b129df849897ce98a5242d550ba75b8f349bfb96ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 62c9937a523fd94f444a2a73e0409d5993c40c516f43defc0d3f4f3205e0f6b2
MD5 133d58f8cc55241cf472a9b30d59b0c7
BLAKE2b-256 0f0393ffa6e403e896292bf8d37e3dcc439c5ea9cb17448822c7a7f28e49e908

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.3-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50910519191aebe97cfe30e784510e969d770e10ab3a520635cf12c20a61a2d5
MD5 01070ee04173fee7db9740d4324d2c7b
BLAKE2b-256 b5f6bb074d4d8bb0fc28aa6e50302b3544f60b34a83c8c87e057ed00362bb2ec

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