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 hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page