Skip to main content

aiotelegraf

Build Status codecov PyPI PyPI - Downloads GitHub

An asyncio-base client for sending metrics to Telegraf.

Implementation based on pytelegraf package.

Installation

$ pip install aiotelegraf

Usage

import asyncio
import aiotelegraf


async def main():
    client = aiotelegraf.Client(
        host='0.0.0.0',
        port=8089,
        tags={
            'my_global_tag_1': 'value_1',
            'my_global_tag_2': 'value_2',
        }
    )
    await client.connect()

    client.metric('my_metric_1', 'value_1', tags={
        'my_tag_1': 'value_1',
    })
    await client.close()


asyncio.run(main())

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
$ make install

To run tests and linters use command below:

$ make lint && make test

If you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:

$ make lint-black

License

aiotelegraf is licensed under the MIT license. See the license file for details.

Release files for aiotelegraf 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiotelegraf 0.4.0
File Size Uploaded
aiotelegraf-0.4.0.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiotelegraf 0.4.0
File Interpreter ABI Platform
aiotelegraf-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / aiotelegraf-0.4.0.tar.gz

Download URL aiotelegraf-0.4.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
99f3829a5c50e30d06897c956e6955363df6bb39a4975af97208c42452dc7781
BLAKE2b-256 checksum
How to use checksums
5df269a845c00d6cd3a5b049659c3534deee30d738648725d63b1dd17bc9876d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.2 Linux/5.0.0-1032-azure

Release files / aiotelegraf-0.4.0-py3-none-any.whl

Download URL aiotelegraf-0.4.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
beecc77fbdfdb0387f87493610013657911ac45c3ce370815e9b158e96164d71
BLAKE2b-256 checksum
How to use checksums
71c1e90d175d4d5e8076a24e433af631ea464a02321c57ff89f2886d01c65691
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.0 CPython/3.8.2 Linux/5.0.0-1032-azure

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page