{ "info": { "author": "Antonio Ognio", "author_email": "antonio@ognio.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.4", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.0", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Topic :: Software Development :: Libraries" ], "description": "Extract Values\n==============\n\nA Python module for extracting values out of a string using a simple pattern instead of a regular expression by defining groups of named characters using a pair of opening and closing delimiters.\n\nExamples:\n\n```python\n from extract_values import extract_values\n\n >>> extract_values('/2012/08/12/test.html', '/{year}/{month}/{day}/{title}.html')\n { 'year': '2012', 'month': '08', 'day': '12', 'title': 'test' }\n\n >>> extract_values('John Doe (http://example.com)', '{name} <{email}> ({url})')\n {'name': 'John Doe', 'email': 'john@example.com', 'url': 'http://example.com' }\n\n >>> extract_values('from 4th October to 10th October', 'from `from` to `to`', strip_values=True, whitespace=1, delimiters=['`', '`'])\n {'from': '4th October', 'to': '10th October' }\n\n >>> extract_values('Convert 1500 Grams to Kilograms', 'convert {quantity} {from_unit} to {to_unit}', lowercase=True)\n {'quantity': '1500', 'from_unit': 'grams', 'to_unit': 'kilograms' }]\n\n >>> extract_values('The time is 4:35pm here at Lima, Peru', 'The time is :time here at :city', delimiters=[':', ''])\n {'time': '4:35pm', 'city': 'Lima, Peru'}\n```\n\nOptional parameters:\n\n* **lowercase** - When True is passed the string is lowercased first \n* **whitespace** - Minimal number of extra whitespace to remove \n* **strip_values** - When True calls strip() for each value removing whitespace \n* **delimiters** - A sequence with only the opening and closing delimiters\n\nIn order to install this package from [PyPi](http://pypi.python.org) you can run any of these commands:\n\n easy_install extract-values\n\nor\n\n pip install extract-values\n\nThis library can also be installed directly from Github with the following command:\n\n pip install git+ssh://git@github.com/gnrfan/extract-values.git\n\nThis little project was inspired by a similar [Node.js](http://nodejs.org/) module created by sri-lankan developer [Lakshan Perera](http://laktek.com/) available [here](https://github.com/laktek/extract-values).\n\n(c) 2012 - Antonio Ognio - Distributed under the BSD license - Made in Peru.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/gnrfan/extract-values/zipball/master", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gnrfan/extract-values", "keywords": "extract, text, regexp", "license": "BSD License", "maintainer": "Antonio Ognio", "maintainer_email": "antonio@ognio.com", "name": "extract-values", "package_url": "https://pypi.org/project/extract-values/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/extract-values/", "project_urls": { "Download": "https://github.com/gnrfan/extract-values/zipball/master", "Homepage": "https://github.com/gnrfan/extract-values" }, "release_url": "https://pypi.org/project/extract-values/1.0/", "requires_dist": null, "requires_python": null, "summary": "A Python module for extracting values out of a string using a simple pattern instead of a regular expression.", "version": "1.0" }, "last_serial": 791824, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "42b16180e9e6a311916158b59146dd9e", "sha256": "9cddd31a0f20c42a6baa37aa6ebb1a875dcea2a744893eca572665db48b1ccec" }, "downloads": -1, "filename": "extract-values-1.0.tar.gz", "has_sig": false, "md5_digest": "42b16180e9e6a311916158b59146dd9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3629, "upload_time": "2012-10-10T18:52:17", "url": "https://files.pythonhosted.org/packages/77/73/0971bbe115f4a22b854d3af7ad941ae044d13b8529d812c7dc0e887c85f1/extract-values-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "42b16180e9e6a311916158b59146dd9e", "sha256": "9cddd31a0f20c42a6baa37aa6ebb1a875dcea2a744893eca572665db48b1ccec" }, "downloads": -1, "filename": "extract-values-1.0.tar.gz", "has_sig": false, "md5_digest": "42b16180e9e6a311916158b59146dd9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3629, "upload_time": "2012-10-10T18:52:17", "url": "https://files.pythonhosted.org/packages/77/73/0971bbe115f4a22b854d3af7ad941ae044d13b8529d812c7dc0e887c85f1/extract-values-1.0.tar.gz" } ] }