Skip to main content

build tsdb query strings

Project description

tsdb query string builder

from tsdb.query import Query
from tsdb.query.filters import *

if __name__ == '__main__':
    print(Query('some.metrics').rate(True, 10, 20).aggr('max').filters({
        'a': 'b', 'c': 'd',
        'e': literal_or('f'),
        'g': regexp('.*', groupBy=False),
        'h': not_key(),
    }).m())
# max:rate{counter,10,20}:some.metrics{a=b,c=d,e=literal_or(f),h=not_key()}{g=regexp(.*)}

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

tsdb_query_builder-0.0.4.tar.gz (3.8 kB view hashes)

Uploaded Source

Built Distribution

tsdb_query_builder-0.0.4-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

Supported by

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