{ "info": { "author": "Chris Utz", "author_email": "open-source@nextthought.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 7 - Inactive", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "================\n nti.fakestatsd\n================\n\n.. image:: https://img.shields.io/pypi/v/nti.fakestatsd.svg\n :target: https://pypi.org/project/nti.fakestatsd/\n :alt: Latest release\n\n.. image:: https://img.shields.io/pypi/pyversions/nti.fakestatsd.svg\n :target: https://pypi.org/project/nti.fakestatsd/\n :alt: Supported Python versions\n\n.. image:: https://travis-ci.org/NextThought/nti.fakestatsd.svg?branch=master\n :target: https://travis-ci.org/NextThought/nti.fakestatsd\n\n.. image:: https://coveralls.io/repos/github/NextThought/nti.fakestatsd/badge.svg\n :target: https://coveralls.io/github/NextThought/nti.fakestatsd\n\n.. image:: http://readthedocs.org/projects/ntifakestatsd/badge/?version=latest\n :target: http://ntifakestatsd.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. warning::\n\n This project is deprecated and unmaintained. Its code has moved\n into ``perfmetrics.testing``.\n\n The following is for historical information only.\n\nnti.fakestatsd is a testing client for verifying StatsD metrics\nemitted by perfmetrics.\n\nIt's easy to create a new client for use in testing:\n\n.. code-block:: pycon\n\n >>> from nti.fakestatsd import FakeStatsDClient\n >>> test_client = FakeStatsDClient()\n\nThis client exposes the same public interface as\n`perfmetrics.statsd.StatsdClient`. For example we can increment\ncounters, set gauges, etc:\n\n.. code-block:: pycon\n\n >>> test_client.incr('request_c')\n >>> test_client.gauge('active_sessions', 320)\n\nUnlike `perfmetrics.statsd.StatsdClient`, `~.FakeStatsDClient` simply\ntracks the statsd packets that would be sent. This information is\nexposed on our ``test_client`` both as the raw statsd packet, and for\nconvenience this information is also parsed and exposed as `~.Metric`\nobjects. For complete details see `~.FakeStatsDClient` and `~.Metric`.\n\n.. code-block:: pycon\n\n >>> test_client.packets\n ['request_c:1|c', 'active_sessions:320|g']\n >>> test_client.metrics\n [Observation(name='request_c', value='1', kind='c', sampling_rate=None), Observation(name='active_sessions', value='320', kind='g', sampling_rate=None)]\n\nFor validating metrics we provide a set of hamcrest matchers for use\nin test assertions:\n\n.. code-block:: pycon\n\n >>> from hamcrest import assert_that\n >>> from hamcrest import contains\n >>> from nti.fakestatsd.matchers import is_metric\n >>> from nti.fakestatsd.matchers import is_gauge\n\nWe can use both strings and numbers (or any matcher) for the value:\n\n >>> assert_that(test_client,\n ... contains(is_metric('c', 'request_c', '1'),\n ... is_gauge('active_sessions', 320)))\n >>> assert_that(test_client,\n ... contains(is_metric('c', 'request_c', '1'),\n ... is_gauge('active_sessions', '320')))\n >>> from hamcrest import is_\n >>> assert_that(test_client,\n ... contains(is_metric('c', 'request_c', '1'),\n ... is_gauge('active_sessions', is_('320'))))\n\nIf the matching fails, we get a descriptive error:\n\n >>> assert_that(test_client,\n ... contains(is_gauge('request_c', '1'),\n ... is_gauge('active_sessions', '320')))\n Traceback (most recent call last):\n ...\n AssertionError:\n Expected: a sequence containing [(an instance of Metric and (an object with a property 'kind' matching 'g' and an object with a property 'name' matching 'request_c' and an object with a property 'value' matching '1')), (an instance of Metric and (an object with a property 'kind' matching 'g' and an object with a property 'name' matching 'active_sessions' and an object with a property 'value' matching '320'))]\n but: item 0: was Metric(name='request_c', value='1', kind='c', sampling_rate=None)\n\n\nFor complete details and the changelog, see the `documentation\n`_.\n\n\n=========\n Changes\n=========\n\n\n1.0.0 (2019-09-03)\n==================\n\n- This project has been merged into ``perfmetrics.testing``. There\n will be no further development.\n\n0.0.2 (2018-10-26)\n==================\n\n- Metric kind ``s`` is now handled as a distinct type. See `issue 6\n `_.\n- Metric values are now always native strings. See `issue 2\n `_.\n- Restructure and document public objects. See `issue 1\n `_.\n- Add convenience hamcrest matchers. See `issue 1\n `_.\n\n\n0.0.1 (2018-10-12)\n==================\n\n- First PyPI release.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/NextThought/nti.fakestatsd/", "keywords": "python perfmetrics statsd", "license": "Apache", "maintainer": "", "maintainer_email": "", "name": "nti.fakestatsd", "package_url": "https://pypi.org/project/nti.fakestatsd/", "platform": "", "project_url": "https://pypi.org/project/nti.fakestatsd/", "project_urls": { "Bug Tracker": "https://github.com/NextThought/nti.fakestatsd/issues", "Documentation": "https://ntifakestatsd.readthedocs.io/", "Homepage": "https://github.com/NextThought/nti.fakestatsd/", "Source Code": "https://github.com/NextThought/nti.fakestatsd/" }, "release_url": "https://pypi.org/project/nti.fakestatsd/1.0.0/", "requires_dist": [ "perfmetrics (>=3.0.0)", "setuptools", "Sphinx ; extra == 'docs'", "nti.testing ; extra == 'docs'", "repoze.sphinx.autointerface ; extra == 'docs'", "sphinx-rtd-theme ; extra == 'docs'", "pyhamcrest ; extra == 'test'", "nti.testing ; extra == 'test'", "zope.testrunner ; extra == 'test'" ], "requires_python": "", "summary": "Testing StatsD client", "version": "1.0.0" }, "last_serial": 5777371, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "4de3b33b414038a462bb3d1e204a63ae", "sha256": "813dea219850864831c6175b8f0a782dacab46ad2026be93ff4ec4c5b991ad80" }, "downloads": -1, "filename": "nti.fakestatsd-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4de3b33b414038a462bb3d1e204a63ae", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5422, "upload_time": "2018-10-12T22:06:38", "url": "https://files.pythonhosted.org/packages/75/3f/7737307d56a98c2f447d78a9b7a62b4e326885f31574ea7bbc377277bb17/nti.fakestatsd-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15617c3ea98c662347fa4e6303dbc9c4", "sha256": "98f394e7e1488fe1fa14fbde59f23e165bae926d1115d56635c64fb2fcb98186" }, "downloads": -1, "filename": "nti.fakestatsd-0.0.1.tar.gz", "has_sig": false, "md5_digest": "15617c3ea98c662347fa4e6303dbc9c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9681, "upload_time": "2018-10-12T22:06:44", "url": "https://files.pythonhosted.org/packages/7b/04/f941e9ad10840736c3f8026eeaf44ed8edeb3a06659cbf3d75dc5d70722d/nti.fakestatsd-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "bcf0959d76c7e40dcd27b5f7d9c44422", "sha256": "3f6879a453ea43c7b64268b5133e38e2dd4a35d49b93029d6924a37f6a68054f" }, "downloads": -1, "filename": "nti.fakestatsd-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "bcf0959d76c7e40dcd27b5f7d9c44422", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 11520, "upload_time": "2018-10-26T14:07:31", "url": "https://files.pythonhosted.org/packages/4d/97/c8f3bdd69f31989d19dec5b55cf758a1cd1d78561afb162a84fa12c99ace/nti.fakestatsd-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4cb80e51ab5117dafb23ea878bb8bb24", "sha256": "af668c7d01cb9ef4bb9d1a77b026306e93a2f71fd169383152ca185e3c0b5481" }, "downloads": -1, "filename": "nti.fakestatsd-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4cb80e51ab5117dafb23ea878bb8bb24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14154, "upload_time": "2018-10-26T13:55:36", "url": "https://files.pythonhosted.org/packages/fc/55/73dcc3791af06c424d9ebe697015eb70ae5a24fbaecfef0085af75e3e7b0/nti.fakestatsd-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "885cd417236982e2f57f1f90265a43cf", "sha256": "5071362c663e7f2d62d34b6c736484b69f66a22ece0e340bf20322de0664b2e7" }, "downloads": -1, "filename": "nti.fakestatsd-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "885cd417236982e2f57f1f90265a43cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9617, "upload_time": "2019-09-03T18:33:12", "url": "https://files.pythonhosted.org/packages/4a/6f/6967e9c5cb6eac8139e70043c0ae5ea7aafb3c22b4465a5354c757a0e623/nti.fakestatsd-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaa32cef7ce065de91036868cdea9203", "sha256": "8d2194affb955820defa7fcc1c8fee60267f929455b281466f2cccb15869c427" }, "downloads": -1, "filename": "nti.fakestatsd-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aaa32cef7ce065de91036868cdea9203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12821, "upload_time": "2019-09-03T18:33:14", "url": "https://files.pythonhosted.org/packages/5e/91/304adcaade06cf42b671e96f6564b3f41c4ed651803f0dd9199ed60325fe/nti.fakestatsd-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "885cd417236982e2f57f1f90265a43cf", "sha256": "5071362c663e7f2d62d34b6c736484b69f66a22ece0e340bf20322de0664b2e7" }, "downloads": -1, "filename": "nti.fakestatsd-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "885cd417236982e2f57f1f90265a43cf", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9617, "upload_time": "2019-09-03T18:33:12", "url": "https://files.pythonhosted.org/packages/4a/6f/6967e9c5cb6eac8139e70043c0ae5ea7aafb3c22b4465a5354c757a0e623/nti.fakestatsd-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aaa32cef7ce065de91036868cdea9203", "sha256": "8d2194affb955820defa7fcc1c8fee60267f929455b281466f2cccb15869c427" }, "downloads": -1, "filename": "nti.fakestatsd-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aaa32cef7ce065de91036868cdea9203", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12821, "upload_time": "2019-09-03T18:33:14", "url": "https://files.pythonhosted.org/packages/5e/91/304adcaade06cf42b671e96f6564b3f41c4ed651803f0dd9199ed60325fe/nti.fakestatsd-1.0.0.tar.gz" } ] }