An asyncio-based client for sending metrics to StatsD with support of DogStatsD extension
Project description
aiodogstatsd
An asyncio-based client for sending metrics to StatsD with support of DogStatsD extension.
Library fully tested with statsd_exporter and supports gauge
, counter
, histogram
, distribution
and timing
types.
aiodogstatsd
client by default uses 9125 port. It's a default port for statsd_exporter and it's different from 8125 which is used by default in StatsD and DataDog. Initialize the client with the proper port you need if it's different from 9125.
Installation
Just type:
$ pip install aiodogstatsd
At a glance
Just simply use client as a context manager and send any metric you want:
import asyncio
import aiodogstatsd
async def main():
async with aiodogstatsd.Client() as client:
client.increment("users.online")
asyncio.run(main())
Please follow documentation or look at examples/
directory to find more examples of library usage, e.g. integration with AIOHTTP
or Starlette
frameworks.
Contributing
To work on the aiodogstatsd
codebase, you'll want to clone the project locally and install the required dependencies via poetry:
$ git clone git@github.com:Gr1N/aiodogstatsd.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
aiodogstatsd
is licensed under the MIT license. See the license file for details.
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
Built Distribution
File details
Details for the file aiodogstatsd-0.16.0.tar.gz
.
File metadata
- Download URL: aiodogstatsd-0.16.0.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Linux/5.11.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 90bae79d5442db6c736313ebae63d8399d0dfcf8b803ddf7fa73c2ab41b07a06 |
|
MD5 | ba354847837f0d86348439b224b54195 |
|
BLAKE2b-256 | 2c21daff7369e0597870d8c57e461b7b2049064689cc3194a5fd26f0605b2072 |
File details
Details for the file aiodogstatsd-0.16.0-py3-none-any.whl
.
File metadata
- Download URL: aiodogstatsd-0.16.0-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.10.0 Linux/5.11.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 483caedc3e22e9a0f2f12916ed263e388f946f979e60cffa59cc186fa800540c |
|
MD5 | e51ef20fc4f74fbeeb9c492de84c91b2 |
|
BLAKE2b-256 | 494bce6540753d5bdaef29498f22d657bab7353d0abb7dab8818a6ff272a114b |