Skip to main content

Minimal and smart pusher of samples to InfluxDB for asyncio programs

Project description

Latest PyPI version

Minimal and smart pusher of samples to InfluxDB for asyncio programs

Usage

  1. Create a InfluxDbPusher object

  2. Call it to push samples

  3. 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

  • aiohttp

Compatibility

Licence

MIT License

Copyright (c) 2017, Gambit Research

Authors

influxdbpusher was written by Gustavo Carneiro.

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

influxdbpusher-0.1.2.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

influxdbpusher-0.1.2-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file influxdbpusher-0.1.2.tar.gz.

File metadata

  • Download URL: influxdbpusher-0.1.2.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.6

File hashes

Hashes for influxdbpusher-0.1.2.tar.gz
Algorithm Hash digest
SHA256 076e8d76c1786b4789df4ea01a6e7532dd01a8f54e5ed958fa78a939f29fd807
MD5 3a53d77ec65a906ac157b08122549012
BLAKE2b-256 ce6d7b532d48b38f59d81f2b0e543fde6131730684019d34d8c1d60d11f3457a

See more details on using hashes here.

File details

Details for the file influxdbpusher-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for influxdbpusher-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d834547778d0c81e61e0548f0ba9488797c23c9bf6bced9325dba3c9df06080
MD5 c67f9a1ce654c5cd0cc0343b85423303
BLAKE2b-256 93a186f380bc2d8b03c47176b384c2ee15c255ae830a51fa3a4c93ba3c22d49e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page