{ "info": { "author": "Rick van Hattem", "author_email": "Wolph@wol.ph", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: BSD License" ], "description": "Useful Python Utils\n==============================================================================\n\n.. image:: https://travis-ci.org/WoLpH/python-utils.svg?branch=master\n :target: https://travis-ci.org/WoLpH/python-utils\n\n.. image:: https://coveralls.io/repos/WoLpH/python-utils/badge.svg?branch=master\n :target: https://coveralls.io/r/WoLpH/python-utils?branch=master\n\nPython Utils is a collection of small Python functions and\nclasses which make common patterns shorter and easier. It is by no means a\ncomplete collection but it has served me quite a bit in the past and I will\nkeep extending it.\n\nOne of the libraries using Python Utils is Django Utils.\n\nDocumentation is available at: https://python-utils.readthedocs.org/en/latest/\n\nLinks\n-----\n\n - The source: https://github.com/WoLpH/python-utils\n - Project page: https://pypi.python.org/pypi/python-utils\n - Reporting bugs: https://github.com/WoLpH/python-utils/issues\n - Documentation: https://python-utils.readthedocs.io/en/latest/\n - My blog: https://wol.ph/\n\nRequirements for installing:\n------------------------------------------------------------------------------\n\n - `six` any recent version\n\nInstallation:\n------------------------------------------------------------------------------\n\nThe package can be installed through `pip` (this is the recommended method):\n\n pip install python-utils\n \nOr if `pip` is not available, `easy_install` should work as well:\n\n easy_install python-utils\n \nOr download the latest release from Pypi (https://pypi.python.org/pypi/python-utils) or Github.\n\nNote that the releases on Pypi are signed with my GPG key (https://pgp.mit.edu/pks/lookup?op=vindex&search=0xE81444E9CE1F695D) and can be checked using GPG:\n\n gpg --verify python-utils-.tar.gz.asc python-utils-.tar.gz\n\nQuickstart\n------------------------------------------------------------------------------\n\nThis module makes it easy to execute common tasks in Python scripts such as\nconverting text to numbers and making sure a string is in unicode or bytes\nformat.\n\nExamples\n------------------------------------------------------------------------------\n\nTo extract a number from nearly every string:\n\n.. code-block:: python\n\n from python_utils import converters\n\n number = converters.to_int('spam15eggs')\n assert number == 15\n\n number = converters.to_int('spam')\n assert number == 0\n\n number = converters.to_int('spam', default=1)\n assert number == 1\n\n number = converters.to_float('spam1.234')\n\nTo do a global import programmatically you can use the `import_global`\nfunction. This effectively emulates a `from ... import *`\n\n.. code-block:: python\n\n from python_utils.import_ import import_global\n\n # The following is the equivalent of `from some_module import *`\n import_global('some_module')\n\nOr add a correclty named logger to your classes which can be easily accessed:\n\n.. code-block:: python\n\n class MyClass(Logged):\n def __init__(self):\n Logged.__init__(self)\n\n my_class = MyClass()\n\n # Accessing the logging method:\n my_class.error('error')\n\n # With formatting:\n my_class.error('The logger supports %(formatting)s',\n formatting='named parameters')\n\n # Or to access the actual log function (overwriting the log formatting can\n # be done n the log method)\n import logging\n my_class.log(logging.ERROR, 'log')\n\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/python-utils/", "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/WoLpH/python-utils", "keywords": "", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "python-utils", "package_url": "https://pypi.org/project/python-utils/", "platform": "", "project_url": "https://pypi.org/project/python-utils/", "project_urls": { "Homepage": "https://github.com/WoLpH/python-utils" }, "release_url": "https://pypi.org/project/python-utils/2.3.0/", "requires_dist": null, "requires_python": "", "summary": "Python Utils is a module with some convenient utilities not included with the standard Python install", "version": "2.3.0" }, "last_serial": 3573196, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "7760549615682bec57f045a6db6b1b0f", "sha256": "2183b9343ac86af59a2a13940fe6dc3c122e2778c925495757b62ab98315ebc4" }, "downloads": -1, "filename": "python_utils-1.0-py2.6.egg", "has_sig": false, "md5_digest": "7760549615682bec57f045a6db6b1b0f", "packagetype": "bdist_egg", "python_version": "2.6", "requires_python": null, "size": 2995, "upload_time": "2011-10-16T03:43:47", "url": "https://files.pythonhosted.org/packages/17/fc/4faf40525a57f4c234093367d07d75a17a12a3b724820e99151bfdb392ad/python_utils-1.0-py2.6.egg" }, { "comment_text": "", "digests": { "md5": "38fb809aacfa39d6364e81589474b70c", "sha256": "4847661a88494ee6f5055d9688588dd11052e17951bbe8b3a1dbe7a0e0767dc7" }, "downloads": -1, "filename": "python-utils-1.0.tar.gz", "has_sig": false, "md5_digest": "38fb809aacfa39d6364e81589474b70c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1551, "upload_time": "2011-10-16T03:43:36", "url": "https://files.pythonhosted.org/packages/ab/0c/80feddd3c89bfa12a567ab0c786a3c243839809e26abd2b356bc1b7f896d/python-utils-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "d84a86ed6c88be22f3de86af3ee7a3d5", "sha256": "398f93aed694ae34e38caae91dcbb9b95081ca3c407c03e954d0248f82ef7805" }, "downloads": -1, "filename": "python_utils-1.0.1-py2.7.egg", "has_sig": true, "md5_digest": "d84a86ed6c88be22f3de86af3ee7a3d5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5076, "upload_time": "2011-12-10T15:30:48", "url": "https://files.pythonhosted.org/packages/31/4f/a3afcaa6fdc4d2446418b62e7a6d47c7a0dc717f90a722a5b02042002957/python_utils-1.0.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "ddc799db86078a21dd123238f78757a4", "sha256": "9ab841e6688107b72779faa2ed18cb46e35ead7c804f501ba358f3568605e534" }, "downloads": -1, "filename": "python-utils-1.0.1.tar.gz", "has_sig": true, "md5_digest": "ddc799db86078a21dd123238f78757a4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2322, "upload_time": "2011-12-10T15:30:48", "url": "https://files.pythonhosted.org/packages/53/7d/cf228f287d19361dd0e6c801d0881d0f037f53da26b7111cc2a86f970206/python-utils-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "5bdd2025ddb71ab4f7fea22dd9599ebb", "sha256": "631dd25c9baf74a99ce08d3f46b97c026eabacb9fbf55f457d7b4e2566c74f91" }, "downloads": -1, "filename": "python-utils-1.1.0.tar.gz", "has_sig": false, "md5_digest": "5bdd2025ddb71ab4f7fea22dd9599ebb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2790, "upload_time": "2012-05-10T15:44:45", "url": "https://files.pythonhosted.org/packages/e3/b9/9373454990abcc3d3cabd934198a9039cc098c49035f506cb24b7106348d/python-utils-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "d23f1af4084fed0958ece95ced27d78d", "sha256": "c96ac87bd3a65055863e0d9346b26960beb352728097b75398b8b5a537f638d6" }, "downloads": -1, "filename": "python-utils-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d23f1af4084fed0958ece95ced27d78d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3333, "upload_time": "2012-05-10T16:18:23", "url": "https://files.pythonhosted.org/packages/35/34/8dafd31276ce9b77affab1731e757eaf98be022356c16a439a05f77d7c8c/python-utils-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "8a69926aec656c3abf552986f6b6ef9d", "sha256": "67efe6ec5695f50c2facd5bc20f54c92ebe39a26b433b7c5efcbab28e8e6bdf4" }, "downloads": -1, "filename": "python-utils-1.1.2.tar.gz", "has_sig": false, "md5_digest": "8a69926aec656c3abf552986f6b6ef9d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3832, "upload_time": "2013-04-11T23:41:23", "url": "https://files.pythonhosted.org/packages/ea/3a/a63d6e31e10e6d260be930f34ae85612f8f6d19259ae3195b0f707283488/python-utils-1.1.2.tar.gz" } ], "1.5.0": [ { "comment_text": "", "digests": { "md5": "2301aaf1a71208df452656d205d5772d", "sha256": "ca3e7090549a6d47ae2c9fc79875d0346530c14ad32534aa0ad206669c918b88" }, "downloads": -1, "filename": "python-utils-1.5.0.tar.gz", "has_sig": false, "md5_digest": "2301aaf1a71208df452656d205d5772d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4278, "upload_time": "2013-09-20T17:51:09", "url": "https://files.pythonhosted.org/packages/52/a0/b83c108b2476958d4e1335ceb777eb8a3859a7e8bba68ddfdde0256e5f12/python-utils-1.5.0.tar.gz" } ], "1.5.1": [ { "comment_text": "", "digests": { "md5": "8c17938e8e19b8cf6ba9e11fe544b94e", "sha256": "349d301a0c97e3fb76a3214061fca87fa26e3a0b0d6eda89f6c8754270de90fd" }, "downloads": -1, "filename": "python-utils-1.5.1.tar.gz", "has_sig": false, "md5_digest": "8c17938e8e19b8cf6ba9e11fe544b94e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4523, "upload_time": "2013-10-30T12:21:15", "url": "https://files.pythonhosted.org/packages/6a/1c/74d9f463e804a8d3101cbf998866f95897995d29b8aaaffc40ac3cba7176/python-utils-1.5.1.tar.gz" } ], "1.5.2": [ { "comment_text": "", "digests": { "md5": "ee7ca26ba8e6895a1c8e22491b5bf940", "sha256": "d308f29f50376cfd08b8c334eb9d820cc5f4b4a4feadc72973dd4af75de71d90" }, "downloads": -1, "filename": "python-utils-1.5.2.tar.gz", "has_sig": false, "md5_digest": "ee7ca26ba8e6895a1c8e22491b5bf940", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4510, "upload_time": "2013-10-30T12:33:01", "url": "https://files.pythonhosted.org/packages/05/dc/f7b27626f261db3c7c434121a0d7fa35ceef57e9e579ea1c18789e7b2366/python-utils-1.5.2.tar.gz" } ], "1.6.0": [ { "comment_text": "", "digests": { "md5": "e009e85ca2c98ef0527bb465416d6e57", "sha256": "da7beeab0d773fe214efc091f53167777dc44481f4ef97d1d578e74bc7259649" }, "downloads": -1, "filename": "python-utils-1.6.0.tar.gz", "has_sig": false, "md5_digest": "e009e85ca2c98ef0527bb465416d6e57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4960, "upload_time": "2014-10-15T15:17:28", "url": "https://files.pythonhosted.org/packages/66/c6/cc08f56b8f8620a8579e4e62525fe45ec2060737d508678fae7ae3746534/python-utils-1.6.0.tar.gz" } ], "1.6.1": [ { "comment_text": "", "digests": { "md5": "e00c59e7366869f9e831bbd60408de39", "sha256": "0ecdbb99404ffd8a8fd1d8809c9373828d1013b3a8f0672d35a49c334fa7a2df" }, "downloads": -1, "filename": "python-utils-1.6.1.tar.gz", "has_sig": false, "md5_digest": "e00c59e7366869f9e831bbd60408de39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4957, "upload_time": "2014-10-15T18:42:27", "url": "https://files.pythonhosted.org/packages/ff/7f/95ffca0977baa325f147ef236bcb8d2ee80b0adc4c3a71c08a9ccfd901f8/python-utils-1.6.1.tar.gz" } ], "1.6.2": [ { "comment_text": "", "digests": { "md5": "5f85d7e8db6b539813d43bd9a2c60c82", "sha256": "de5fc0289eadd3913fe4795abcb4a04dc4dd45a5c6459610caf04ca8a206abd9" }, "downloads": -1, "filename": "python-utils-1.6.2.tar.gz", "has_sig": false, "md5_digest": "5f85d7e8db6b539813d43bd9a2c60c82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5001, "upload_time": "2015-02-09T11:08:08", "url": "https://files.pythonhosted.org/packages/3e/2a/ea1b6b7afef3d763aa58945df10a78249ae2704f175107c5ca68c5984b1b/python-utils-1.6.2.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "aa180b6363e8db681b4d62525bdf4f18", "sha256": "54a3ef7f9c7755be41824c1357ceac07c7f11a9870ed2b3464eee2307a4a2774" }, "downloads": -1, "filename": "python_utils-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "aa180b6363e8db681b4d62525bdf4f18", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 7923, "upload_time": "2016-06-07T16:54:23", "url": "https://files.pythonhosted.org/packages/48/c1/f7aa4295833fd17463f83c42be9a154c89169c2f3285f4402700658d15bc/python_utils-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "05d5fba0675e0ba3e3bf367e254d5369", "sha256": "746777e47158641cf97da342dffdc5d1f9901823615d1fdab75ce68ce39194dd" }, "downloads": -1, "filename": "python-utils-2.0.0.tar.gz", "has_sig": false, "md5_digest": "05d5fba0675e0ba3e3bf367e254d5369", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5525, "upload_time": "2016-06-07T16:54:09", "url": "https://files.pythonhosted.org/packages/24/f6/26474b0b52335864cf43a969987b7ab27ee14331def6ec82cbb8263bc937/python-utils-2.0.0.tar.gz" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "dcf70d4b5b14b9aa8475e01c64adb81b", "sha256": "670f9b992ebfc005329fd9740408f2a704e595d64c8f8da83f7977618dba4acc" }, "downloads": -1, "filename": "python_utils-2.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "dcf70d4b5b14b9aa8475e01c64adb81b", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9366, "upload_time": "2016-12-10T18:12:59", "url": "https://files.pythonhosted.org/packages/a6/d9/b0b61984fa66ec63d9510d10e1bdf20a2314110f37e5e0fd036bc97befdd/python_utils-2.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "107beb80b432db995614cb4de5ad7fdd", "sha256": "985f44edf24918d87531c339f8b126ce2d303cbbc9a4c7fc4dc81ac0726079ff" }, "downloads": -1, "filename": "python-utils-2.0.1.tar.gz", "has_sig": false, "md5_digest": "107beb80b432db995614cb4de5ad7fdd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7231, "upload_time": "2016-12-10T18:11:48", "url": "https://files.pythonhosted.org/packages/46/e8/60bc82e7bb5d9e326c4691ed73e02a2a0e3ce6bb7adefd8cb2d9d8456b3a/python-utils-2.0.1.tar.gz" } ], "2.1.0": [ { "comment_text": "", "digests": { "md5": "9dabec0d4f224ba90fd4c53064e7c016", "sha256": "5ffd2d41a77d73d5e48f6fbe08edc26594af80398f9939d61a005b1b841f0571" }, "downloads": -1, "filename": "python_utils-2.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9dabec0d4f224ba90fd4c53064e7c016", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9375, "upload_time": "2017-04-03T12:51:41", "url": "https://files.pythonhosted.org/packages/39/7b/1cb2391517d9cb30001140c6662e00d7443752e5a1713e317fb93267da3f/python_utils-2.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9891e757c629fc43ccd2c896852f8266", "sha256": "1709f793d4445ddb13d26a4ec74662676fd3d534ebce97c5519e5455b0f19ad5" }, "downloads": -1, "filename": "python-utils-2.1.0.tar.gz", "has_sig": false, "md5_digest": "9891e757c629fc43ccd2c896852f8266", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7240, "upload_time": "2017-04-03T12:51:38", "url": "https://files.pythonhosted.org/packages/70/7e/a2fcd97ec348e63be034027d4475986063c6d869f7e9f1b7802a8b17304e/python-utils-2.1.0.tar.gz" } ], "2.2.0": [ { "comment_text": "", "digests": { "md5": "3184b5eb3c6f65df9313bf6d778a733d", "sha256": "67b7b576bdabf4d565d4636b85be295ac87b4c51e65bc1bdadf69e37f4da0414" }, "downloads": -1, "filename": "python_utils-2.2.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "3184b5eb3c6f65df9313bf6d778a733d", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 9844, "upload_time": "2017-07-23T20:50:47", "url": "https://files.pythonhosted.org/packages/df/59/a6b4a744b3ae812c68cf89989a8510d357e9ec227b94516882c6786e9af5/python_utils-2.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1a6d9e39ad699bab2e7ee66d583bd68e", "sha256": "d9b8ab1f2a7c8f26ed16a47505f589a5d51c0d1e55869ab40c20e1c4b42af2c0" }, "downloads": -1, "filename": "python-utils-2.2.0.tar.gz", "has_sig": true, "md5_digest": "1a6d9e39ad699bab2e7ee66d583bd68e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7502, "upload_time": "2017-07-23T20:50:44", "url": "https://files.pythonhosted.org/packages/19/f2/2c4c8c2a92325d0c70ef21647583179058ae64d07429e30ab2476624e40b/python-utils-2.2.0.tar.gz" } ], "2.3.0": [ { "comment_text": "", "digests": { "md5": "b292aa6161ff6eff4593fe8108ed7b23", "sha256": "e25f840564554eaded56eaa395bca507b0b9e9f0ae5ecb13a8cb785305c56d25" }, "downloads": -1, "filename": "python_utils-2.3.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "b292aa6161ff6eff4593fe8108ed7b23", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12756, "upload_time": "2018-02-12T00:22:34", "url": "https://files.pythonhosted.org/packages/eb/a0/19119d8b7c05be49baf6c593f11c432d571b70d805f2fe94c0585e55e4c8/python_utils-2.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b2cfddd1c4f882f4870e431f4cdd7e6", "sha256": "34aaf26b39b0b86628008f2ae0ac001b30e7986a8d303b61e1357dfcdad4f6d3" }, "downloads": -1, "filename": "python-utils-2.3.0.tar.gz", "has_sig": true, "md5_digest": "1b2cfddd1c4f882f4870e431f4cdd7e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19384, "upload_time": "2018-02-12T00:22:32", "url": "https://files.pythonhosted.org/packages/30/95/d01fbd09ced38a16b7357a1d6cefe1327b9273885bffd6371cbec3e23af7/python-utils-2.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b292aa6161ff6eff4593fe8108ed7b23", "sha256": "e25f840564554eaded56eaa395bca507b0b9e9f0ae5ecb13a8cb785305c56d25" }, "downloads": -1, "filename": "python_utils-2.3.0-py2.py3-none-any.whl", "has_sig": true, "md5_digest": "b292aa6161ff6eff4593fe8108ed7b23", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12756, "upload_time": "2018-02-12T00:22:34", "url": "https://files.pythonhosted.org/packages/eb/a0/19119d8b7c05be49baf6c593f11c432d571b70d805f2fe94c0585e55e4c8/python_utils-2.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1b2cfddd1c4f882f4870e431f4cdd7e6", "sha256": "34aaf26b39b0b86628008f2ae0ac001b30e7986a8d303b61e1357dfcdad4f6d3" }, "downloads": -1, "filename": "python-utils-2.3.0.tar.gz", "has_sig": true, "md5_digest": "1b2cfddd1c4f882f4870e431f4cdd7e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19384, "upload_time": "2018-02-12T00:22:32", "url": "https://files.pythonhosted.org/packages/30/95/d01fbd09ced38a16b7357a1d6cefe1327b9273885bffd6371cbec3e23af7/python-utils-2.3.0.tar.gz" } ] }