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
Built Distribution
File details
Details for the file aioinflux-0.9.0.tar.gz
.
File metadata
- Download URL: aioinflux-0.9.0.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 720d056a9069ac3688f83b35786b234c890afb7c9a379eb421e5379e1eabc5cb |
|
MD5 | 1250a0154245c6ffbd5cf06099edbd52 |
|
BLAKE2b-256 | 661b63d2ade881662aafc2736c8576f2c99137eb44a1aa84a2f3cffc75f4adce |
File details
Details for the file aioinflux-0.9.0-py3-none-any.whl
.
File metadata
- Download URL: aioinflux-0.9.0-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f812d2814492164282c28cbe867d32cce3e8d256e116c6cf4675e896fe804953 |
|
MD5 | d6e4bd47bc09c337d7978ff5f801e326 |
|
BLAKE2b-256 | 883ef793a248d1ccc7dd6dbc712e3c1cbe6a9c9f2a4504fdf91fc35787c36313 |