A Python statsd client
statsd is a friendly front-end to Graphite. 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')
Metadata
Release files for statsd 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| statsd-0.1.tar.gz | 3.0 kB | Details |
Release files / statsd-0.1.tar.gz
| Download URL | statsd-0.1.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fedd4050dcf29cc09b2a5b5e2ad38184e8f7f2def979faaac4d79831d2331e2
|
|
BLAKE2b-256 checksum How to use checksums |
18abe526b969bad4783f94983f87c9834137094d68a1bac7d5895966b15aaa4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |