Skip to main content

Python InfluxDB Client for Developers.

Project description

https://badge.fury.io/py/incursion.png https://pypip.in/d/incursion/badge.png https://travis-ci.org/voidfiles/incursion.png

Incursion is an MIT Licensed InfluxDB client, written in Python, for developers.

This existing InfluxDB python client is great. This client is built on that one but, many python developers have come to expect a progrmatic method for building queries on top of a raw unstructured query interface.

Incursion was bult 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

Contribute

  1. Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).

  2. Write a test which shows that the bug was fixed or that the feature works as expected.

  3. Send a pull request. :) Make sure to add yourself to AUTHORS.

Release History

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

incursion-0.2.1.tar.gz (6.1 kB view details)

Uploaded Source

File details

Details for the file incursion-0.2.1.tar.gz.

File metadata

  • Download URL: incursion-0.2.1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for incursion-0.2.1.tar.gz
Algorithm Hash digest
SHA256 26c86c2b9cbebc99e565a766eb4b9bcd094617a0e2960d0e4839ae6b4a610f85
MD5 653111135e64f74084e01404ec871063
BLAKE2b-256 abc6764121189573ef5c057af9b8d9c8e841d8fc700fe1a846a19dddd1b78b31

See more details on using hashes here.

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