{ "info": { "author": "Eric Lapouyade", "author_email": "elapouya@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "===============\nGetting started\n===============\n\n| python-textops3 provides many text operations at string level, list level or whole text level.\n| These operations can be chained with a 'dotted' or 'piped' notation.\n| Chained operations are stored into a single lazy object, they will be executed only when an input text will be provided.\n\nInstall\n-------\n\nTo install::\n\n pip install python-textops3\n\nOverview\n--------\n\nThe usual way to use textops is something like below. IMPORTANT : Note that textops library redefines\nthe python **bitwise OR** operator '|' in order to use it as a 'pipe' like in a Unix shell::\n\n from textops import *\n\n result = \"an input text\" | my().chained().operations()\n\n or\n\n for result_item in \"an input text\" | my().chained().operations():\n do_something(result_item)\n\n or\n\n myops = my().chained().operations()\n # and later in the code, use them :\n result = myops(\"an input text\")\n or\n result = \"an input text\" | myops\n\nAn \"input text\" can be :\n\n * a simple string,\n * a multi-line string (one string having newlines),\n * a list of strings,\n * a strings generator,\n * a list of lists (useful when you cut lines into columns),\n * a list of dicts (useful when you parse a line).\n\nSo one can do::\n\n >>> 'line1line2line3' | grep('2').tolist()\n ['line1line2line3']\n >>> 'line1\\nline2\\nline3' | grep('2').tolist()\n ['line2']\n >>> ['line1','line2','line3'] | grep('2').tolist()\n ['line2']\n >>> [['line','1'],['line','2'],['line','3']] | grep('2').tolist()\n [['line', '2']]\n >>> [{'line':1},{'line':'2'},{'line':3}] | grep('2').tolist()\n [{'line': '2'}]\n\nExamples\n--------\n\nPiped then dotted notation (recommended)::\n\n >>> print('this is an error\\nthis is a warning' | grepi('error').first().upper())\n THIS IS AN ERROR\n\nYou could use the pipe everywhere (internally a little less optimized, but looks like shell)::\n\n >>> print('this is an error\\nthis is a warning' | grepi('error') | first() | strop.upper())\n THIS IS AN ERROR\n\nTo execute an operation directly from strings, lists or dicts *with the dotted notation*,\nyou must use textops Extended types : ``StrExt``, ``ListExt`` or ``DictExt``::\n\n >>> s = StrExt('this is an error\\nthis is a warning')\n >>> print(s.grepi('error').first().upper())\n THIS IS AN ERROR\n\nDocumentation\n-------------\n\nPlease, `read documentation here : `_\n\nNews\n====\n\n3.0.8 (2019-10-08)\n------------------\n* add encoding & encoding_errors arguments to cat()\n\n3.0.7 (2019-10-01)\n------------------\n* add separators argument to parse_smart()\n\n3.0.6 (2019-09-25)\n------------------\n* add key_filter argument to parse_smart()\n\n3.0.5 (2019-06-14)\n------------------\n* add decode_bytes()\n\n3.0.3 (2018-11-07)\n------------------\n\n* Migrate from python 2 to python 3\n\n\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/elapouya/python-textops3", "keywords": "textops", "license": "LGPL 2.1", "maintainer": "", "maintainer_email": "", "name": "python-textops3", "package_url": "https://pypi.org/project/python-textops3/", "platform": "", "project_url": "https://pypi.org/project/python-textops3/", "project_urls": { "Homepage": "https://github.com/elapouya/python-textops3" }, "release_url": "https://pypi.org/project/python-textops3/3.0.8/", "requires_dist": [ "addicted3", "python-dateutil", "python-slugify", "chardet", "Sphinx ; extra == 'docs'", "sphinxcontrib-napoleon ; extra == 'docs'" ], "requires_python": "", "summary": "Python text operations module", "version": "3.0.8" }, "last_serial": 5945211, "releases": { "3.0.1": [ { "comment_text": "", "digests": { "md5": "f9a545942a79f59b81c32d2ac59bafe6", "sha256": "2d6bd7142aa256cf4184f0ad92300313fab4d68fb7c8582c0463376a12f35ede" }, "downloads": -1, "filename": "python_textops3-3.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "f9a545942a79f59b81c32d2ac59bafe6", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 53215, "upload_time": "2018-11-07T12:44:12", "url": "https://files.pythonhosted.org/packages/82/1d/9779a0b2fab6d87ee25da2cc595e55031f62c8f65a771294f560da994d07/python_textops3-3.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c7c33ec676a86ae8c0d246b1a86d6445", "sha256": "19e06dcfaa0fb3935336e4a3e36e6e25586d4b387fda24f2dbe0136359347852" }, "downloads": -1, "filename": "python-textops3-3.0.1.tar.gz", "has_sig": false, "md5_digest": "c7c33ec676a86ae8c0d246b1a86d6445", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76535, "upload_time": "2018-11-07T12:44:10", "url": "https://files.pythonhosted.org/packages/c3/3e/21296721bbafcb03d991d1b1b24c0bc228a7d9f175d3580f45eda1a5e6a7/python-textops3-3.0.1.tar.gz" } ], "3.0.3": [ { "comment_text": "", "digests": { "md5": "83cb1ad98e1b6bb687f0249b79f27d03", "sha256": "a1ac265a73fb80949b74960afc620c2733d57d20e6b330bf4c9c17b15f1fddb7" }, "downloads": -1, "filename": "python_textops3-3.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "83cb1ad98e1b6bb687f0249b79f27d03", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 60847, "upload_time": "2018-11-07T15:03:43", "url": "https://files.pythonhosted.org/packages/ed/cb/71d87da1fac2c8a07ca88d99d804fe5a8b7e4204cce42b7cc19d332b6cdd/python_textops3-3.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8277d7113f6c278213db5ce895ca738d", "sha256": "912a2f4254fcf8cd2e284e5e09697b2f0b66bf72d4323c1e09b4b4a14432998c" }, "downloads": -1, "filename": "python-textops3-3.0.3.tar.gz", "has_sig": false, "md5_digest": "8277d7113f6c278213db5ce895ca738d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76577, "upload_time": "2018-11-07T15:03:41", "url": "https://files.pythonhosted.org/packages/69/15/3872c8c77ccc502069f2322c83556c92ba58b6a1e7ca2f17dadbe036f179/python-textops3-3.0.3.tar.gz" } ], "3.0.4": [ { "comment_text": "", "digests": { "md5": "179dfb11f934c2f140a860673ea84999", "sha256": "a04b3101f0b579dfd694d5bc500aa56d310a850df05c01d39e5a7976c5f79c7e" }, "downloads": -1, "filename": "python_textops3-3.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "179dfb11f934c2f140a860673ea84999", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 61395, "upload_time": "2019-06-14T08:22:17", "url": "https://files.pythonhosted.org/packages/e2/27/b13e8db3832fb677c32a92d9939860f54bb09e4c517720cb4841a2452817/python_textops3-3.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6a6f7014a15ed70ef280d176f5924898", "sha256": "cb0cbc48884a9f8faadf358d253adaf9b40d04dafdebaae8d39dff06754a8fa5" }, "downloads": -1, "filename": "python-textops3-3.0.4.tar.gz", "has_sig": false, "md5_digest": "6a6f7014a15ed70ef280d176f5924898", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77227, "upload_time": "2019-06-14T08:22:14", "url": "https://files.pythonhosted.org/packages/55/6d/bf26472d306249329ffc95cc6ee736b05dfa5088c96d5b9e441ad0df7e7d/python-textops3-3.0.4.tar.gz" } ], "3.0.5": [ { "comment_text": "", "digests": { "md5": "7b7b65fdcc2fd3fb2e0cb63ced603b01", "sha256": "e2bfc97fac3e8f089e6a619e31be21a839306454e3e226a1d77e4bc16c7c1d95" }, "downloads": -1, "filename": "python_textops3-3.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "7b7b65fdcc2fd3fb2e0cb63ced603b01", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 61393, "upload_time": "2019-06-14T08:25:04", "url": "https://files.pythonhosted.org/packages/8a/a4/4eb2e9a2b2c468126dec7ee55132be97f38bbf2c7437082bd33c03c86a80/python_textops3-3.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b25f077dd479f8e31286c3c593cebf7f", "sha256": "5e2c574d3f301b741cae505d7c085572d75a014d89d92ba388eeecb4ef9a14f6" }, "downloads": -1, "filename": "python-textops3-3.0.5.tar.gz", "has_sig": false, "md5_digest": "b25f077dd479f8e31286c3c593cebf7f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 77234, "upload_time": "2019-06-14T08:25:01", "url": "https://files.pythonhosted.org/packages/47/d9/79482544f59284b03d9b4709d5787692a42264f409ae8762a16f2cc389c3/python-textops3-3.0.5.tar.gz" } ], "3.0.6": [ { "comment_text": "", "digests": { "md5": "08dea1d912dcc23c5e10d83abd1cf980", "sha256": "8bee2b73d558cc5dcefda314381b065e68d28bb316070b49fc26f6e99f1c0a46" }, "downloads": -1, "filename": "python_textops3-3.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "08dea1d912dcc23c5e10d83abd1cf980", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 61650, "upload_time": "2019-09-25T11:34:07", "url": "https://files.pythonhosted.org/packages/ee/06/9da5a1aeb808111307f24d623ac396a179c9d95b4b22d66fd582c8991bce/python_textops3-3.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ac6408aac288615e2bfa936b63aaa4d6", "sha256": "b6a2050e8c8c36db9f551f90190019e25cdbd8106fbd10cca869d8c60af02f27" }, "downloads": -1, "filename": "python-textops3-3.0.6.tar.gz", "has_sig": false, "md5_digest": "ac6408aac288615e2bfa936b63aaa4d6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76498, "upload_time": "2019-09-25T11:34:09", "url": "https://files.pythonhosted.org/packages/94/83/d38e2dc60de86c1978719ab291a98a2185ff233771c54a493d5754427233/python-textops3-3.0.6.tar.gz" } ], "3.0.7": [ { "comment_text": "", "digests": { "md5": "6fe6501903055409294a76fb0cf46d5c", "sha256": "5a0ba8e4e1ffa9072574f461b6b40290374bb995e5c8dd373921c28b8d82ada8" }, "downloads": -1, "filename": "python_textops3-3.0.7-py3-none-any.whl", "has_sig": false, "md5_digest": "6fe6501903055409294a76fb0cf46d5c", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 61680, "upload_time": "2019-10-01T14:00:03", "url": "https://files.pythonhosted.org/packages/81/d8/72d46f2fa0f301a58fe8a9204e7ccd5421779bba6ac6d6fb41742dbcd213/python_textops3-3.0.7-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cff489f566bf84c593416b4415729970", "sha256": "087d393095023233164bc0af41107092c29a95e655e8991c24030d6b1676ea0b" }, "downloads": -1, "filename": "python-textops3-3.0.7.tar.gz", "has_sig": false, "md5_digest": "cff489f566bf84c593416b4415729970", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76474, "upload_time": "2019-10-01T14:00:09", "url": "https://files.pythonhosted.org/packages/f1/59/0961f7eafb7f4906587deca082fdaf97668fd965d69c99ce7145803e2ddf/python-textops3-3.0.7.tar.gz" } ], "3.0.8": [ { "comment_text": "", "digests": { "md5": "875097e40d9804d012629c31b10dd8ff", "sha256": "90f8dd0e19a5ea8247dac5a7088f6ac391216286c64b88638ad061cf870d3e1c" }, "downloads": -1, "filename": "python_textops3-3.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "875097e40d9804d012629c31b10dd8ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 61806, "upload_time": "2019-10-08T14:52:44", "url": "https://files.pythonhosted.org/packages/59/60/4096886b1936a4ab1d7ef6bff6d8c2b29fa47f92fab61f09cefeb8326e36/python_textops3-3.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af53da6a4f42b3b2d64f3c12713cf3cb", "sha256": "d4f84d73a30de92fde96757a7b05433839a74e1134ec19fb493890ca0ba125ed" }, "downloads": -1, "filename": "python-textops3-3.0.8.tar.gz", "has_sig": false, "md5_digest": "af53da6a4f42b3b2d64f3c12713cf3cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76602, "upload_time": "2019-10-08T14:52:52", "url": "https://files.pythonhosted.org/packages/96/a4/bc5b111e2c5f759fbb8dc1a2abde1fb02a0e0bc2b5fcf57c52ad868b0765/python-textops3-3.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "875097e40d9804d012629c31b10dd8ff", "sha256": "90f8dd0e19a5ea8247dac5a7088f6ac391216286c64b88638ad061cf870d3e1c" }, "downloads": -1, "filename": "python_textops3-3.0.8-py3-none-any.whl", "has_sig": false, "md5_digest": "875097e40d9804d012629c31b10dd8ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 61806, "upload_time": "2019-10-08T14:52:44", "url": "https://files.pythonhosted.org/packages/59/60/4096886b1936a4ab1d7ef6bff6d8c2b29fa47f92fab61f09cefeb8326e36/python_textops3-3.0.8-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "af53da6a4f42b3b2d64f3c12713cf3cb", "sha256": "d4f84d73a30de92fde96757a7b05433839a74e1134ec19fb493890ca0ba125ed" }, "downloads": -1, "filename": "python-textops3-3.0.8.tar.gz", "has_sig": false, "md5_digest": "af53da6a4f42b3b2d64f3c12713cf3cb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 76602, "upload_time": "2019-10-08T14:52:52", "url": "https://files.pythonhosted.org/packages/96/a4/bc5b111e2c5f759fbb8dc1a2abde1fb02a0e0bc2b5fcf57c52ad868b0765/python-textops3-3.0.8.tar.gz" } ] }