{ "info": { "author": "Nikolay Panov", "author_email": "github@npanov.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "url-normalize\n=============\n\n[![Build Status](https://travis-ci.org/niksite/url-normalize.svg?branch=master)](https://travis-ci.org/niksite/url-normalize)\n[![Coverage Status](https://coveralls.io/repos/github/niksite/url-normalize/badge.svg?branch=master)](https://coveralls.io/github/niksite/url-normalize?branch=master)\n\nURI Normalization function:\n\n* Take care of IDN domains.\n* Always provide the URI scheme in lowercase characters.\n* Always provide the host, if any, in lowercase characters.\n* Only perform percent-encoding where it is essential.\n* Always use uppercase A-through-F characters when percent-encoding.\n* Prevent dot-segments appearing in non-relative URI paths.\n* For schemes that define a default authority, use an empty authority if the default is desired.\n* For schemes that define an empty path to be equivalent to a path of \"/\", use \"/\".\n* For schemes that define a port, use an empty port if the default is desired\n* All portions of the URI must be utf-8 encoded NFC from Unicode strings\n\nInspired by Sam Ruby's urlnorm.py: http://intertwingly.net/blog/2004/08/04/Urlnorm\n\nExample:\n\n```sh\n$ pip install url-normalize\nCollecting url-normalize\n...\nSuccessfully installed future-0.16.0 url-normalize-1.3.3\n$ python\nPython 3.6.1 (default, Jul 8 2017, 05:00:20)\n[GCC 4.9.2] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n> from url_normalize import url_normalize\n> print(url_normalize('www.foo.com:80/foo'))\n> https://www.foo.com/foo\n```\n\nHistory:\n\n* 1.4.1: Added an optional param default_scheme to the url_normalize\n* 1.4.0: A bit of code refactoring and cleanup\n* 1.3.3: Support empty string and double slash urls (//domain.tld)\n* 1.3.2: Same code support both Python 3 and Python 2.\n* 1.3.1: Python 3 compatibility\n* 1.2.1: PEP8, setup.py\n* 1.1.2: support for shebang (#!) urls\n* 1.1.1: using 'http' schema by default when appropriate\n* 1.1.0: added handling of IDN domains\n* 1.0.0: code pep8\n* 0.1.0: forked from Sam Ruby's urlnorm.py\n\nLicense: \"Python\" (PSF) License\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/niksite/url-normalize", "keywords": "url,normalization,normalize", "license": "", "maintainer": "Nikolay Panov", "maintainer_email": "github@npanov.com", "name": "url-normalize", "package_url": "https://pypi.org/project/url-normalize/", "platform": "", "project_url": "https://pypi.org/project/url-normalize/", "project_urls": { "Homepage": "https://github.com/niksite/url-normalize", "Repository": "https://github.com/niksite/url-normalize" }, "release_url": "https://pypi.org/project/url-normalize/1.4.1/", "requires_dist": [ "six (>=1.11,<2.0)" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "summary": "URL normalization for Python", "version": "1.4.1" }, "last_serial": 4575948, "releases": { "1.2.1": [ { "comment_text": "", "digests": { "md5": "ff36e862fd15e8ee76d4187a81fbe64a", "sha256": "144e4503b7cfa9bed5f76575685a746e0af52a5238066e6efdb284ffd623681d" }, "downloads": -1, "filename": "url_normalize-1.2.1-py3-none-any.whl", "has_sig": false, "md5_digest": "ff36e862fd15e8ee76d4187a81fbe64a", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7212, "upload_time": "2016-01-09T16:35:36", "url": "https://files.pythonhosted.org/packages/a1/0a/a3d17ffe2eb36be0ea1ae2843b2429441b5e239c0d5d51f065c76877a317/url_normalize-1.2.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08b896cba485cf1199b7018c4f98a6df", "sha256": "dbfcc7b5e346452c02e6cb4f540018ba5da246664e79afbf9f6ee088f8feb728" }, "downloads": -1, "filename": "url-normalize-1.2.1.tar.gz", "has_sig": false, "md5_digest": "08b896cba485cf1199b7018c4f98a6df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4744, "upload_time": "2016-01-09T16:35:29", "url": "https://files.pythonhosted.org/packages/1c/54/22a3db2c7eb6647f3ebf6f0b3c201f96b2234a357ea4dd985c7db81c31e4/url-normalize-1.2.1.tar.gz" } ], "1.3.1": [ { "comment_text": "", "digests": { "md5": "f9beb82bc31e403074a77453e557b9d5", "sha256": "ef6c035914e5ca8d459c6403d09191b4a1b84687ab2cade571f9f30035d60467" }, "downloads": -1, "filename": "url_normalize-1.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f9beb82bc31e403074a77453e557b9d5", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 7324, "upload_time": "2016-01-09T16:39:27", "url": "https://files.pythonhosted.org/packages/49/6e/62d24f5837528c929232424ccd015bab6820b3b8b173ec0f7bd80be70e0d/url_normalize-1.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e22fc4690c2829ca8518f4dad9278f7c", "sha256": "9740a8297482d0ab1032f1644e157a0f9ad289e0b07ab36bd3e6d83aaff65230" }, "downloads": -1, "filename": "url-normalize-1.3.1.tar.gz", "has_sig": false, "md5_digest": "e22fc4690c2829ca8518f4dad9278f7c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4777, "upload_time": "2016-01-09T16:39:21", "url": "https://files.pythonhosted.org/packages/a0/ac/8fe1031e9fe9a4fa27ff355d9e224c731197cdb8f7eee4930a73241bc35e/url-normalize-1.3.1.tar.gz" } ], "1.3.3": [ { "comment_text": "", "digests": { "md5": "81af506eb0d81a2f62c7e692c49471ee", "sha256": "f5b3c6eee116f668c274df1a041797791246aa3a30746ce796afe6a0d56bf2ae" }, "downloads": -1, "filename": "url_normalize-1.3.3-py3-none-any.whl", "has_sig": false, "md5_digest": "81af506eb0d81a2f62c7e692c49471ee", "packagetype": "bdist_wheel", "python_version": "3.6", "requires_python": null, "size": 7838, "upload_time": "2017-07-16T02:16:30", "url": "https://files.pythonhosted.org/packages/d6/26/5b35b193c522612c34192125af288037f8db6910d6ac644fad46532e79f4/url_normalize-1.3.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "1fad8526843b2e3746867c712272f6bf", "sha256": "26acd7cccff5ad592b462fecd4bb9fa11507b62b091aea7aa3fd4bc41e5a5df8" }, "downloads": -1, "filename": "url-normalize-1.3.3.tar.gz", "has_sig": false, "md5_digest": "1fad8526843b2e3746867c712272f6bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5028, "upload_time": "2017-07-16T02:16:28", "url": "https://files.pythonhosted.org/packages/4f/a2/0c64022ee4cb18d0ee7006c2030324d0a89d967aeb0d4288b858fdbac298/url-normalize-1.3.3.tar.gz" } ], "1.4.0": [ { "comment_text": "", "digests": { "md5": "b354844dbe39deff85bab71fb37e103a", "sha256": "61a28f7aa7ed7825764c57b64d977eba04a9da7ec5e3564dea6671acd61e4ac3" }, "downloads": -1, "filename": "url_normalize-1.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b354844dbe39deff85bab71fb37e103a", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 12420, "upload_time": "2018-11-25T19:34:39", "url": "https://files.pythonhosted.org/packages/82/26/389f2d3424f52fb3e858235f7a35d8ebcc9ebefab449078f9ab4e996c795/url_normalize-1.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "133c70a01b24ad3e81f23da788b7b81d", "sha256": "0ed30fb5fb5bdf16f9321b43fac13ab507e75a1caed2c0e21de8c27714ecdca3" }, "downloads": -1, "filename": "url-normalize-1.4.0.tar.gz", "has_sig": false, "md5_digest": "133c70a01b24ad3e81f23da788b7b81d", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 4951, "upload_time": "2018-11-25T19:34:36", "url": "https://files.pythonhosted.org/packages/15/a0/f45fea8189984f3e3aec83473e8f3516b729efb68b9e546c206f929bca1e/url-normalize-1.4.0.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "e61d139aa55a3a850579df348803fdea", "sha256": "51e0f14050c79e732d175c33d12167f5e642cc23e0cb23275236af843faf884f" }, "downloads": -1, "filename": "url_normalize-1.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e61d139aa55a3a850579df348803fdea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 12252, "upload_time": "2018-12-08T19:49:35", "url": "https://files.pythonhosted.org/packages/e2/12/47dc7437c13ddc648b796deec34cca14841dc193131f7be215baea3e9b2f/url_normalize-1.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "097a1543f7791b822c20f933614a7ba9", "sha256": "3468d64cb22a9092a2c086e46c781f741dc9a1689b24e9b48ab5e8244ffa6c02" }, "downloads": -1, "filename": "url-normalize-1.4.1.tar.gz", "has_sig": false, "md5_digest": "097a1543f7791b822c20f933614a7ba9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 5005, "upload_time": "2018-12-08T19:49:33", "url": "https://files.pythonhosted.org/packages/34/e7/868caed68203c6930ca6ddfe382319cefcee52774da717e544b9e9530a1c/url-normalize-1.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e61d139aa55a3a850579df348803fdea", "sha256": "51e0f14050c79e732d175c33d12167f5e642cc23e0cb23275236af843faf884f" }, "downloads": -1, "filename": "url_normalize-1.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e61d139aa55a3a850579df348803fdea", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 12252, "upload_time": "2018-12-08T19:49:35", "url": "https://files.pythonhosted.org/packages/e2/12/47dc7437c13ddc648b796deec34cca14841dc193131f7be215baea3e9b2f/url_normalize-1.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "097a1543f7791b822c20f933614a7ba9", "sha256": "3468d64cb22a9092a2c086e46c781f741dc9a1689b24e9b48ab5e8244ffa6c02" }, "downloads": -1, "filename": "url-normalize-1.4.1.tar.gz", "has_sig": false, "md5_digest": "097a1543f7791b822c20f933614a7ba9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*", "size": 5005, "upload_time": "2018-12-08T19:49:33", "url": "https://files.pythonhosted.org/packages/34/e7/868caed68203c6930ca6ddfe382319cefcee52774da717e544b9e9530a1c/url-normalize-1.4.1.tar.gz" } ] }