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.3.tar.gz (3.7 kB view hashes)

Uploaded Source

Built Distribution

tsdb_query_builder-0.0.3-py3-none-any.whl (4.5 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