Skip to main content

prometheus http sdk

Project description

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()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for prometheus-http-sdk, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size prometheus_http_sdk-0.0.4-py2.py3-none-any.whl (5.3 kB) File type Wheel Python version py2.py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page