{ "info": { "author": "Microsoft Research Montreal", "author_email": "msrmtle@microsoft.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.7", "Topic :: Text Processing :: General", "Typing :: Typed" ], "description": "bistring\n========\n\n|PyPI version|\n\nThe bistring library provides non-destructive versions of common string processing operations like normalization, case folding, and find/replace.\nEach bistring remembers the original string, and how its substrings map to substrings of the modified version.\n\nFor example:\n\n.. code-block:: python\n\n >>> from bistring import bistr\n >>> s = bistr('\ud835\udd7f\ud835\udd8d\ud835\udd8a \ud835\udd96\ud835\udd9a\ud835\udd8e\ud835\udd88\ud835\udd90, \ud835\udd87\ud835\udd97\ud835\udd94\ud835\udd9c\ud835\udd93 \ud83e\udd8a \ud835\udd8f\ud835\udd9a\ud835\udd92\ud835\udd95\ud835\udd98 \ud835\udd94\ud835\udd9b\ud835\udd8a\ud835\udd97 \ud835\udd99\ud835\udd8d\ud835\udd8a \ud835\udd91\ud835\udd86\ud835\udd9f\ud835\udd9e \ud83d\udc36')\n >>> s = s.normalize('NFKD') # Unicode normalization\n >>> s = s.casefold() # Case-insensitivity\n >>> s = s.replace('\ud83e\udd8a', 'fox') # Replace emoji with text\n >>> s = s.replace('\ud83d\udc36', 'dog')\n >>> s = s.sub(r'[^\\w\\s]+', '') # Strip everything but letters and spaces\n >>> s = s[:19] # Extract a substring\n >>> s.modified # The modified substring, after changes\n 'the quick brown fox'\n >>> s.original # The original substring, before changes\n '\ud835\udd7f\ud835\udd8d\ud835\udd8a \ud835\udd96\ud835\udd9a\ud835\udd8e\ud835\udd88\ud835\udd90, \ud835\udd87\ud835\udd97\ud835\udd94\ud835\udd9c\ud835\udd93 \ud83e\udd8a'\n\nThis allows you to perform very aggressive text processing completely invisibly.\n\n.. |PyPI version| image:: https://badge.fury.io/py/bistring.svg\n :target: https://pypi.org/project/bistring/\n\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/microsoft/bistring", "keywords": "bistring string non-destructive", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "bistring", "package_url": "https://pypi.org/project/bistring/", "platform": "", "project_url": "https://pypi.org/project/bistring/", "project_urls": { "Homepage": "https://github.com/microsoft/bistring" }, "release_url": "https://pypi.org/project/bistring/0.4.0/", "requires_dist": [ "pyicu", "lxml ; extra == 'dev'", "mypy ; extra == 'dev'", "pytest ; extra == 'dev'", "regex ; extra == 'dev'" ], "requires_python": "", "summary": "Bidirectionally transformed strings", "version": "0.4.0" }, "last_serial": 5808999, "releases": { "0.0": [ { "comment_text": "", "digests": { "md5": "d70779b69e916db7528647a82a16342f", "sha256": "98390cf2a7fc93a376dc0e3d259f8f1fbf37c6d750b73f1e076a6706d438b231" }, "downloads": -1, "filename": "bistring-0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d70779b69e916db7528647a82a16342f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10561, "upload_time": "2019-07-08T21:07:05", "url": "https://files.pythonhosted.org/packages/a3/34/5118b3318e80beb78a7a0d786b059ec01cf44a0801503303cd36c5c4d403/bistring-0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3c3d75b1f465a7c78160db6ec70e093a", "sha256": "643259a989554e2f9f91d7e9708a056137dc5a97f0b5d4e624b35a3ae478cbdf" }, "downloads": -1, "filename": "bistring-0.0.tar.gz", "has_sig": false, "md5_digest": "3c3d75b1f465a7c78160db6ec70e093a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7907, "upload_time": "2019-07-08T21:07:07", "url": "https://files.pythonhosted.org/packages/34/93/49a83ab3894ba8119c3ecd323ef979942f4ad238ea93d35b15360d4e449b/bistring-0.0.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "5d5d684ea3ebca5b0ca5cd2fdb538696", "sha256": "5a1f6a643e5d5c7297a9874d5dd723bdeab32187db6c5d843d29687f82e88936" }, "downloads": -1, "filename": "bistring-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "5d5d684ea3ebca5b0ca5cd2fdb538696", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14132, "upload_time": "2019-07-12T17:44:33", "url": "https://files.pythonhosted.org/packages/e3/50/6afe18c5f766c3b85c32fefcf49431a2e3146e061800c4a926f76838e889/bistring-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cb150f425451b43f3a9018701d6b0ec3", "sha256": "dcc7aa6f5e71837697766798ef6a4ea41be7ea3fa64f8a3dd9795645c6bc9441" }, "downloads": -1, "filename": "bistring-0.1.tar.gz", "has_sig": false, "md5_digest": "cb150f425451b43f3a9018701d6b0ec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11088, "upload_time": "2019-07-12T17:44:34", "url": "https://files.pythonhosted.org/packages/bf/06/bcb057b1170c0dea8095d10592b8d0e82ddd1ced9bf18f421933b67bfa0e/bistring-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "26d171b7e8e8c18b2dac004765636aee", "sha256": "ea7b5db870ad00886e118d01d543eda04fbc24e4984d3603fd6557af6e6b7ca5" }, "downloads": -1, "filename": "bistring-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "26d171b7e8e8c18b2dac004765636aee", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 21806, "upload_time": "2019-07-23T13:32:26", "url": "https://files.pythonhosted.org/packages/9b/f5/4c5c82796d88d25315422ccfa8880ff0489c37273815438f0fd6e901ee81/bistring-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d72e22390e0c194b47726c64fd34a6ac", "sha256": "d0c35e0e2962990ea82657efe8093b72f249b1844d1d22cdf23d13b965e8e538" }, "downloads": -1, "filename": "bistring-0.2.tar.gz", "has_sig": false, "md5_digest": "d72e22390e0c194b47726c64fd34a6ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18394, "upload_time": "2019-07-23T13:32:28", "url": "https://files.pythonhosted.org/packages/a5/aa/cee8037e34e63cfc5e2191f434796bf7c5b1792e100522b9323699644aad/bistring-0.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "5b375b08bf837ca72f448973e7660eac", "sha256": "c4159c4d11b8db06ca7df3fad18828ea8699fa4929d5ac2b7595f93ddf06f0cc" }, "downloads": -1, "filename": "bistring-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "5b375b08bf837ca72f448973e7660eac", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22104, "upload_time": "2019-08-21T16:01:53", "url": "https://files.pythonhosted.org/packages/c7/4d/ea7f5b710a0efa4eb8cdb00cd7b4ebfbda0656bbef8552218477c493b3d9/bistring-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6bb46a64284fdea9cf221c4e57c15c36", "sha256": "8a284615072586957f04631a362b5b94a14389a0d9c1985ab57414c4ca25f630" }, "downloads": -1, "filename": "bistring-0.3.0.tar.gz", "has_sig": false, "md5_digest": "6bb46a64284fdea9cf221c4e57c15c36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24097, "upload_time": "2019-08-21T16:01:54", "url": "https://files.pythonhosted.org/packages/52/76/b0b5b78a8d92549606a141e22cade0220ba24f4d48de59a5e683e939dabb/bistring-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "7db0488ae6e620309bc094ff033a3bb1", "sha256": "c9d8a723d905b9f921992203872b07b2ac96845791f979ca145cee2a67b4f497" }, "downloads": -1, "filename": "bistring-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7db0488ae6e620309bc094ff033a3bb1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22224, "upload_time": "2019-09-10T13:36:42", "url": "https://files.pythonhosted.org/packages/81/7f/2a8f3a5d82a6c096440ef3d35835576ac73c77e519e86252ee01f5c344dd/bistring-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d72f9cee1333953e3a06ab3192f7474d", "sha256": "a7bc8d123958b343677942e7fbc41b67e5cdb432c91852cbcff851a3430e43d8" }, "downloads": -1, "filename": "bistring-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d72f9cee1333953e3a06ab3192f7474d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24433, "upload_time": "2019-09-10T13:36:44", "url": "https://files.pythonhosted.org/packages/b1/9a/87d8ccce6cbfb3434e9c4a58a14060716dc040177e4162d2c7cc2ada5ce2/bistring-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7db0488ae6e620309bc094ff033a3bb1", "sha256": "c9d8a723d905b9f921992203872b07b2ac96845791f979ca145cee2a67b4f497" }, "downloads": -1, "filename": "bistring-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7db0488ae6e620309bc094ff033a3bb1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 22224, "upload_time": "2019-09-10T13:36:42", "url": "https://files.pythonhosted.org/packages/81/7f/2a8f3a5d82a6c096440ef3d35835576ac73c77e519e86252ee01f5c344dd/bistring-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d72f9cee1333953e3a06ab3192f7474d", "sha256": "a7bc8d123958b343677942e7fbc41b67e5cdb432c91852cbcff851a3430e43d8" }, "downloads": -1, "filename": "bistring-0.4.0.tar.gz", "has_sig": false, "md5_digest": "d72f9cee1333953e3a06ab3192f7474d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24433, "upload_time": "2019-09-10T13:36:44", "url": "https://files.pythonhosted.org/packages/b1/9a/87d8ccce6cbfb3434e9c4a58a14060716dc040177e4162d2c7cc2ada5ce2/bistring-0.4.0.tar.gz" } ] }