Minimalistic statsd client that uses environment variables for configuration
Find a file
Gavin M. Roy c0b85ac830 Remove dynamic import of version in setuptools
Breaks other things, not with this package, but be consistent
Add sprockets to requirements
2014-08-29 10:12:45 -04:00
docs Fix the RTD links 2014-08-28 21:14:52 -04:00
sprockets Remove dynamic import of version in setuptools 2014-08-29 10:12:45 -04:00
.gitignore Initial commit 2014-08-28 18:43:48 -04:00
.travis.yml Travis build on tags did not work 2014-08-28 21:43:12 -04:00
dev-requirements.txt Initial version of statsd client or sprockets 2014-08-28 20:38:11 -04:00
LICENSE Updates to fix the LICENSE and README in pypi 2014-08-28 22:06:07 -04:00
MANIFEST.in Initial version of statsd client or sprockets 2014-08-28 20:38:11 -04:00
README.rst Fix the RTD links 2014-08-28 21:14:52 -04:00
requirements.txt Remove dynamic import of version in setuptools 2014-08-29 10:12:45 -04:00
setup.cfg Fix the sphinx pathing in setup.cfg 2014-08-28 22:15:52 -04:00
setup.py Remove dynamic import of version in setuptools 2014-08-29 10:12:45 -04:00
test-requirements.txt Initial version of statsd client or sprockets 2014-08-28 20:38:11 -04:00
tests.py Fix the expectation to be byte string for Python 3 2014-08-28 20:43:53 -04:00

sprockets.clients.statsd
========================
The ``sprockets.clients.statsd`` package implements a simple statsd client that
is used by the ``sprockets.mixins.statsd`` package. It can be used in your
applications for sending metric values to statsd.

The default statsd server that is used is ``localhost:8125``. The ``STATSD_HOST``
and ``STATSD_PORT`` environment variables can be used to set the statsd server
connection parameters. Note that the socket for communicating with statsd is
created once upon module import and will not change until the application is
restarted or the module is reloaded.

|Version| |Downloads| |Status| |Coverage| |License|

Installation
------------
``sprockets.clients.statsd`` is available on the
`Python Package Index <https://pypi.python.org/pypi/sprockets.clients.statsd>`_
and can be installed via ``pip`` or ``easy_install``:

.. code:: bash

  pip install sprockets.clients.statsd

Documentation
-------------
https://sprocketsclientsstatsd.readthedocs.org

Example
-------
The following example demonstrates how to use ``sprockets.clients.statsd`` by
incrementing a counter, setting a gauge value, and adding a timing value:

.. code:: python

    from sprockets.clients import statsd

    # Increment foo.bar.baz by 1
    statsd.incr('foo', 'bar', 'baz')

    # Set a gauge value
    statsd.set_gauge('foo', 'bar', 'baz', value=10)

    # Add a timing value
    statsd.add_timing('foo', 'bar', 'baz', value=3.14159)

Documentation is available at https://sprocketsclientsstatsd.readthedocs.org

Version History
---------------
Available at https://sprocketsclientsstatsd.readthedocs.org/en/latest/history.html

.. |Version| image:: https://badge.fury.io/py/sprockets.clients.statsd.svg?
   :target: http://badge.fury.io/py/sprockets.clients.statsd

.. |Status| image:: https://travis-ci.org/sprockets/sprockets.clients.statsd.svg?branch=master
   :target: https://travis-ci.org/sprockets/sprockets.clients.statsd

.. |Coverage| image:: https://img.shields.io/coveralls/sprockets/sprockets.clients.statsd.svg?
   :target: https://coveralls.io/r/sprockets/sprockets.clients.statsd

.. |Downloads| image:: https://pypip.in/d/sprockets.clients.statsd/badge.svg?
   :target: https://pypi.python.org/pypi/sprockets.clients.statsd

.. |License| image:: https://pypip.in/license/sprockets.clients.statsd/badge.svg?
   :target: https://sprocketsclientsstatsd.readthedocs.org