AsyncIO Python client for sending metrics to Telegraf
Project description
aiotelegraf
An asyncio-base client for sending metrics to Telegraf.
Implementation based on pytelegraf package.
Installation
$ pip install aiotelegraf
Usage
import asyncio
import aiotelegraf
loop = asyncio.get_event_loop()
r = loop.run_until_complete
client = aiotelegraf.Client(
host='0.0.0.0',
port=8089,
tags={
'my_global_tag_1': 'value_1',
'my_global_tag_2': 'value_2',
}
)
r(client.connect())
client.metric('my_metric_1', 'value_1', tags={
'my_tag_1': 'value_1',
})
r(client.close())
Contributing
To work on the aiotelegraf
codebase, you'll want to clone the project locally and install the required dependencies via poetry:
$ git clone git@github.com:Gr1N/aiotelegraf.git
$ poetry install
To run tests and linters use command below:
$ poetry run tox
If you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:
$ poetry run tox -e py37-tests
License
aiotelegraf
is licensed under the MIT license. See the license file for details.
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
aiotelegraf-0.2.0.tar.gz
(3.4 kB
view details)
Built Distribution
File details
Details for the file aiotelegraf-0.2.0.tar.gz
.
File metadata
- Download URL: aiotelegraf-0.2.0.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c49f741599449b1fbf5e261894c71bc4a8f95b4a95fdc0777208a6b3af89b810 |
|
MD5 | 7acf860c25f9f2cee125d643351c3eb4 |
|
BLAKE2b-256 | b2e73062420e18ed5484a38a78b340d516eb33e800d7fe6b4b150bbe1d81ef55 |
File details
Details for the file aiotelegraf-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: aiotelegraf-0.2.0-py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee2f5e7d73ff8334ffbe963900b30c36e00758465d699981ef34c00d6b792f35 |
|
MD5 | 097184a63edb8052d552fe1f58d7a31d |
|
BLAKE2b-256 | 790ddedd88ae702e5ad60739a84ada6a037966e59c97a52cc210d9907f0192cc |