A simple prometheus http sdk
Example
- import
from prometheus_http_sdk.prometheus_http import PrometheusApi
- get data
data = PrometheusApi("http://prometheus").query_range(
query=":node_cpu_saturation_load1:",
range_time="6h",
)
print(data)
- get all data
data = PrometheusApi("http://prometheus").query_all(
query=":node_cpu_saturation_load1:",
step=60,
end=time.time()-600
)
print(data)
- convert to dict
data.convertDict()
- convert to dict with tensorflow type
data.convertDict(tfType=True)
- convert to json
data.convertJson()
Release files for prometheus-http-sdk 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| prometheus_http_sdk-0.0.4-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / prometheus_http_sdk-0.0.4-py2.py3-none-any.whl
| Download URL | prometheus_http_sdk-0.0.4-py2.py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
51c0f629e53f9e1ad41c398517fb7b7b79bc8bd50eb68445eadc9ea48edcb016
|
|
BLAKE2b-256 checksum How to use checksums |
1e3f2ae576f3eda0c4dfe6886cacbef052462125b6406d4b208f9a8363c49706
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.6.5
|