{ "info": { "author": "Erin O'Connell", "author_email": "erinocon5@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "TPFD - Text Parsing Function Dispatcher\n=======================================\n.. image:: https://travis-ci.org/erinxocon/tpfd.svg?branch=master\n :target: https://travis-ci.org/erinxocon/tpfd\n.. image:: https://img.shields.io/pypi/v/tpfd.svg?maxAge=2592000\n :target: https://pypi.python.org/pypi/tpfd/\n.. image:: https://img.shields.io/pypi/l/tpfd.svg?maxAge=2592000\n :target: https://opensource.org/licenses/MIT\n\n**TPFD** is an easy way to parse strings and execute functions depending on their contents.\n\nInspired by `Flask `_ and using `Parse `_ under the hood, this allows you to decorate functions with grammar rules and if a pattern that matches one of your grammar rules is found, the function will be run with a set of keyword arguments you've specified passed to it! Great for parsing logs and executing macros on what it finds!\n\nExamples\n--------\n.. code-block:: python\n\n Aniamls.txt\n Turtles are cool\n Sloths are cool\n Mosquitos are dumb\n\n >>> p = tpfd.Parser()\n\n >>> @p.on_parse('{Animal} are cool')\n def main(animal):\n print('I like {0}.'.format(animal))\n\n >>> p.parse_file('animals.txt')\n 'I like turtles.'\n 'I like sloths.'\n\n >>> p.parse(['Turtles are cool', 'Sloths are cool', 'Mosquitos are dumb'])\n 'I like turtles.'\n 'I like sloths.'\n\n >>> p.parse('Sloths are cool')\n 'I like sloths.'\n\n >>> p.parse('Mosquitos are dumb')\n None\n\n >>> @p.on_find('>{}<')\n def find_example(words):\n print (words)\n\n >>> p.find('

the bold text

')\n 'the bold text'\n\nTo Install\n----------\n\n::\n\n $ pip install tpfd\n\nNotes\n-----\nAny format spec supported by parse is supported by this library since it's all parse under the hood.\nExample: ``{[field name]:[format spec]}``\n\nCurrent Features\n----------------\n\n* Support for parsing text files\n* Support for accepting generators that output text or ints\n* Support for parsing unicode strings\n* Supports parsing strings, ints and interator/generator's automagically with new ``parse`` method.\n\n\nTODO\n----\n* Expose custom types functionality that `Parse `_ already offers", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/erinxocon/tpfd", "keywords": "text, parsing, function, dispatcher, parse, parser", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tpfd", "package_url": "https://pypi.org/project/tpfd/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/tpfd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/erinxocon/tpfd" }, "release_url": "https://pypi.org/project/tpfd/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Text Parsing Function Dispatcher", "version": "0.2.4" }, "last_serial": 2363340, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "0fe8cd57325ac303d1240196754086ba", "sha256": "5343bc70cb9aa21f7c2fbf2d2feda63cd4187abf4b418e708121ac4ce9417e51" }, "downloads": -1, "filename": "tpfd-0.0.1.tar.gz", "has_sig": false, "md5_digest": "0fe8cd57325ac303d1240196754086ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3161, "upload_time": "2016-09-15T03:18:57", "url": "https://files.pythonhosted.org/packages/10/d6/d75ac6e5b553520d2ea17a894eb5c03dce7b171e7e8d5d89a230c2abb22f/tpfd-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "4ab8b36e7aa0520cb932757b92300b2e", "sha256": "8c113497d49b5789dfe12a1a4a334f749718cdebd5a4d44abc497df3ad52f725" }, "downloads": -1, "filename": "tpfd-0.0.2.tar.gz", "has_sig": false, "md5_digest": "4ab8b36e7aa0520cb932757b92300b2e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3304, "upload_time": "2016-09-16T02:57:45", "url": "https://files.pythonhosted.org/packages/2b/98/328b767a823779e2d9cc29173b4c620d1dbb38e2b08aa5f62ef2c3a0b218/tpfd-0.0.2.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "87d3b0a6fff6a9d2971a725d009d00e6", "sha256": "0705275458a9347688de861506454c2394a6b10af328fb0f95ca810e6d196d09" }, "downloads": -1, "filename": "tpfd-0.0.4.tar.gz", "has_sig": false, "md5_digest": "87d3b0a6fff6a9d2971a725d009d00e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3371, "upload_time": "2016-09-17T03:06:26", "url": "https://files.pythonhosted.org/packages/18/60/effcd0b7abc2fbbe0d3419ab01f27f2f34de5c91f0605a5d5efa74df9e58/tpfd-0.0.4.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1be1c646ea4382f932a066d60a25b940", "sha256": "e4419f028382083a476008c2937cbee9bf67731a4be64f455f7e7206dd2106a8" }, "downloads": -1, "filename": "tpfd-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1be1c646ea4382f932a066d60a25b940", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3486, "upload_time": "2016-09-18T02:24:41", "url": "https://files.pythonhosted.org/packages/7e/7c/6a8e7afff4a58da211c72c6816b5aa7a3b445856d6c4b8d3e1f1b67385a0/tpfd-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f294df7542290a826b680548b9067ed1", "sha256": "bde51ad33b8c594426d4a2f5a2c4ca118014479d54eee9a72a097412d38492ac" }, "downloads": -1, "filename": "tpfd-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f294df7542290a826b680548b9067ed1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3769, "upload_time": "2016-09-19T02:21:46", "url": "https://files.pythonhosted.org/packages/98/da/1c539978ca70841b1ad86f523c0e9df67a9471fab77b578119b4dcb97bb3/tpfd-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "983d482509c1b7224ae7ea3e6a4e35f4", "sha256": "6d1fe862d5687432ee55a97990c7cf6b80ab5127c30f3f9ca7eb2e61e63362ab" }, "downloads": -1, "filename": "tpfd-0.2.0.tar.gz", "has_sig": false, "md5_digest": "983d482509c1b7224ae7ea3e6a4e35f4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3934, "upload_time": "2016-09-23T01:52:30", "url": "https://files.pythonhosted.org/packages/67/6e/46d0eeed26edb74c36fee545e76f8a0f05d4baad1dfc3be8843b1eb1f457/tpfd-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "130e29c2e3cd30f754d34b641992c933", "sha256": "7412e1daf070d69eb44840232291ee2c6b5f45a99d8ba3e86ba74e1d16a8ca4e" }, "downloads": -1, "filename": "tpfd-0.2.1.tar.gz", "has_sig": false, "md5_digest": "130e29c2e3cd30f754d34b641992c933", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3993, "upload_time": "2016-09-23T03:20:44", "url": "https://files.pythonhosted.org/packages/91/8b/cdccafd8d178b7e86e8ef78ff2a0e7fdcdd53f77afd20e326c7e56b0d0c0/tpfd-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "d81a369de0f0ac0d0f522cd20718a532", "sha256": "202291324e2ace9a3cfc04f1fcdfa8adc07090a9532ce1108e90d296b19baa25" }, "downloads": -1, "filename": "tpfd-0.2.2.tar.gz", "has_sig": false, "md5_digest": "d81a369de0f0ac0d0f522cd20718a532", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3991, "upload_time": "2016-09-23T23:29:00", "url": "https://files.pythonhosted.org/packages/80/98/94f843d45a97a946bb436f5b9c70a4f18fdf2a1e0cac1a0b5e1d0cae7704/tpfd-0.2.2.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "a2f4262edef1dbce22c968e3117982d5", "sha256": "8c07ab95d36544c721b2d7a9b75e3c186085f731d577f9d31f86be8e4b69dbe5" }, "downloads": -1, "filename": "tpfd-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2f4262edef1dbce22c968e3117982d5", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 6601, "upload_time": "2016-09-24T23:31:38", "url": "https://files.pythonhosted.org/packages/0c/5c/84c2c169652abfb0ad3a4aaee05627d26c5bddbd2764a877cf2b3538d013/tpfd-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aafdb9777bd8293eb3148f8712a1fdd7", "sha256": "f90af668192bab96de1e45bbcdcbfbfe2f906fbff6b45751d0eaa9a083499444" }, "downloads": -1, "filename": "tpfd-0.2.4.tar.gz", "has_sig": false, "md5_digest": "aafdb9777bd8293eb3148f8712a1fdd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4268, "upload_time": "2016-09-24T22:53:27", "url": "https://files.pythonhosted.org/packages/36/a6/83d590ee2982f4b4fd7d50e96eaef57e0028877fe23992ca497d54ad8c1f/tpfd-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a2f4262edef1dbce22c968e3117982d5", "sha256": "8c07ab95d36544c721b2d7a9b75e3c186085f731d577f9d31f86be8e4b69dbe5" }, "downloads": -1, "filename": "tpfd-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a2f4262edef1dbce22c968e3117982d5", "packagetype": "bdist_wheel", "python_version": "any", "requires_python": null, "size": 6601, "upload_time": "2016-09-24T23:31:38", "url": "https://files.pythonhosted.org/packages/0c/5c/84c2c169652abfb0ad3a4aaee05627d26c5bddbd2764a877cf2b3538d013/tpfd-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aafdb9777bd8293eb3148f8712a1fdd7", "sha256": "f90af668192bab96de1e45bbcdcbfbfe2f906fbff6b45751d0eaa9a083499444" }, "downloads": -1, "filename": "tpfd-0.2.4.tar.gz", "has_sig": false, "md5_digest": "aafdb9777bd8293eb3148f8712a1fdd7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4268, "upload_time": "2016-09-24T22:53:27", "url": "https://files.pythonhosted.org/packages/36/a6/83d590ee2982f4b4fd7d50e96eaef57e0028877fe23992ca497d54ad8c1f/tpfd-0.2.4.tar.gz" } ] }