aiodogstatsd-0.9.0
توضیحات
An asyncio-based client for sending metrics to StatsD with support of DogStatsD extension
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiodogstatsd-0.9.0 |
| نام | aiodogstatsd |
| نسخه کتابخانه | 0.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Nikita Grishko |
| ایمیل نویسنده | gr1n@protonmail.com |
| آدرس صفحه اصلی | https://github.com/Gr1N/aiodogstatsd |
| آدرس اینترنتی | https://pypi.org/project/aiodogstatsd/ |
| مجوز | MIT |
# aiodogstatsd
[](https://github.com/Gr1N/aiodogstatsd/actions?query=workflow%3Adefault) [](https://codecov.io/gh/Gr1N/aiodogstatsd)   
An asyncio-based client for sending metrics to StatsD with support of [DogStatsD](https://docs.datadoghq.com/developers/dogstatsd/) extension.
Library fully tested with [statsd_exporter](https://github.com/prometheus/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](https://github.com/prometheus/statsd_exporter) and it's different from _8125_ which is used by default in StatsD and [DataDog](https://www.datadoghq.com/). Initialize the client with the proper port you need if it's different from _9125_.
## Installation
Just type:
```sh
$ pip install aiodogstatsd
```
## At a glance
Just simply use client as a context manager and send any metric you want:
```python
import asyncio
import aiodogstatsd
async def main():
async with aiodogstatsd.Client() as client:
client.increment("users.online")
asyncio.run(main())
```
Please follow [documentation](https://gr1n.github.io/aiodogstatsd) or look at [`examples/`](https://github.com/Gr1N/aiodogstatsd/tree/master/examples) directory to find more examples of library usage, e.g. integration with [`AIOHTTP`](https://aiohttp.readthedocs.io/) or [`Starlette`](https://www.starlette.io) frameworks.
## Contributing
To work on the `aiodogstatsd` codebase, you'll want to clone the project locally and install the required dependencies via [poetry](https://poetry.eustace.io):
```sh
$ git clone git@github.com:Gr1N/aiodogstatsd.git
$ make install
```
To run tests and linters use command below:
```sh
$ 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.:
```sh
$ make lint-black
```
## License
`aiodogstatsd` is licensed under the MIT license. See the license file for details.
نیازمندی
| مقدار | نام |
|---|---|
| >=3.0) | aiohttp |
| >=0.13) | starlette |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7,<4.0 | Python |
نحوه نصب
نصب پکیج whl aiodogstatsd-0.9.0:
pip install aiodogstatsd-0.9.0.whl
نصب پکیج tar.gz aiodogstatsd-0.9.0:
pip install aiodogstatsd-0.9.0.tar.gz