async_stats#
An async transport method for statsd communication.
- class AsyncStatsClient(loop, host='localhost', port=8125, prefix=None)[source]#
Bases:
StatsClientBaseAn async implementation of
statsd.client.base.StatsClientBasethat supports async stat communication.- __init__(loop, host='localhost', port=8125, prefix=None)[source]#
Create a new
AsyncStatsClient.- Parameters:
loop (asyncio.AbstractEventLoop) – The event loop to use when creating the
asyncio.loop.create_datagram_endpoint.host (
str) – The host to connect to.port (
int) – The port to connect to.
- async create_socket()[source]#
Use
asyncio.loop.create_datagram_endpointfrom the loop given on init to create a socket.- Return type: