{ "info": { "author": "Gregory Petukhov", "author_email": "lorien@lorien.name", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "=====\nStatx\n=====\n\n.. image:: https://travis-ci.org/lorien/statx.png?branch=master\n :target: https://travis-ci.org/lorien/statx?branch=master\n\n.. image:: https://img.shields.io/pypi/dm/statx.svg\n :target: https://pypi.python.org/pypi/statx\n\n.. image:: https://img.shields.io/pypi/v/statx.svg\n :target: https://pypi.python.org/pypi/statx\n\n.. image:: https://readthedocs.org/projects/statx/badge/?version=latest\n :target: http://user-agent.readthedocs.org\n\n\nWhat is statx library?\n----------------------\n\nYou might find it helpful to collect statistics about some long-running\nprocess. For insitance, web site crawling, copying big number of files,\nprocessing some big stuff. Stat class is able to::\n\n* count things\n* display speed of change\n* collects things (collections are also counted)\n\n\nUsage Example\n-------------\n\n.. code:: python\n\n >>> from statx import Stat\n >>> import time\n >>> import logging\n >>> logging.basicConfig(level=logging.DEBUG)\n >>> stat = Stat(speed_key='foo')\n >>> for x in range(20):\n ... stat.inc('foo')\n ... stat.inc('bar', 2)\n ... stat.collect('gaz', 13)\n ... time.sleep(0.5)\n ... \n DEBUG:grab.stat:RPS: 0.01 [bar=82, foo=42]\n DEBUG:grab.stat:RPS: 2.00 [bar=86, foo=44, gaz=2]\n DEBUG:grab.stat:RPS: 2.00 [bar=90, foo=46, gaz=4]\n DEBUG:grab.stat:RPS: 2.00 [bar=94, foo=48, gaz=6]\n DEBUG:grab.stat:RPS: 2.00 [bar=98, foo=50, gaz=8]\n DEBUG:grab.stat:RPS: 2.00 [bar=102, foo=52, gaz=10]\n DEBUG:grab.stat:RPS: 2.00 [bar=106, foo=54, gaz=12]\n DEBUG:grab.stat:RPS: 2.00 [bar=110, foo=56, gaz=14]\n DEBUG:grab.stat:RPS: 2.00 [bar=114, foo=58, gaz=16]\n DEBUG:grab.stat:RPS: 2.00 [bar=118, foo=60, gaz=18]\n >>> stat.print_progress_line()\n DEBUG:grab.stat:RPS: 0.04 [bar=122, foo=61, gaz=20]\n >>> stat.counters\n defaultdict(, {'foo': 61, 'bar': 122})\n >>> stat.collections\n defaultdict(, {'gaz': [13, 13, 13, 13, 13, 13, 13, 13, 13,\n 13, 13, 13, 13, 13, 13, 13, 13, 13,\n 13, 13]})\n\n\nInstallation\n------------\n\nUse pip:\n\n.. code:: shell\n\n $ pip install -U statx\n\n\nContribution\n============\n\nUse github to submit bug,fix or wish request: https://github.com/lorien/statx/issues", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lorien/statx", "keywords": "stat statistics stats", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "statx", "package_url": "https://pypi.org/project/statx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/statx/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lorien/statx" }, "release_url": "https://pypi.org/project/statx/0.0.2/", "requires_dist": null, "requires_python": null, "summary": "A tool to count things", "version": "0.0.2" }, "last_serial": 1828335, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8843353e6bbabba3ccb587de8bd0ded6", "sha256": "5c6f86f92f83faa784edf7e6cc97884277ce883261c0979a3fa743be5fe0b207" }, "downloads": -1, "filename": "statx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8843353e6bbabba3ccb587de8bd0ded6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3459, "upload_time": "2015-11-22T16:17:37", "url": "https://files.pythonhosted.org/packages/c0/a6/00821f7637998f4a6513f363d770d456eb4971d447084687d3dbafea9997/statx-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8843353e6bbabba3ccb587de8bd0ded6", "sha256": "5c6f86f92f83faa784edf7e6cc97884277ce883261c0979a3fa743be5fe0b207" }, "downloads": -1, "filename": "statx-0.0.2.tar.gz", "has_sig": false, "md5_digest": "8843353e6bbabba3ccb587de8bd0ded6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3459, "upload_time": "2015-11-22T16:17:37", "url": "https://files.pythonhosted.org/packages/c0/a6/00821f7637998f4a6513f363d770d456eb4971d447084687d3dbafea9997/statx-0.0.2.tar.gz" } ] }