Skip to main content

Prometheus http query client for asyncio

Project description

Drow Aio

Prometheus http query client for Python asyncio.

Implemented prometheus http api: https://prometheus.io/docs/prometheus/latest/querying/api/

install

pip install drow-aio

usage

get client:

from drow_aio import get_client

client = get_client("http://127.0.0.1:9090")

query as vector:

result = await client.query_as_vector("http_requests_total")
for s in result.series:
    print(s.metric, s.value.timestamp, s.value.value)

query range:

import time

end = time.time()
start = end - 60 * 60

result = await client.query_range("http_requests_total", start=start, end=end)
for s in result.series:
    print(s.metric)
    for p in s.values:
        print(p.timestamp, p.value)

Project details


Download files

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

Source Distribution

drow_aio-0.0.1.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

drow_aio-0.0.1-py3-none-any.whl (2.9 kB view details)

Uploaded Python 3

File details

Details for the file drow_aio-0.0.1.tar.gz.

File metadata

  • Download URL: drow_aio-0.0.1.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for drow_aio-0.0.1.tar.gz
Algorithm Hash digest
SHA256 10d1a4772e978a454f6940dace27e85bd0860e17b32aeb0ebdff410ac269379e
MD5 3e21e0ba1007a5d32ec2352211b6616e
BLAKE2b-256 324550ef36b73b01e2436665e40abcd0d104bb6993dc7014ca6552883805963a

See more details on using hashes here.

File details

Details for the file drow_aio-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: drow_aio-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 2.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for drow_aio-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f26c3f2216a7db5037dc1d137558c23254e67226f91f2221b221fe9b016dada7
MD5 c82095b56f35e1c9c68eff4bf7743887
BLAKE2b-256 73eff1f93b4f6bbced52abdb1ccaa249834055a15fd054a343737d3a67e86e4f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page