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

Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prometheus_http_sdk-0.0.4-py2.py3-none-any.whl (5.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file prometheus_http_sdk-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: prometheus_http_sdk-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using 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

File hashes

Hashes for prometheus_http_sdk-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 51c0f629e53f9e1ad41c398517fb7b7b79bc8bd50eb68445eadc9ea48edcb016
MD5 0855715ae6a967dd516c7c84a101f9ff
BLAKE2b-256 1e3f2ae576f3eda0c4dfe6886cacbef052462125b6406d4b208f9a8363c49706

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 file

0.0.3

1 file

0.0.2

1 file

0.0.1

2 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