{ "info": { "author": "Jason Christa", "author_email": "jason@zeitcode.com", "bugtrack_url": null, "classifiers": [ "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Topic :: Utilities" ], "description": "Python Utilikilt\n================\n\nPython Utilikilt is a collection of utility classes and functions.\n\nInstallation\n------------\n\nRun `pip install python-utilikilt`\n\nClasses\n-------\n\n###MixIn\nMonkey patches a classes with methods from a supplied class.\n\n###Indexable\nTakes a generator (or any iterator) and makes it indexable.\n\n```python\nfrom python_utils.classes import Indexable\n\ndef fib():\n a, b = 0, 1\n while 1:\n yield a\n a, b = b, a + b\n\nfib = Indexable(fib())\nfib[10] #144\nfib[5] #13\nfib[4:10:2] #[8, 21, 55]\n```\n\nDecorators\n----------\n\n###retry\nDecorator for retrying a function if exception occurs.\n\n###run_async\nDecorator for running a function in a seperate thread.\n\n###memoize\nDecorator for caching the result of a function so subsequent calls are returned out of cache instead of re-running the function.\n\nIterators\n---------\n\n###isplitter\nTakes an iterator and splits it into chunks of the specified size and yields the chunks.\n\n```python\nfrom python_utils.iterators import isplitter\n\nfor x in isplitter(xrange(1000), 100):\n print x #[0,...,99], [100,...,199]...[900,...,999]\n```\n\n###daterange\nIterates over a range of dates stepping daily, monthly, or yearly\n\n```python\nfrom datetime import date\nfrom python_utils.iterators import daterange\n\nfor date in daterange(date('2012-05-01'),\n date('2012-05-20')):\n print date #2012-05-02, 2012-05-03...2012-05-20\n\nfor date in daterange(date('2012-05-01'),\n date('2012-10-01'),\n frequency='monthly'):\n print date #2012-06-01, 2012-07-01...2012-10-01\n\nfor date in daterange(date('1999-05-01'),\n date('2009-05-01'),\n frequency='yearly'):\n print date #2000-05-01, 2001-05-01...2009-05-01\n```", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/nextscreenlabs/python-utils", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "python-utilikilt", "package_url": "https://pypi.org/project/python-utilikilt/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-utilikilt/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/nextscreenlabs/python-utils" }, "release_url": "https://pypi.org/project/python-utilikilt/0.3b5/", "requires_dist": null, "requires_python": null, "summary": "A collection of general python utility functions.", "version": "0.3b5" }, "last_serial": 798118, "releases": { "0.2b4": [ { "comment_text": "", "digests": { "md5": "aace890965e255171a50e255f0d909b8", "sha256": "299b3342fe53205f1d6fe2f96eb74e28d8000823fe6f35d2b2d410ae3eefe489" }, "downloads": -1, "filename": "python-utilikilt-0.2b4.zip", "has_sig": false, "md5_digest": "aace890965e255171a50e255f0d909b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13240, "upload_time": "2012-11-02T21:39:09", "url": "https://files.pythonhosted.org/packages/19/ca/285950ad9f04f789f15204626fb07843da5377e744bbc021ee0a2d0b2f7b/python-utilikilt-0.2b4.zip" } ], "0.3b5": [ { "comment_text": "", "digests": { "md5": "347ecc0a1c26d7f9bd4c53f24bb7c91d", "sha256": "3db40422a3379a2abca2c7a997418939311879355e4a9b19fec7d042316255cb" }, "downloads": -1, "filename": "python-utilikilt-0.3b5.zip", "has_sig": false, "md5_digest": "347ecc0a1c26d7f9bd4c53f24bb7c91d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9644, "upload_time": "2012-11-14T01:04:26", "url": "https://files.pythonhosted.org/packages/bc/94/caccd5b32dd85b066f66728a3bc61d90f2dc73c535f8695ec0b00c2522b5/python-utilikilt-0.3b5.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "347ecc0a1c26d7f9bd4c53f24bb7c91d", "sha256": "3db40422a3379a2abca2c7a997418939311879355e4a9b19fec7d042316255cb" }, "downloads": -1, "filename": "python-utilikilt-0.3b5.zip", "has_sig": false, "md5_digest": "347ecc0a1c26d7f9bd4c53f24bb7c91d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9644, "upload_time": "2012-11-14T01:04:26", "url": "https://files.pythonhosted.org/packages/bc/94/caccd5b32dd85b066f66728a3bc61d90f2dc73c535f8695ec0b00c2522b5/python-utilikilt-0.3b5.zip" } ] }