A simple statsd client.
Project description
A Python statsd client
A python client for Etsy's StatsD server and InfluxDB's Telegraf StatsD server.
Code: https://github.com/macobo/statshog
License: MIT; see LICENSE file
Issues: https://github.com/macobo/statshog/issues
Documentation: https://statshog.readthedocs.io/
Install
The easiest way to install statsd is with pip!
You can install from PyPI:
pip install statshog
Or GitHub:
$ pip install -e git+https://github.com/macobo/statshog#egg=statshog
Or from source:
git clone https://github.com/macobo/statshog
cd pystatsd
python setup.py install
Usage
Quick usage
import statshog
statsd = statshog.StatsClient(host='localhost', port=8125)
statsd.incr('foo') # Increment the 'foo' counter.
statsd.timing('stats.timed', 320) # Record a 320ms 'stats.timed'
Using with telegraf/influxdb
import statshog
statsd = statshog.StatsClient(telegraf=True)
statsd.timing('stats.timed', 320, tags={"mytag": 456})
django-statsd
To use together with
django-statsd, add
the following to your settings.py
:
STATSD_CLIENT = "statshog"
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
statshog-1.0.1.tar.gz
(26.2 kB
view hashes)
Built Distribution
Close
Hashes for statshog-1.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5115a59262f429ead3ff574bace30228fc2127a35a3196cf0e3287974d055d7d |
|
MD5 | 21d56e99a23a44ba6fe03413638f6072 |
|
BLAKE2b-256 | 81039a7d97b1c4d1ba943b5893ea954d814358ac27d350bc639ddb0dab175075 |