SeqPulse SDK for metrics endpoint instrumentation and HMAC validation
Project description
seqpulse (Python SDK)
SeqPulse SDK for:
- HTTP metrics instrumentation
- metrics endpoint exposure
- optional HMAC v2 validation on inbound SeqPulse calls
Install
pip install seqpulse
FastAPI usage
from fastapi import FastAPI
from seqpulse import SeqPulse
app = FastAPI()
seqpulse = SeqPulse(
endpoint="/seqpulse-metrics",
hmac_enabled=True,
hmac_secret="hmac_xxx",
)
app.middleware("http")(seqpulse.middleware())
Returned payload
GET /seqpulse-metrics returns:
{
"metrics": {
"requests_per_sec": 0.25,
"latency_p95": 31.221,
"error_rate": 0,
"cpu_usage": 0.42,
"memory_usage": 0.18
}
}
Notes
- This SDK does not manage CI/CD trigger/finish workflow.
api_keyis optional and not used directly in metrics payload or HMAC validation.- Metrics sampling window is fixed to 60 seconds (not configurable in SDK init).
Local smoke test
python scripts/smoke.py
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
seqpulse-0.2.0.tar.gz
(4.8 kB
view details)
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 seqpulse-0.2.0.tar.gz.
File metadata
- Download URL: seqpulse-0.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
133c260fa920750af093fb24bdb93768cb2f8c5676673203776675a0928be03b
|
|
| MD5 |
c7d400a8470e5a98dcd88ecb832fd803
|
|
| BLAKE2b-256 |
b8fafe054877b404966b23862f2c48de319279bbda56e8a78437649755e236f4
|
File details
Details for the file seqpulse-0.2.0-py3-none-any.whl.
File metadata
- Download URL: seqpulse-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3c6a3319ddb59dde90632ced08f6f10002676626347d5be5a3809c098361b829
|
|
| MD5 |
71f6aeaf620b7f13dafa1267cab37e40
|
|
| BLAKE2b-256 |
38989838565e478cf90643a2e37b2252f3f3d517212207568bd65ad684659189
|