Skip to main content

A query generator for the InfluxDB SQL query syntax

Project description

https://travis-ci.org/jjmalina/pyinfluxql.svg?branch=master

A query generator for the InfluxDB SQL query syntax. Like SQLAlchemy but for InfluxDB. Consider this an experimental WIP.

Example

from influxdb import InfluxDBClient
from pyinfluxql import Engine, Query, Mean
client = InfluxDBClient('localhost', 8086, 'root', 'root', 'example')
engine = Engine(client)
query = Query(Mean('value')).from_('cpu_load') \
    .where(time__gt=datetime.now() - timedelta(1))
    .group_by(time=timedelta(hours=1))
engine.execute(query)

TODO

  • [X] integration tests against an InfluxDB server

  • [X] travis

  • [X] tox to test python versions

  • [] support for select expression aliases

  • [] support for create statements

  • [] support for show statements

  • [] support for drop statements

  • [] support for grant/revoke statements

  • [] support for alter statements

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

pyinfluxql-0.0.1.tar.gz (5.7 kB view hashes)

Uploaded Source

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