Python InfluxDB Client for Developers.
Project description
Incursion is an MIT Licensed InfluxDB client, written in Python, for developers.
The existing InfluxDB python client is great. This client is built on that but many python developers have come to expect a programmatic method for building queries on top of a raw unstructured query interface.
Incursion was built to bring a new pattern to your InfluxDB Queries.
>>> q = InfluxQuery.for_series('page_views')
>>> q = q.columns(InfluxQuery.count(InfluxQuery.distinct('author_id')), 'author_id')
>>> q = q.group_by(InfluxQuery.time('1h'))
>>> q = q.where(category__matches=InfluxQuery.regex('/(10|11)/'))
>>> from, to = (datetime(2014, 10, 20), datetime(2014, 10, 21))
>>> q = q.where(time__gt=from, time__lt=to)
>>> q = q.fill(0)
>>> q = q.limit(None)
>>> resp = INDBClient().result_from_query(q)
>>> assert resp['page_views']
>>> print '%(14)s %(6)s %(2)s' % ('time', 'count', 'id')
>>> for row in resp['page_views']:
>>> print '%(-14)s %(-6)s %(-2)s' % (row.time, row.count, row.author_id)
time count id
1413908730239 10 1
1413908730239 8 2
...
Features
Query Builder Pattern
Lots of tests
Safety first (all queries have a limit unless explicitly turned off)
Ready for contributors (seriously, this should be a community project)
Installation
To install Incursion, simply:
$ pip install incursion
Future Features
Continuous Query Manager (fanouts and downsampling)
In-app joining fanout query results to source series results
Contribute
Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
Write a test which shows that the bug was fixed or that the feature works as expected.
Send a pull request :) Make sure to add yourself to AUTHORS.
Release History
0.3.0 (2014-10-24)
Added continuous query manager
Added end-to-end tests for some influxdb operations
Added tests to continuous query manager
Brought up compatability to InflxuDB 0.8.3
0.2.0 (2014-10-21)
Initial
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
File details
Details for the file incursion-0.3.0.tar.gz
.
File metadata
- Download URL: incursion-0.3.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 902a0da20504bf91b09e6c1e0f001f40bc1eea7685e6a395417c04ccb5e8ebf0 |
|
MD5 | 6e5c3530ed2325dc1c767f82f6a1eb61 |
|
BLAKE2b-256 | 23cc0d78db01a97dd415f68e1f6e155474cf5f2abec443b1ddc2d439ad7d885f |