{ "info": { "author": "Konrad Mohrfeldt", "author_email": "konrad.mohrfeldt@farbdev.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python :: 3 :: Only" ], "description": "# docbrown\n\n*docbrown* is an empirical progress library. It determines the overall\nduration and progression of a process by looking at the time it took in the past.\n\n*docbrown* might be an option for you, if you have one long running task\nwhich parts take very different amounts of time. It is also helpful when used\nin environments where you can\u2019t inform consumers about the progress of a task\nout-of-band (like a WSGI request/response cycle vs a WebSocket).\n\n## Installation\n\n```bash\npip install docbrown\n```\n\nThis repository allows you to create a deb Package for Debian and derivatives\nif you\u2019re into that kind of thing. Just run `make dist-deb`.\n\n## Example Usage\n\nRecord progress:\n```python\nimport time\nfrom docbrown import record_progress\n\nwith record_progress('process_name', ident='my_ident') as record:\n # ident normally is random and unique, but you can override it with\n # your own id. Just make sure it is not used more than once at a time.\n print(record.ident)\n # do some stuff that takes time\n record('loading_data')\n time.sleep(4)\n record('calculating_matrices')\n time.sleep(9)\n record('rendering_structures')\n time.sleep(23)\n record('uploading_models')\n time.sleep(15)\n```\n\nAs *docbrown* determines progression by looking at the past every process needs\nto run at least once before `get_progress` can return any meaningful data. This\nis why `get_progress` will just return `None` on the first run of the code above.\n\nGet the progression of our process:\n```python\nfrom docbrown import get_progress\nprint(get_progress('my_ident'))\n```\n\n## Future\n\nThere are some things that would be nice, but have not been implemented yet.\n\n* additional storage backends apart from SQLite\n* configurable strategy for aggregating phase durations apart from\n the current simple arithmetic average like median\n* code path detection that takes optional phases into account and\n updates the expected duration and progress on-the-fly", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kmohrf/docbrown", "keywords": "", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "docbrown", "package_url": "https://pypi.org/project/docbrown/", "platform": "", "project_url": "https://pypi.org/project/docbrown/", "project_urls": { "Homepage": "https://github.com/kmohrf/docbrown" }, "release_url": "https://pypi.org/project/docbrown/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "an empirical progress library", "version": "0.1.1" }, "last_serial": 5890436, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "55cf3cd143d7f572eabbeec2dabcb0fc", "sha256": "405b504568477747b8de79d9c1bf5f4239a365ff413c508280a4230ff9c87d32" }, "downloads": -1, "filename": "docbrown-0.1.0.tar.gz", "has_sig": false, "md5_digest": "55cf3cd143d7f572eabbeec2dabcb0fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18141, "upload_time": "2019-09-05T07:29:39", "url": "https://files.pythonhosted.org/packages/84/70/2b71ae92e2406cc8d4991636e6923dcdf4fce0be7a475bd7e3c3c8b8172e/docbrown-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d67001a35700a02680d5fb5c2f9dbaea", "sha256": "718846f0f47f54bfdb24e3757d3fea6eba9a0625a649ba63065330e6bc00e6a9" }, "downloads": -1, "filename": "docbrown-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d67001a35700a02680d5fb5c2f9dbaea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18619, "upload_time": "2019-09-26T12:46:05", "url": "https://files.pythonhosted.org/packages/c1/34/e242f9961b80253973411730a9955b757b1a7c4be988cc8579e80e9ee2b9/docbrown-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d67001a35700a02680d5fb5c2f9dbaea", "sha256": "718846f0f47f54bfdb24e3757d3fea6eba9a0625a649ba63065330e6bc00e6a9" }, "downloads": -1, "filename": "docbrown-0.1.1.tar.gz", "has_sig": false, "md5_digest": "d67001a35700a02680d5fb5c2f9dbaea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18619, "upload_time": "2019-09-26T12:46:05", "url": "https://files.pythonhosted.org/packages/c1/34/e242f9961b80253973411730a9955b757b1a7c4be988cc8579e80e9ee2b9/docbrown-0.1.1.tar.gz" } ] }