Skip to main content

statsd-mock

https://travis-ci.org/tarzan0820/statsd-mock.png?branch=master

Based entirely on - studio-ousia/gevent-statsd-moc with python-statsd dependency changed to pystatsd and gevent.server.DatagramServer used to handle the server portion

Installation

$ pip install mock-statd

Basic Usage

In this sample we use pystatsd for client library

>>> from statsdmock import StatsdMockServer
>>> server = StatsdMockServer()
>>> server.start()
>>> import statsd
>>> c = statsd.StatsClient(prefix='bigtag')
>>> c.gauge('subtag', 10)
>>> server.wait('bigtag.subtag', n=1)
>>> data = list(server.metrics['bigtag.subtag'])
>>> assert data[0] == {'value': '10', 'type': 'gauge', 'rate': 1.0, 'timestamp': None}
>>> server.stop()
>>> del server

Metadata

Release files for statsdmock 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for statsdmock 0.0.3
File Size Uploaded Provenance Actions
statsdmock-0.0.3.tar.gz 3.7 kB Without provenance Details for statsdmock-0.0.3.tar.gz

Release files / statsdmock-0.0.3.tar.gz

Download URL statsdmock-0.0.3.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8ee935e0b96a31acc145bb8211ca0a116519880b9373098eed0859f23df75c91
BLAKE2b-256 checksum
How to use checksums
916b1b164bad7b118a5f0117e97ee580445e47acaa457692d052bc77ae4654ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for statsdmock 0.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page