Skip to main content

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)

Table of built distributions (wheels) for prometheus-http-sdk 0.0.4
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page