{ "info": { "author": "Dmitry Orlov ", "author_email": "me@mosquito.su", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Natural Language :: Russian", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries", "Topic :: System :: Monitoring", "Topic :: System :: Networking :: Monitoring" ], "description": "Carbon Client\n=============\n\n.. image:: https://travis-ci.org/mosquito/carbon-client.svg?branch=master\n :target: https://travis-ci.org/mosquito/carbon-client\n\n.. image:: https://img.shields.io/pypi/v/carbon-client.svg\n :target: https://pypi.python.org/pypi/carbon-client/\n :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/wheel/carbon-client.svg\n :target: https://pypi.python.org/pypi/carbon-client/\n\n.. image:: https://img.shields.io/pypi/pyversions/carbon-client.svg\n :target: https://pypi.python.org/pypi/carbon-client/\n\n.. image:: https://img.shields.io/pypi/l/carbon-client.svg\n :target: https://pypi.python.org/pypi/carbon-client/\n\n\nClient for sending metrics into carbon server\n\nInitialization\n++++++++++++++\n\nBy default carbon-client creates a client based on os.environ variables:\n\n* CARBON_HOST - Contains one or many endpoints (e.g \"127.0.0.1:2003, 10.2.1.0:2003\")\n* CARBON_NS - it's a namespace for sending metrics (e.g. \"carbon.coal-service\")\n\nActually you can configure this by hands.\n\nExample\n+++++++\n\nThe simple test :\n\n.. code-block:: python\n\n # You should set ENV variables CARBON_HOST and CARBON_NS\n # CARBON_HOST might contains multiple destinations (comma separated)\n from time import sleep\n from carbon.client import stat\n from carbon.client.extras import SimpleCounter\n\n # Will be pended one or two metrics\n # carbon_client.counter_ok\n # carbon_client.counter_fail - if exception will be raised\n # carbon_client is namespace by default.\n with SimpleCounter(\"counter\"):\n sleep(1)\n\n # Will be pended one metric\n # carbon_client.timer_ok - if exception will be raised\n # carbon_client.timer_fail - if exception will be raised\n # carbon_client is namespace by default.\n with SimpleTimer(\"timer\"):\n sleep(1)\n\n # Will be pended n metric\n # carbon_client.collector\n # carbon_client is namespace by default.\n with SimpleCollector(\"collector\") as collector:\n collector.add(123)\n collector.add(122)\n collector.add(-10)\n\n # all metrics will sent.\n stat.send()\n\n\nThe advanced test :\n\n.. code-block:: python\n\n from time import sleep\n from carbon.client import UDPClient\n from carbon.client.extras import SimpleCounter, SimpleTimer, SimpleCollector\n\n # Will be send to multiple destinations\n client = UDPClient(\"127.0.0.1, 191.168.1.11:2003\", \"test\")\n\n with SimpleCounter(\"counter\", client):\n sleep(1)\n\n with SimpleTimer(\"timer\", client):\n sleep(1)\n\n with SimpleCollector(\"collector\", client) as collector:\n collector.add(123)\n\n client.send()\n\n\nAnother test :\n\n.. code-block:: python\n\n from time import sleep\n from carbon.client import stat\n from carbon.client import metrics\n\n # Counter\n stat['counter'] = metrics.Counter\n stat['counter'].inc(1)\n sleep(1)\n stat['counter'].dec(1)\n\n # Timer\n stat['timer'] = metrics.Timer\n stop_watch = stat['timer'].start()\n sleep(1)\n stat['timer'].stop(stop_watch)\n\n # Collector\n stat['collector'] = metrics.Collector\n stat['collector'].add(1)\n sleep(1)\n stat['collector'].add(2)\n sleep(1)\n stat['collector'].add(3)\n sleep(1)\n stat['collector'].add(-10)\n\n stat.send()\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/mosquito/carbon-client", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "carbon-client", "package_url": "https://pypi.org/project/carbon-client/", "platform": "all", "project_url": "https://pypi.org/project/carbon-client/", "project_urls": { "Homepage": "http://github.com/mosquito/carbon-client" }, "release_url": "https://pypi.org/project/carbon-client/0.3.3/", "requires_dist": null, "requires_python": "", "summary": "graphite/carbon udp client for sending metrics", "version": "0.3.3" }, "last_serial": 3303351, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "504389ebdbd42ef2fa0443bad8b58e0e", "sha256": "f77bdf11d8307af350c6712cef5268f6a84c1724d8ad4933e4904f18d03d5105" }, "downloads": -1, "filename": "carbon-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "504389ebdbd42ef2fa0443bad8b58e0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3775, "upload_time": "2015-09-01T10:01:46", "url": "https://files.pythonhosted.org/packages/fe/8a/397c63b0153b23d1a69f5dac69a4689db7691b10abcf636b673d79c4f31b/carbon-client-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b578d4d8737bba44298ae688d7db9b3f", "sha256": "5a67dc3d45993be21bd573ff67726e6ae5f6f0b7ca032ed7862be7b90c7352cd" }, "downloads": -1, "filename": "carbon-client-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b578d4d8737bba44298ae688d7db9b3f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4569, "upload_time": "2015-09-01T10:35:21", "url": "https://files.pythonhosted.org/packages/96/22/99197112ee37711a84f4762a88abc44c0eea7f6194a4392f14a1654c37d5/carbon-client-0.1.1.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0b8f468f54a6a67813da78e3c3166098", "sha256": "98e5b03e6723af5591fad98b3fddacbe07e7fcad32dad4cf6b7ec7b6fa7bbabd" }, "downloads": -1, "filename": "carbon-client-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0b8f468f54a6a67813da78e3c3166098", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5562, "upload_time": "2016-12-05T22:23:21", "url": "https://files.pythonhosted.org/packages/59/a3/60a7499fd6c4f4fc68c0b95ac99d07c0cf3397efaffe8193af3110466801/carbon-client-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "665cca980c92d5820900ecff9745d322", "sha256": "e84223e742a9a2f688d299ca14c858c59f596cedaedfbd5a236e1a8ae1691396" }, "downloads": -1, "filename": "carbon_client-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "665cca980c92d5820900ecff9745d322", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 11327, "upload_time": "2017-07-12T10:40:38", "url": "https://files.pythonhosted.org/packages/ba/26/a56461e999db2bb98a026f6255099a705961ac91135516b84256836de1aa/carbon_client-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48b24fcac177b61ba6300b8d53517347", "sha256": "9c8d9e540a5e33bcdca286779fdd1873c5b2db7bd22d88185061934a01f62a0f" }, "downloads": -1, "filename": "carbon-client-0.3.0.tar.gz", "has_sig": false, "md5_digest": "48b24fcac177b61ba6300b8d53517347", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6208, "upload_time": "2017-07-12T10:40:37", "url": "https://files.pythonhosted.org/packages/7f/71/4df7bd6995002494a73b0c1fd21c6fbb33ee62b2c6abe4c696bee8655b06/carbon-client-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "73c0eda29ab8f01773e875df3f3dbe97", "sha256": "a7658f303cd3631725793111763cbd1d6c1e7335009bb576c52cf1769dc60ec7" }, "downloads": -1, "filename": "carbon_client-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "73c0eda29ab8f01773e875df3f3dbe97", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 11404, "upload_time": "2017-07-25T15:44:13", "url": "https://files.pythonhosted.org/packages/ea/ab/0da1ea152db54afee95a382d2c3f5ff850b3c640e25c1546f3540a379541/carbon_client-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f1c885d3e1e800d5260f614f3bd1dd9f", "sha256": "4503b2913d5c9bcced3a8e412a1222f000251d10693e05664431baa62040d36f" }, "downloads": -1, "filename": "carbon-client-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f1c885d3e1e800d5260f614f3bd1dd9f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6276, "upload_time": "2017-07-25T15:44:11", "url": "https://files.pythonhosted.org/packages/68/87/e89316e22f6b0c6523bac0c9b6346c2cd185c916e4fc8a2b70cd9a83ac57/carbon-client-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "5a08da2679ba288c88d101f1786b5479", "sha256": "d1240c9ad1285cf88968993c611ed98b91e688d5f293b16b518d0ab611bdf25f" }, "downloads": -1, "filename": "carbon-client-0.3.2.tar.gz", "has_sig": false, "md5_digest": "5a08da2679ba288c88d101f1786b5479", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6285, "upload_time": "2017-11-03T12:38:58", "url": "https://files.pythonhosted.org/packages/c6/38/7c1075745148c75ddc7cca26bac333f21afddb24cba38cc953e0df8e11c7/carbon-client-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "c158650a272704ecf37f7167a0d81e91", "sha256": "19d4d5c7091d4432e4b4a6ed695e3d31b728eed440b72afbe031bab81fb81cda" }, "downloads": -1, "filename": "carbon-client-0.3.3.tar.gz", "has_sig": false, "md5_digest": "c158650a272704ecf37f7167a0d81e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6385, "upload_time": "2017-11-03T14:48:14", "url": "https://files.pythonhosted.org/packages/c1/f0/83dd9302c22b5a71243f6b48a6cd2bf0e7fdf52582813437e2637bdb74a6/carbon-client-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c158650a272704ecf37f7167a0d81e91", "sha256": "19d4d5c7091d4432e4b4a6ed695e3d31b728eed440b72afbe031bab81fb81cda" }, "downloads": -1, "filename": "carbon-client-0.3.3.tar.gz", "has_sig": false, "md5_digest": "c158650a272704ecf37f7167a0d81e91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6385, "upload_time": "2017-11-03T14:48:14", "url": "https://files.pythonhosted.org/packages/c1/f0/83dd9302c22b5a71243f6b48a6cd2bf0e7fdf52582813437e2637bdb74a6/carbon-client-0.3.3.tar.gz" } ] }