Skip to main content
https://github.com/daq-tools/pyinfluxql/workflows/Tests/badge.svg https://img.shields.io/pypi/pyversions/pyinfluxql.svg https://img.shields.io/pypi/v/pyinfluxql.svg https://img.shields.io/pypi/dm/pyinfluxql.svg https://img.shields.io/pypi/status/pyinfluxql.svg https://img.shields.io/pypi/l/pyinfluxql.svg

About

A query generator for the SQL dialect of the Influx Query Language (InfluxQL). Like SQLAlchemy but for InfluxDB. Consider this an experimental WIP.

Synopsis

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)

Tests

How to invoke the test suite.

Using Tox

Run InfluxDB within Docker:

docker run -it --rm --publish 8086:8086 influxdb:1.8.3

Run tox:

tox

Using sandbox

Alternatively, setup package in development mode:

python3 -mvenv .venv
source .venv/bin/activate
pip install --editable=.[test]

Run pytest:

pytest tests -vvv

Credits

Thanks a stack to the original author Jeremiah Malina for his excellent work as well as Michael Pérez for adding integration tests, timezone support and for improving the documentation.

Release files for pyinfluxql 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyinfluxql 0.1.3
File Size Uploaded
pyinfluxql-0.1.3.tar.gz 7.9 kB Details

Release files / pyinfluxql-0.1.3.tar.gz

Download URL pyinfluxql-0.1.3.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
09e9a27bc9ddec65bfaaec6ff7b4e12f5819e03ea7d377ef609156213f71d503
BLAKE2b-256 checksum
How to use checksums
a3cc5f4f9e0b101b1931e55841e5116273d5bfc9d4b344d2f192547157c61fcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.1

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.1

1 release file

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