{ "info": { "author": "H\u00e5kon Drolsum R\u00f8kenes", "author_email": "drhaakondr@gmail.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.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Version Control" ], "description": "# Verfun\n\n[![Build Status](https://travis-ci.org/haakondr/verfun.svg?branch=master)](https://travis-ci.org/haakondr/verfun)\n\nVerfun is a util for generating a checksum for a python function ignoring whitespace, comments, variable names, etc.\n\n## Great, why is this useful?\n\nGiven a use case where you want to \n\n1. Version an algorithm that did something to your data\n2. Rerun said algorithm on affected data if the algorithm changes\n3. not rerun if you only add comments, refactor variable names, etc\n\n## Features:\n\nGenerating a md5 checksum of a given function, ignoring the following:\n\n- function name\n- docstrings and comments\n- whitespace\n- indentation\n\n## Example usage\nExample taken from [example.py](example.py)\n\n```\nfrom verfun import version_hash_for_function, version_hash_for_function_list\n\n\ndef some_strange_looking_function(param1, callback_fn):\n tail = param1[-1]\n return callback_fn(tail)\n\n\ndef same_strange_looking_function(param1, callback_fn):\n \"\"\"\n This function is documented, but the function is identical to some_strange_looking_function\n and should result in the same hash\n \"\"\"\n tail = param1[-1]\n # return the callback value from the tail of param whatever that is\n return callback_fn(tail)\n\n\ndef different_function():\n return \"this one is different\"\n\n\n# generate checksum for each function\nprint(version_hash_for_function(some_strange_looking_function))\n# c4cb4d2638d790016cbee29a6ed5af8c\n\nprint(version_hash_for_function(same_strange_looking_function))\n# c4cb4d2638d790016cbee29a6ed5af8c\n\nprint(version_hash_for_function(different_function))\n# 8515c1678211e93362800b30ef7234cf\n\n# generate a checksum for multiple functions\nprint(version_hash_for_function_list([some_strange_looking_function, different_function]))\n# 1fa4dc521f63cd5a8faac4cc8402d63d\n\n```", "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/haakondr/verfun", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "verfun", "package_url": "https://pypi.org/project/verfun/", "platform": "", "project_url": "https://pypi.org/project/verfun/", "project_urls": { "Homepage": "https://github.com/haakondr/verfun" }, "release_url": "https://pypi.org/project/verfun/0.2.0/", "requires_dist": null, "requires_python": "", "summary": "Verfun is a util for generating a checksum for a python function", "version": "0.2.0" }, "last_serial": 4725015, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "9d8084e3ffd8ead1d899514555645926", "sha256": "f29f07437cea020ee6b7833a0f0289106d51292887dee04d8e8211e3a9dd7ec7" }, "downloads": -1, "filename": "verfun-0.1.tar.gz", "has_sig": false, "md5_digest": "9d8084e3ffd8ead1d899514555645926", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1899, "upload_time": "2019-01-21T21:06:14", "url": "https://files.pythonhosted.org/packages/62/47/b074c8d218da67a237c66d6df7b5bead80ec0fc55f1ef65ab31ca0f4352f/verfun-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "1f07c94252bc438c067db4e794da4fee", "sha256": "b1b4305b1d7e2d230c749acf805e6c9fe8db5ee5b6b542a09c770a993bfbc8a2" }, "downloads": -1, "filename": "verfun-0.1.1.tar.gz", "has_sig": false, "md5_digest": "1f07c94252bc438c067db4e794da4fee", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2213, "upload_time": "2019-01-21T21:15:34", "url": "https://files.pythonhosted.org/packages/0b/1b/326efd47ac5ec7b0cc18144223039fe92c8fc69937a22cf5fc4c1ad6873c/verfun-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4af7eb862b1bd82d73d657ee5635d2bb", "sha256": "f834420aaca3023dcfaf55001f860244e5013f2317f94aa238b18389a2c2ffe5" }, "downloads": -1, "filename": "verfun-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4af7eb862b1bd82d73d657ee5635d2bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2214, "upload_time": "2019-01-21T21:30:20", "url": "https://files.pythonhosted.org/packages/a7/aa/a59986bac43e7132cb05d0c58dd1c8e50660bb1a7a9cf55771557156df55/verfun-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "68651118afc75058b8336f8a661cabec", "sha256": "b2c1940b7baec67fae8fe743815306204a6f2f27ee5b839794e61105dabf8f8c" }, "downloads": -1, "filename": "verfun-0.2.0.tar.gz", "has_sig": false, "md5_digest": "68651118afc75058b8336f8a661cabec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2362, "upload_time": "2019-01-22T08:55:24", "url": "https://files.pythonhosted.org/packages/f4/d2/5c74c27da0f50714fd3c92764a31cabb698f39dc18878b3a1265588ef6bb/verfun-0.2.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "68651118afc75058b8336f8a661cabec", "sha256": "b2c1940b7baec67fae8fe743815306204a6f2f27ee5b839794e61105dabf8f8c" }, "downloads": -1, "filename": "verfun-0.2.0.tar.gz", "has_sig": false, "md5_digest": "68651118afc75058b8336f8a661cabec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2362, "upload_time": "2019-01-22T08:55:24", "url": "https://files.pythonhosted.org/packages/f4/d2/5c74c27da0f50714fd3c92764a31cabb698f39dc18878b3a1265588ef6bb/verfun-0.2.0.tar.gz" } ] }