Asynchronous Python client for InfluxDB
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aioinflux-0.5.0.tar.gz
(14.7 kB
view hashes)
Built Distribution
aioinflux-0.5.0-py3-none-any.whl
(16.8 kB
view hashes)
Close
Hashes for aioinflux-0.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5245af0792671db8298ea2c2260c23a610e31d565c5582c92974d385a04705b8 |
|
MD5 | 3dfeadcb2e79bffb311fecf914e4d732 |
|
BLAKE2b-256 | f6ea1625e81bd16f9afea279fee78db0aaa246e5d9aa87deac40de0a3666afb5 |