{ "info": { "author": "SHxKM", "author_email": "hi@shibel.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Quality Assurance", "Topic :: Utilities" ], "description": "# hume - simple & quick profiling for mere mortals\n\nhume is a fun-expirement turned Python package. In short, it exposes a decorator `profile` that you can use to measure \nthe execution time of functions. It goes out of its way to make its protocol clear, usage simple, and configuration flexible. \n\nLike many profiling libraries, hume adds overhead which means its measurements are (often) slower than real execution time when testing small pieces of code. **Don't** use it for super-scientific benchmarking.\n\n**Note:** Python >= 3.6 required.\n\n## Installation\n\nYou can install `hume` from [PyPI](https://pypi.org/):\n\n pip install hume\n\nor:\n\n pipenv install hume\n\n## \u2605 hume.decorators\n\n### \u2605\u2605 profile\n\nA simple decorator to measure function execution times. \n\n- Supports N simulations and average times. \n- Supports, recognizes, and reports recursive functions.\n- (optional) List `args` and `kwargs` as provided to the decorated function.\n- (optional) Display the decorated function's return value\n- (optional) Supress `print` statements in decorated functions (default is `False`, output is only reported for one simulation)\n\n\n`profile` does not in any way modify what's returned by the decorated function. The only thing it will possibly augment are `print` statements.\n\n#### \u2605\u2605\u2605 usage\n\nSimply decorate any function:\n\n```python\nfrom hume.decorators import profile\n\n@profile(6)\ndef slow_add(num):\n \"\"\"\n slow_add sleeps one second and returns num + 1\n \"\"\"\n\n time.sleep(1)\n return num + 1\n\nprint(slow_add(3))\n```\n\nAnd let it do its job:\n\n```terminal\nprofiling slow_add \n------------------------------------------------\n\u2192 name: slow_add\n\u2192 simulations: 6\n\u2192 average execution time: 1.0034156345 seconds\n\n4\n```\n\n#### \u2605\u2605\u2605 options and defaults\n\n`profile` supports the following params:\n\n- `nums: int = 1` \u2192 how many simulations to conduct\n- `show_args: bool = False` \u2192 display `args` passed to the decorated function\n- `show_kwargs: bool = False` \u2192 display `kwargs` passed to the decorated function\n- `show_result: bool = False` \u2192 display decorated function return value\n- `mute_console: bool = False` \u2192 supress `print` statements inside the decorated function's body. Useful when you have a bunch of these that you don't want to remove just for the sake of measurement.1\n\n1 Even if `mute_console` is `False`, recursive functions will print normally and not per `nums`.\n\n#### \u2605\u2605\u2605 recursion\n\nFor recursive functions, `profile` just knows (and doesn't pollute the console):\n\n```python\n# recursive function\n@profile(2)\ndef factorial(n):\n if n == 1:\n return 1\n return n * factorial(n - 1)\n\n\nfactorial(3)\n```\n\n```terminal\nprofiling factorial (recursive function detected) \n------------------------------------------------\n\u2192 name: factorial\n\u2192 simulations: 2\n\u2192 average execution time: 0.00011469949999964868 seconds\n```\n\n#### \u2605\u2605\u2605 changing & overriding defaults\n\nIf you don't like `profile`'s [default configuration](#-options-and-defaults), you can import the `CONFIG` dict and override them. For example, if you want `profile` to include the `return` from the decorated function by default, you would do the following:\n\n```python\nfrom hume.decorators import profile, CONFIG\n\nCONFIG[\"show_results\"] = True\n\n@profile(2)\ndef return_one():\n return 1\n\n# you can always override your own defaults:\n@profile(show_result=False)\ndef return_two_ignored():\n return 2\n```\n\n#### \u2605\u2605\u2605 colorized output\n\nOutput is colorized, because priorities:\n\n![console output demo](https://raw.githubusercontent.com/SHxKM/hume/master/docs/console_demo.png?token=ABSE3IVTPJ6CWFRQUHSW75C47APAU)", "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/SHxKM/hume", "keywords": "profiling,profile,timing", "license": "MIT", "maintainer": "SHxKM", "maintainer_email": "hi@shibel.com", "name": "hume", "package_url": "https://pypi.org/project/hume/", "platform": "", "project_url": "https://pypi.org/project/hume/", "project_urls": { "Documentation": "https://github.com/SHxKM/hume/blob/master/README.md", "Homepage": "https://github.com/SHxKM/hume", "Repository": "https://github.com/SHxKM/hume" }, "release_url": "https://pypi.org/project/hume/0.3.20b0/", "requires_dist": [ "sty (>=1.0-beta.1,<2.0)" ], "requires_python": ">=3.6,<4.0", "summary": "really simple profiling for mere mortals", "version": "0.3.20b0" }, "last_serial": 5347502, "releases": { "0.3.0b0": [ { "comment_text": "", "digests": { "md5": "e068869a9da70322469122f2bde42fbe", "sha256": "7794fecd3fd48ebb6f88a6eecc499a4c5de8d3e82560a225b5240612de0fb8c3" }, "downloads": -1, "filename": "hume-0.3.0b0-py3-none-any.whl", "has_sig": false, "md5_digest": "e068869a9da70322469122f2bde42fbe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 4679, "upload_time": "2019-05-29T19:44:48", "url": "https://files.pythonhosted.org/packages/da/15/6b16b014d0a335108aa3a79c88604da9e55f1db24b29aa648dbb63eecbe6/hume-0.3.0b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3b9edf06676548f3f2a65585928a421a", "sha256": "811a1363fd6aa39a3db7657343ed65608f74fe00b91e5028164545d00742498a" }, "downloads": -1, "filename": "hume-0.3.0b0.tar.gz", "has_sig": false, "md5_digest": "3b9edf06676548f3f2a65585928a421a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 4654, "upload_time": "2019-05-29T19:44:51", "url": "https://files.pythonhosted.org/packages/78/3b/5b23f12d37a169df4bf293a59cd899b4144f71275ab1269f181e9a2dce80/hume-0.3.0b0.tar.gz" } ], "0.3.11b0": [ { "comment_text": "", "digests": { "md5": "c106072fac53d2565a5888017b48cde6", "sha256": "93dfbd2f6e0bf51bb22356d4b4632d8fcbe6c9b9e2b7524555de8f633b3f918d" }, "downloads": -1, "filename": "hume-0.3.11b0-py3-none-any.whl", "has_sig": false, "md5_digest": "c106072fac53d2565a5888017b48cde6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 66740, "upload_time": "2019-05-29T19:48:45", "url": "https://files.pythonhosted.org/packages/a7/a7/3e10fd66258c87cd6f05c4bb27d196c0daf282b1c1d60ccb6830006dbccc/hume-0.3.11b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5d4edce79b4cb202867e736119f5c9d8", "sha256": "82bf0868c33d3dfe3fc47a593686ceb285e7877ed4c72051746e3c20d09cda05" }, "downloads": -1, "filename": "hume-0.3.11b0.tar.gz", "has_sig": false, "md5_digest": "5d4edce79b4cb202867e736119f5c9d8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 68378, "upload_time": "2019-05-29T19:48:47", "url": "https://files.pythonhosted.org/packages/bd/4d/d5bf8f760aa422757a96bc95e5d8a79ce060c1a23bdb4f41335ba1fe6ddf/hume-0.3.11b0.tar.gz" } ], "0.3.12b0": [ { "comment_text": "", "digests": { "md5": "3bd0332d535a76c166f9a91144f42bfc", "sha256": "b2e5dbc02fb221c30009ac235936be09ecd6192d76134980955dc744a3d5fc40" }, "downloads": -1, "filename": "hume-0.3.12b0-py3-none-any.whl", "has_sig": false, "md5_digest": "3bd0332d535a76c166f9a91144f42bfc", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 66751, "upload_time": "2019-05-29T19:52:14", "url": "https://files.pythonhosted.org/packages/7b/38/4e237dfa14a2ef168b48ed8e4106120d8a69c121716a5c8f779779cebd50/hume-0.3.12b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "67cbb17a6b1bf288e944976d032eef72", "sha256": "93b420fb7d4c2aca511eff8a9291c0eca061fab099502499269b728cb87b6ba4" }, "downloads": -1, "filename": "hume-0.3.12b0.tar.gz", "has_sig": false, "md5_digest": "67cbb17a6b1bf288e944976d032eef72", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 68397, "upload_time": "2019-05-29T19:52:15", "url": "https://files.pythonhosted.org/packages/3f/f0/78d3bc3c03cc4a8f52662d95c470cba9f35f7cd713310bee41dec00f5306/hume-0.3.12b0.tar.gz" } ], "0.3.13b0": [ { "comment_text": "", "digests": { "md5": "33dd9fbf90f4e095e315a29020d5c8b6", "sha256": "7db899e84bd290fdce9cb45dcf018710796af8cad0e8a7d295425aaa928f43d9" }, "downloads": -1, "filename": "hume-0.3.13b0-py3-none-any.whl", "has_sig": false, "md5_digest": "33dd9fbf90f4e095e315a29020d5c8b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 66792, "upload_time": "2019-05-29T19:55:44", "url": "https://files.pythonhosted.org/packages/54/4c/af0430e8dd4fccdf9cad9264d9b6a584024e0c0a14120e34180fa47a254e/hume-0.3.13b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e81bfdd11d0f086c9a5b655f6db267af", "sha256": "f341e13753a05709a46dfdabfde4aac4c254a443db9f00f018886a598608e471" }, "downloads": -1, "filename": "hume-0.3.13b0.tar.gz", "has_sig": false, "md5_digest": "e81bfdd11d0f086c9a5b655f6db267af", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 68473, "upload_time": "2019-05-29T19:55:45", "url": "https://files.pythonhosted.org/packages/78/e0/45601f6ff4b3dd0e280b1783e857740e984fc49928c3b5e3b61ba3e6b43d/hume-0.3.13b0.tar.gz" } ], "0.3.14b0": [ { "comment_text": "", "digests": { "md5": "339a53be20453d835ad79043d52d5fa5", "sha256": "1813e4dda0c68743232b0fc353f0de841fdd2ea45e97bd1cfb8ef7bd78e4f072" }, "downloads": -1, "filename": "hume-0.3.14b0-py3-none-any.whl", "has_sig": false, "md5_digest": "339a53be20453d835ad79043d52d5fa5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67363, "upload_time": "2019-05-29T21:12:19", "url": "https://files.pythonhosted.org/packages/b3/d7/63fd655bf3ca4e4698d298d03c99383b452652b7328e986d7e6a843d4bca/hume-0.3.14b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1d58fce7dbfd2b7d85b4c890c3b2923", "sha256": "f4f7e22418746ed79a23beedfdb9d3881f664b9664866c780dd917276022c1e8" }, "downloads": -1, "filename": "hume-0.3.14b0.tar.gz", "has_sig": false, "md5_digest": "e1d58fce7dbfd2b7d85b4c890c3b2923", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 69889, "upload_time": "2019-05-29T21:12:20", "url": "https://files.pythonhosted.org/packages/10/db/2f51eadde81808c5e30bf31125904a8583abfb0660c1d034f1e931b9c912/hume-0.3.14b0.tar.gz" } ], "0.3.15b0": [ { "comment_text": "", "digests": { "md5": "69295c2feaa009fca9b242b293b84591", "sha256": "6add76a5f42edffe40894e831a8d5f3fb2ea55c4dce54a894920cfc17387c4e3" }, "downloads": -1, "filename": "hume-0.3.15b0-py3-none-any.whl", "has_sig": false, "md5_digest": "69295c2feaa009fca9b242b293b84591", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67424, "upload_time": "2019-05-29T21:41:11", "url": "https://files.pythonhosted.org/packages/ef/90/38b3f393dd53fc711704a906431c1d7686db7a2d5a0d571f132f3bd9fc14/hume-0.3.15b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6bff6740f6867c645e7b822b745e5400", "sha256": "8b1ba223d7ef99df82e9622445edc42830ffa8b746be542e60e4893b512e0954" }, "downloads": -1, "filename": "hume-0.3.15b0.tar.gz", "has_sig": false, "md5_digest": "6bff6740f6867c645e7b822b745e5400", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70064, "upload_time": "2019-05-29T21:41:13", "url": "https://files.pythonhosted.org/packages/88/4f/23e7456a8762a566d388ed3b9c249c8700e117e420d346d08eb0f130eaa6/hume-0.3.15b0.tar.gz" } ], "0.3.16b0": [ { "comment_text": "", "digests": { "md5": "dc72dc03b59a82ca8d89eddf122c1291", "sha256": "e59c96de6aff7c7d6afe5145643927328f54cdeacaa0bcf588b9afd8b46a650f" }, "downloads": -1, "filename": "hume-0.3.16b0-py3-none-any.whl", "has_sig": false, "md5_digest": "dc72dc03b59a82ca8d89eddf122c1291", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67427, "upload_time": "2019-05-29T21:58:26", "url": "https://files.pythonhosted.org/packages/f9/ca/82658d4fbb904e01176f6ee3017a50642c548d7f7de40f49602308d07ad6/hume-0.3.16b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4e961e9247781e4b1ee13a074df871ff", "sha256": "0383fe59c27de5300937fd47b9f7ad186a67cdddb074a07bb5eb023e819ab4ff" }, "downloads": -1, "filename": "hume-0.3.16b0.tar.gz", "has_sig": false, "md5_digest": "4e961e9247781e4b1ee13a074df871ff", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70061, "upload_time": "2019-05-29T21:58:28", "url": "https://files.pythonhosted.org/packages/bf/07/de2843649c840b8f338f437dd49a04d2a26a10322561f01570d925a3c6c8/hume-0.3.16b0.tar.gz" } ], "0.3.17b0": [ { "comment_text": "", "digests": { "md5": "e0d7df6ac7d037fb12c34c8eb72740ff", "sha256": "686bcb1755aac8264ef109b657ae7011abf8e86de18bddaf3f56b1bacf695fc8" }, "downloads": -1, "filename": "hume-0.3.17b0-py3-none-any.whl", "has_sig": false, "md5_digest": "e0d7df6ac7d037fb12c34c8eb72740ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67433, "upload_time": "2019-05-29T22:02:17", "url": "https://files.pythonhosted.org/packages/e8/2e/886aa4c48b561614cdbbc9ba8999ec32ffbe27c189a4fe054ff1a79d4698/hume-0.3.17b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "93cc1894bed92dbbb4cd1ae952e71a8f", "sha256": "e4c32896a23131b5d2408d84e140ff5d8d5d2d8a4990495d457fabf36717f450" }, "downloads": -1, "filename": "hume-0.3.17b0.tar.gz", "has_sig": false, "md5_digest": "93cc1894bed92dbbb4cd1ae952e71a8f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70077, "upload_time": "2019-05-29T22:02:19", "url": "https://files.pythonhosted.org/packages/8f/c4/9b649e45b331d86cd3a1c38013f2dc0a7ef2d7d7258ec4754ff6f27a6889/hume-0.3.17b0.tar.gz" } ], "0.3.18b0": [ { "comment_text": "", "digests": { "md5": "2b5446abfe6fc9ee1190070624295fd5", "sha256": "888b3dc0de1879f3fcf1aae1d0c0cd606dc222680f391ba98d48e9c248262582" }, "downloads": -1, "filename": "hume-0.3.18b0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b5446abfe6fc9ee1190070624295fd5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67474, "upload_time": "2019-05-29T22:04:50", "url": "https://files.pythonhosted.org/packages/90/52/4a506d1a98434765b90750e4fe50a761dbcab55d0dfa65e86c828e6096cd/hume-0.3.18b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "269e2576057b40ef3c9d7999af9415f9", "sha256": "c2337419ac405fac23df91df735942dcc680d10fd8d134773834b236cd4c23ab" }, "downloads": -1, "filename": "hume-0.3.18b0.tar.gz", "has_sig": false, "md5_digest": "269e2576057b40ef3c9d7999af9415f9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70169, "upload_time": "2019-05-29T22:04:52", "url": "https://files.pythonhosted.org/packages/13/48/9d40d60b319003c24621f7f2af360128aff3dc8146f97233636025e225aa/hume-0.3.18b0.tar.gz" } ], "0.3.1b0": [ { "comment_text": "", "digests": { "md5": "c5cbb7bbb07540323b1c6c8b6180885f", "sha256": "f302d70356bf2a744623cd1bca13f45c8332ea7477a0ae5308e34826ef2a643e" }, "downloads": -1, "filename": "hume-0.3.1b0-py3-none-any.whl", "has_sig": false, "md5_digest": "c5cbb7bbb07540323b1c6c8b6180885f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 66728, "upload_time": "2019-05-29T19:46:50", "url": "https://files.pythonhosted.org/packages/ff/4f/7f10f0a5263f85577037a8c0997babe2466552788b6cd29c741fe55973f8/hume-0.3.1b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4a0546ec75a9a61073bb06bffeb53798", "sha256": "7bd7714255f961a342acb7bcc9e23adb8d127c4286bda037277bd5158ae2af1f" }, "downloads": -1, "filename": "hume-0.3.1b0.tar.gz", "has_sig": false, "md5_digest": "4a0546ec75a9a61073bb06bffeb53798", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 68360, "upload_time": "2019-05-29T19:46:52", "url": "https://files.pythonhosted.org/packages/cb/5e/b422f0b3ab6a4aa5a350d3c7430422feb8893bb241e71f50fb5c506198e3/hume-0.3.1b0.tar.gz" } ], "0.3.20b0": [ { "comment_text": "", "digests": { "md5": "310c58af96d8d7e9c28fbc8484554bec", "sha256": "ab4bd3cb7caa1bc6d0a4729e532df939f962e8efdfb93ede5dc71a951acf04b5" }, "downloads": -1, "filename": "hume-0.3.20b0-py3-none-any.whl", "has_sig": false, "md5_digest": "310c58af96d8d7e9c28fbc8484554bec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67462, "upload_time": "2019-06-01T23:14:33", "url": "https://files.pythonhosted.org/packages/88/25/aa83e8fee62068fae510e2441a4c590dda5ab3851d730736a664512a153b/hume-0.3.20b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9661cff0e0bc8e7e41624507d1f64546", "sha256": "bec37355738ada3d6fe37223cd3c38ae6314874f0ca5d70dd09f0bc3c58f4f81" }, "downloads": -1, "filename": "hume-0.3.20b0.tar.gz", "has_sig": false, "md5_digest": "9661cff0e0bc8e7e41624507d1f64546", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70177, "upload_time": "2019-06-01T23:14:35", "url": "https://files.pythonhosted.org/packages/6d/3b/8ab4d6aa0a12dc9009d813a9ed9f857b246abaf7817534690614896e060e/hume-0.3.20b0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "310c58af96d8d7e9c28fbc8484554bec", "sha256": "ab4bd3cb7caa1bc6d0a4729e532df939f962e8efdfb93ede5dc71a951acf04b5" }, "downloads": -1, "filename": "hume-0.3.20b0-py3-none-any.whl", "has_sig": false, "md5_digest": "310c58af96d8d7e9c28fbc8484554bec", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6,<4.0", "size": 67462, "upload_time": "2019-06-01T23:14:33", "url": "https://files.pythonhosted.org/packages/88/25/aa83e8fee62068fae510e2441a4c590dda5ab3851d730736a664512a153b/hume-0.3.20b0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9661cff0e0bc8e7e41624507d1f64546", "sha256": "bec37355738ada3d6fe37223cd3c38ae6314874f0ca5d70dd09f0bc3c58f4f81" }, "downloads": -1, "filename": "hume-0.3.20b0.tar.gz", "has_sig": false, "md5_digest": "9661cff0e0bc8e7e41624507d1f64546", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6,<4.0", "size": 70177, "upload_time": "2019-06-01T23:14:35", "url": "https://files.pythonhosted.org/packages/6d/3b/8ab4d6aa0a12dc9009d813a9ed9f857b246abaf7817534690614896e060e/hume-0.3.20b0.tar.gz" } ] }