Minimal and smart pusher of samples to InfluxDB for asyncio programs
Project description
Minimal and smart pusher of samples to InfluxDB for asyncio programs
Usage
Create a InfluxDbPusher object
Call it to push samples
InfluxDbPusher will try to do intelligent aggregation of samples in the background to minimise the number of HTTP request to the InfluxDb server.
Example:
import asyncio
import logging
from influxdbpusher import InfluxDbPusher
async def test():
logging.basicConfig(level=logging.DEBUG)
influx = InfluxDbPusher("http://influxdb:8086", "playground")
while True:
for dummy in range(10):
await asyncio.sleep(0.02)
influx("test", dummy, {"foo": "bar"})
influx("measurement1",
{"fieldname1": 'hello "world"', "value": 2.0},
{"foo": "bar"})
await asyncio.sleep(5)
await influx.close()
if __name__ == '__main__':
asyncio.get_event_loop().run_until_complete(test())
Installation
pip install influxdbpusher
Requirements
Python >= 3.5
Compatibility
Licence
MIT License
Copyright (c) 2017, Gambit Research
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file influxdbpusher-0.1.0.tar.gz.
File metadata
- Download URL: influxdbpusher-0.1.0.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2366a08041c6aee0026ffba77557f89bd92ec51b87db3b2efa0c63b9345f6d76
|
|
| MD5 |
e5c6705fe2ff0dabcd99fb9bf7329cbd
|
|
| BLAKE2b-256 |
2d74307674e7a460fcdd8232df94772e07a2455cbba9139394d8fbb1fa1c7c3e
|
File details
Details for the file influxdbpusher-0.1.0-py3-none-any.whl.
File metadata
- Download URL: influxdbpusher-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c336c5c33512c524d44f5c22093316b3ad0f4a122dbc7b9d7374906888f1bbfb
|
|
| MD5 |
a9238e88b1077a5b27305fe90c78d2f9
|
|
| BLAKE2b-256 |
8935054129c7158c4d35037bbf3a7cdfe1515715286d45fe5fd31530d5dc1a44
|