跳转到主要内容

一个简单的statsd客户端。

项目描述

statsdGraphite 的友好前端。这是一个statsd守护进程的Python客户端。

Latest CI status Latest release Supported Python versions Wheel Status
代码:

https://github.com/jsocol/pystatsd

许可证:

MIT;见LICENSE文件

问题:

https://github.com/jsocol/pystatsd/issues

文档:

https://statsd.readthedocs.io/

快速使用

>>> import statsd
>>> c = statsd.StatsClient('localhost', 8125)
>>> c.incr('foo')  # Increment the 'foo' counter.
>>> c.timing('stats.timed', 320)  # Record a 320ms 'stats.timed'.

您也可以为所有统计信息添加前缀

>>> import statsd
>>> c = statsd.StatsClient('localhost', 8125, prefix='foo')
>>> c.incr('bar')  # Will be 'foo.bar' in statsd/graphite.

安装

安装statsd最简单的方法是使用pip!

您可以从PyPI安装

$ pip install statsd

或GitHub

$ pip install -e git+https://github.com/jsocol/pystatsd#egg=statsd

或从源安装

$ git clone https://github.com/jsocol/pystatsd
$ cd pystatsd
$ python setup.py install

文档

docs/ 目录中以及在 ReadTheDocs 上有许多文档。

项目详情


下载文件

下载适用于您平台的文件。如果您不确定选择哪一个,请了解更多关于安装包的信息。

源代码分发

statsd-4.0.1.tar.gz (27.8 kB 查看哈希值)

上传时间 源代码

构建分发

statsd-4.0.1-py2.py3-none-any.whl (13.1 kB 查看哈希值)

上传时间 Python 2 Python 3

由以下支持