Metadata-Version: 1.0
Name: statsd
Version: 0.1.1
Summary: A simple statsd client.
Home-page: https://github.com/jsocol/pystatsd
Author: James Socol
Author-email: james@mozilla.com
License: BSD
Description: ======================
        A Python statsd client
        ======================
        
        `statsd <https://github.com/etsy/statsd>`_ is a friendly front-end to `Graphite
        <http://graphite.wikidot.com/>`_. This is a Python client for the statsd
        daemon.
        
        To use::
        
        >>> import statsd
        >>> c = statsd.StatsClient('localhost', 8125)
        >>> c.incr('foo')  # Increment the 'foo' counter.
        >>> c.timing('stats.timed', 320)  # Record a 320ms 'stats.timed'.
        
        
        In Django
        =========
        
        If you're lucky enough to be using statsd in Django, you can configure a
        default client in your settings module with two values. The defaults are::
        
        STATSD_HOST = 'localhost'
        STATSD_PORT = 8125
        
        Then instead of instantiating a new client every time, you can just grab::
        
        >>> from statsd import statsd
        >>> statsd.incr('foo')
        
        
        Context Manager
        ===============
        
        You can use a ``StatsClient`` instance as a context manager to easily time
        sections of code with the ``timer()`` method::
        
        >>> from statsd import statsd
        >>> with statsd.timer('bar'):
        ...     func()
        ...     func()
        
        When the managed block exits, the client will automatically send the time it
        took to statsd.
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development :: Libraries :: Python Modules
