Skip to content

Asynchronous Python client for InfluxDB

License

Notifications You must be signed in to change notification settings

Latand/aioinflux

 
 

Repository files navigation

aioinflux

CI status Coverage PyPI package Supported Python versions Documentation status
🚨This project is archived and unmantained.🚨
For InfluxDB v2+ support, please use the official Python client library.

Asynchronous Python client for InfluxDB. Built on top of aiohttp and asyncio. Aioinflux is an alternative to the official InfluxDB Python client.

Aioinflux supports interacting with InfluxDB in a non-blocking way by using aiohttp. It also supports writing and querying of Pandas dataframes, among other handy functionality.

Please refer to the documentation for more details.

Installation

Python 3.6+ is required. You also need to have access to a running instance of InfluxDB.

pip install aioinflux

Quick start

This sums most of what you can do with aioinflux:

import asyncio
from aioinflux import InfluxDBClient

point = {
    'time': '2009-11-10T23:00:00Z',
    'measurement': 'cpu_load_short',
    'tags': {'host': 'server01',
             'region': 'us-west'},
    'fields': {'value': 0.64}
}

async def main():
    async with InfluxDBClient(db='testdb') as client:
       await client.create_database(db='testdb')
       await client.write(point)
       resp = await client.query('SELECT value FROM cpu_load_short')
       print(resp)


asyncio.get_event_loop().run_until_complete(main())

See the documentation for more detailed usage.

About

Asynchronous Python client for InfluxDB

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 89.0%
  • Jupyter Notebook 10.2%
  • Makefile 0.8%