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.11.8-cp314-cp314-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.8-cp313-cp313-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.8-cp312-cp312-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.8-cp311-cp311-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.8-cp310-cp310-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

sf_veritas-0.11.8-cp39-cp39-manylinux_2_28_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.28+ x86-64

File details

Details for the file sf_veritas-0.11.8-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 da10926e718d9d560ee46d1d313a23ac97c7f6b61d75809e9bb8d984d1fb068a
MD5 cfe59ac4bd412b974b3db6451b29ab8d
BLAKE2b-256 ab8e5c08c62757fc59a6cae14669daa90d7220abc66079f9daf9bb1052a1b386

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 456c02426e0283943bd50fda1581ec188c1fbedf6927aa6747c937679ba67753
MD5 6ca545037b14026a3ff7e700006e8b72
BLAKE2b-256 9e897db3cc44e5a27c07e53820299de2977adebc089c591212127377641f2cc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2ff2295cb426429a20eebcef324ddbaa7d7f5d8a0c940e4db66f55c01d7dcca0
MD5 661f5208ce4d85de8bbfa5108b4cde8d
BLAKE2b-256 5f7535a9f9ed6e76d42e4c6d0868701daace15774a90f9b62aa9273d595650a8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e986892fff2b3d310ea73428b16930036623b6a9cc0c989d6c68f9dba99be04
MD5 a01a60f6e6bb62f0498fbd4a2b87c7fb
BLAKE2b-256 feb628bd4bd8159017b2d64c33712edf8ccbd8c5058327db0d8359ed3f7618f4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 144828decc24d1d355e9f4185e9dc355f948fe47297d4e4315f11457f8878e3a
MD5 4f987f0f01aceab1aa1ee4be9768506e
BLAKE2b-256 6b7404f09ca618d5aa1c36f6e54776660e6b6c143c3aa010844a2c2faaacd45b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.11.8-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1e319b67618b6451ebe13e5e92a5dc9441c72975b9bbb08a9e215e653164dd6e
MD5 c6c73af27544be2a6f7922d0b9426313
BLAKE2b-256 f1e5f71638180dcfaf3be73d3f0e434ab4b297aef6324b541072ea4fcfa51b2f

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