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(
api_key="sp_xxx",
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 required for config consistency, but not used directly in endpoint responses.
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.1.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.1.0.tar.gz.
File metadata
- Download URL: seqpulse-0.1.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 |
deb82bebef8a42d06b144317cfd82a74ad4e1e2903f2d70a972b4a756243e2fc
|
|
| MD5 |
57da794ffda6fcd484e3d266bedee31e
|
|
| BLAKE2b-256 |
af5c1ca263c0ee4c5e00c79f6ab2f1afae0ea5ace68b0da87c713f7eb9232687
|
File details
Details for the file seqpulse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: seqpulse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 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 |
37da60c7d6de2533c0f8d5270d65469979bc4b5d9b7f5bce6a63eedd7c5e1dc1
|
|
| MD5 |
17b5df7f5004fa552bc8df115649340b
|
|
| BLAKE2b-256 |
8e5007f446d6898ee8f3eb43570615d85273a6069c587d424fbe6260a807a8ae
|