asyncio python client for telegraf / statsd / AWD cloudwatch
Project description
asynctelegraf
Asyncio python client for Telegraf, compatible with AWS cloudwatch metrics (statsd)
Install
pip install asynctelegraf
Example
import asyncio
from asynctelegraf import TelegrafClient
telegraf = TelegrafClient(host='127.0.0.1', port=8125, batch_size=100)
@telegraf.timed('magic.time', use_ms=True)
async def do_some_magic():
await asyncio.sleep(3.3)
return 'Magic'
async def main():
async with telegraf.start():
res = await do_some_magic()
print("result", res)
asyncio.run(main())
Contributions
If you have found a bug or have some idea for improvement feel free to create an issue or pull request.
License
Apache 2.0
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
asynctelegraf-1.0.1.tar.gz
(14.4 kB
view hashes)
Built Distribution
Close
Hashes for asynctelegraf-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9fdd1a18c639b49e033d8dc259feb51679fa9273d6417edcea4e7dadb1b4956e |
|
MD5 | 53b94af0c3813e45c1df33cc270a824b |
|
BLAKE2b-256 | a0f05d0d58af21139f93b47baefdfd30e118705367c455b5a6775ecdc06e08c4 |