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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 302df967d4da87f78491584fe92a9ed20c3c9620f0fc5b27173fec2a1de88092
MD5 df80ccaeaefe674a837f47edbd91bf55
BLAKE2b-256 8ddf9774dc18df16e761b26e05c9623ad3d87b07b4453232c8b87425e29411d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 39fae0545f9e93a6dd2e0b39236e8c187d64f39818e9bbbbd28769ce2a45bb6e
MD5 73c9a172e23fac9b0e33799d7f6a84f4
BLAKE2b-256 5ecc20610ebd41635d81669081073e83b22946b379b2dd28850fc9a372a952a1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 92d3ad4ca30effe364ff4e61f579b100be82064c655e85a9b3d1798d02677fdc
MD5 6b7af6498b96b1b08faaec0239ba7fbb
BLAKE2b-256 7ab3d4b1baeb35a9a33efc32df06c6474ebbb3e78bfc78a84f3be804c70ec682

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 483e856f89529d02290596174b48bc179a994dc59dee9dd46ebd9e6a6cd30908
MD5 9f66d2456c5398aa46127086b31959d8
BLAKE2b-256 7ee80e6564db6bbee9c01586514c9e0922cb55354082e5f23efa61e682e8098c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 af1b2eff8d599c74ee957aee95a4a52ece893ce11ccb1ca4f5927c73d3d47c3c
MD5 f36065ea3ede68306bca20a021275d15
BLAKE2b-256 b87c1738eedf71fb27f6512ee777b9164a85a05c3bf986a24a54679eac6fc193

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sf_veritas-0.12.2-cp39-cp39-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0144341011fa25ac1fc1167af6edc987e4a01cb844295c04713a7d57b3fe2b27
MD5 54674a6a7c1a411d176805a706d833b6
BLAKE2b-256 dbc212be227137974383f77d5a6d0719648db080998f61c71e7f55b859b6c3c6

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