Monitoring, performance and security SDK for Python applications
Project description
shieldpress-tracker for Python
Monitoring, performance and application-security telemetry for Python 3.8+ with no required third-party dependencies.
Dashboard: https://shieldpress.net/
Install
pip install shieldpress-tracker
Quick start
from shieldpress_tracker import ShieldPress
tracker = ShieldPress.init(
api_key="YOUR_SHIELDPRESS_API_KEY",
site_id="auto",
app_name="my-python-app",
)
Configuration can also use SHIELDPRESS_API_KEY, SHIELDPRESS_SITE_ID, SHIELDPRESS_API_URL, SHIELDPRESS_APP_NAME and SHIELDPRESS_APP_VERSION environment variables.
Flask / WSGI
from flask import Flask
from shieldpress_tracker import ShieldPress
app = Flask(__name__)
tracker = ShieldPress.init(api_key="...", site_id="auto", app_name="flask-app")
app.wsgi_app = tracker.middleware(app.wsgi_app)
Django
Wrap the WSGI application in wsgi.py:
from shieldpress_tracker import ShieldPress
application = ShieldPress.instance().middleware(application)
Manual instrumentation
tracker.record_request("/orders", "POST", 201, 42.5)
tracker.capture_error(ValueError("Invalid order"), {"order_id": 123})
tracker.analyze_request("/login", "POST", headers, body, ip="203.0.113.2")
tracker.record_auth_failure(ip="203.0.113.2", url="/login", reason="bad password")
tracker.record_rate_limit(ip="203.0.113.2", url="/api")
tracker.record_cors_violation(ip="203.0.113.2", origin="https://untrusted.example", url="/api")
tracker.flush()
tracker.stop()
Options use snake_case: api_url, report_interval, system_metrics, http_tracking, error_tracking, security_tracking, dep_audit, dep_audit_interval, runtime_metrics, env_security, heartbeat, app_version, environment, tags, ignore_paths, max_error_buffer, max_security_buffer, and debug.
The SDK never raises a network/reporting failure into the host application. Reports are sent to /api/tracker/report with Bearer authentication.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shieldpress_tracker-1.0.0.tar.gz.
File metadata
- Download URL: shieldpress_tracker-1.0.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb017fa195fb4a0f9b70b615596cef80b2e688fb3a28dcf99528becb899a9391
|
|
| MD5 |
e44b8dedbd101af0f04593d82998652f
|
|
| BLAKE2b-256 |
e1635ace780d42197134e10a7ed87b609caacc4d7baf47263e785540cb49a59f
|
Provenance
The following attestation bundles were made for shieldpress_tracker-1.0.0.tar.gz:
Publisher:
publish-python.yml on vithanhlam/ShieldPress-Tracker-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shieldpress_tracker-1.0.0.tar.gz -
Subject digest:
cb017fa195fb4a0f9b70b615596cef80b2e688fb3a28dcf99528becb899a9391 - Sigstore transparency entry: 2196876347
- Sigstore integration time:
-
Permalink:
vithanhlam/ShieldPress-Tracker-Python@05455edd5e2eaaa0e0fb179ca4df46b460697cd0 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vithanhlam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@05455edd5e2eaaa0e0fb179ca4df46b460697cd0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file shieldpress_tracker-1.0.0-py3-none-any.whl.
File metadata
- Download URL: shieldpress_tracker-1.0.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2357cd385fe11a9ac5155eba2e2aa6fc865bf3eb14b3a23f444ea84b092ef653
|
|
| MD5 |
3f154083c1b5a4cd30d3906238be7201
|
|
| BLAKE2b-256 |
881b2f5618ab280ae49aa630e10f6f35cb56468bc131c19e1883fcb7476d9b91
|
Provenance
The following attestation bundles were made for shieldpress_tracker-1.0.0-py3-none-any.whl:
Publisher:
publish-python.yml on vithanhlam/ShieldPress-Tracker-Python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
shieldpress_tracker-1.0.0-py3-none-any.whl -
Subject digest:
2357cd385fe11a9ac5155eba2e2aa6fc865bf3eb14b3a23f444ea84b092ef653 - Sigstore transparency entry: 2196876573
- Sigstore integration time:
-
Permalink:
vithanhlam/ShieldPress-Tracker-Python@05455edd5e2eaaa0e0fb179ca4df46b460697cd0 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/vithanhlam
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python.yml@05455edd5e2eaaa0e0fb179ca4df46b460697cd0 -
Trigger Event:
release
-
Statement type: