Prometheus http query client
Project description
Drow HTTP
Prometheus http query client of Python.
Implemented prometheus http api: https://prometheus.io/docs/prometheus/latest/querying/api/
install
pip install drow-http
usage
get client:
from drow_http import get_client
client = get_client("http://127.0.0.1:9090")
query as vector:
result = client.query_as_vector("http_requests_total")
for s in result.series:
print(s.metric, s.value.timestamp, s.value.value)
query range:
import time
end = time.time()
start = end - 60 * 60
result = client.query_range("http_requests_total", start=start, end=end)
for s in result.series:
print(s.metric)
for p in s.values:
print(p.timestamp, p.value)
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
drow_http-0.0.2.tar.gz
(2.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 drow_http-0.0.2.tar.gz.
File metadata
- Download URL: drow_http-0.0.2.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d241d4041ac43bf2ce890525394e21e590b2db533072032cec42f6ab0af0a08
|
|
| MD5 |
0e0d11c198b9dea724b1e68f0fa262e3
|
|
| BLAKE2b-256 |
4a50070aa948fc2295ecb73622813e85b8aa3462916ccae4f9352c5bf6ae538a
|
File details
Details for the file drow_http-0.0.2-py3-none-any.whl.
File metadata
- Download URL: drow_http-0.0.2-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07ccfcffe583530b1d609c54c23bf0deb83df2328059208417b897decf155890
|
|
| MD5 |
20aa675e1c8c924df3e1175c35def641
|
|
| BLAKE2b-256 |
5a87c9499f17dca7e17dbb5c5eeed734c8e1428a5b50fa5d366aaee55361d340
|