{ "info": { "author": "KadMuffin", "author_email": "KadMuffin@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "SBLex\n=====\n\n.. image:: https://img.shields.io/pypi/v/SBLex.svg\n :target: https://pypi.python.org/pypi/SBLex\n :alt: Latest PyPI version\n\n.. image:: https://travis-ci.org/kadmuffin/SBLex.png\n :target: https://travis-ci.org/kadmuffin/SBLex\n :alt: Latest Travis CI build status\n\n.. image:: https://codecov.io/gh/kadmuffin/SBLex/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/kadmuffin/SBLex/branch/master\n :alt: Latest CodeCov status\n\nA simple library for tokenizing text with additional functionalities.\n\nOverview\n--------\n\nSBLex is a lexer that is capable to tokenize text with only a few lines of code, it includes as well other extra functions.\n\nFeatures\n^^^^^^^^\n* Dependent Tokens\n* Custom Errors\n* Custom functions when a token is found\n* Custom capture groups\n* Support of multiple regular expressions\n\nPlanned Features\n^^^^^^^^^^^^^^^^\n* Ignore patterns\n\nInstallation\n------------\n\nPyPi\n^^^^\n\nYou can easily install SBLex through `pip` like this:\n\n.. code:: bash\n\n pip install SBLex\n\nIf you get an environment error, you can also try using the `--user` option:\n\n.. code:: bash\n\n pip install SBLex --user\n\nUsage\n-----\n\nStarting using SBLex is as easy as importing the SBLex and declaring the lexer, here you have a working example lexing the world Hello World!:\n\n.. code:: python\n\n from SBLex import lex\n\n lexer = lex.lex()\n\n lexer.add(\"Hello World\", r'Hello World\\!')\n\n lexer.evaluate(\"Hello World!\")\n\n \"\"\"\n Returns:\n >>> [token(type: 'Hello World', value: 'Hello World!', line: 0)]\n \"\"\"\n\nHere is another example using a custom capturing_group.\n\n.. code:: python\n\n from SBLex import lex\n\n lexer = lex.lex()\n\n # Try to lex: The weather today is {weather}\n lexer.add(\n \"The weather today is\",\n r'The weather today is ([a-zA-Z]+)',\n capturing_group=1\n )\n\n lexer.evaluate(\"The weather today is rainy\")\n\n \"\"\"\n Returns:\n >>> [token(type: 'The weather today is', value: 'rainy', line: 0)]\n \"\"\"\n\nCompatibility\n-------------\n\nSBLex is compatible with Python2 & Python3.\n\nLicence\n-------\nSBLex is under the `MIT License `_.\n\nAuthors\n-------\n\n`SBLex` was written by `KadMuffin `_.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kadmuffin/SBLex", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "SBLex", "package_url": "https://pypi.org/project/SBLex/", "platform": "", "project_url": "https://pypi.org/project/SBLex/", "project_urls": { "Homepage": "https://github.com/kadmuffin/SBLex" }, "release_url": "https://pypi.org/project/SBLex/0.1.0/", "requires_dist": null, "requires_python": "", "summary": "A simple library for tokenizing text with additional functionalities.", "version": "0.1.0" }, "last_serial": 4748230, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d8a15fdaa1dbc56bafe9ce8d82341dca", "sha256": "1233f41017c7e6b9ee54ef5ee4f6d75303d8944aa8e1edc70a8fe8eeebef8cdb" }, "downloads": -1, "filename": "SBLex-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d8a15fdaa1dbc56bafe9ce8d82341dca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14066, "upload_time": "2019-01-28T05:06:29", "url": "https://files.pythonhosted.org/packages/3d/a6/5cbd00c870711feaafacdd666f536f615a639e7a96e15de448738bdf016c/SBLex-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abe4af26c128d0d45f6fee8f08b44f04", "sha256": "318ac28195b8bb83736c4df3271f122d0cb5b9059f7062a457b05c258c05e574" }, "downloads": -1, "filename": "SBLex-0.1.0.tar.gz", "has_sig": false, "md5_digest": "abe4af26c128d0d45f6fee8f08b44f04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13182, "upload_time": "2019-01-28T05:06:31", "url": "https://files.pythonhosted.org/packages/74/c8/ab2565751a9cc371364854e309ec38ad7d15573ee927869737fa14748c97/SBLex-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d8a15fdaa1dbc56bafe9ce8d82341dca", "sha256": "1233f41017c7e6b9ee54ef5ee4f6d75303d8944aa8e1edc70a8fe8eeebef8cdb" }, "downloads": -1, "filename": "SBLex-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d8a15fdaa1dbc56bafe9ce8d82341dca", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 14066, "upload_time": "2019-01-28T05:06:29", "url": "https://files.pythonhosted.org/packages/3d/a6/5cbd00c870711feaafacdd666f536f615a639e7a96e15de448738bdf016c/SBLex-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "abe4af26c128d0d45f6fee8f08b44f04", "sha256": "318ac28195b8bb83736c4df3271f122d0cb5b9059f7062a457b05c258c05e574" }, "downloads": -1, "filename": "SBLex-0.1.0.tar.gz", "has_sig": false, "md5_digest": "abe4af26c128d0d45f6fee8f08b44f04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13182, "upload_time": "2019-01-28T05:06:31", "url": "https://files.pythonhosted.org/packages/74/c8/ab2565751a9cc371364854e309ec38ad7d15573ee927869737fa14748c97/SBLex-0.1.0.tar.gz" } ] }