{ "info": { "author": "Common Search contributors", "author_email": "contact@commonsearch.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Other Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Libraries" ], "description": "urlparse4\n=========\n\n``urlparse4`` is a performance-focused replacement for Python's\n``urlparse`` module, using C++ code from Chromium's own URL parser.\n\nIt is not production-ready yet.\n\nMany credits go to\n`gurl-cython `__ for\ninspiration.\n\nDifferences with Python's ``urlparse``\n--------------------------------------\n\n``urlparse4`` should be a transparent, drop-in replacement in almost all\ncases. Still, there are a few differences to be aware of:\n\n- ``urlparse4`` is 2-7x faster for most operations (see benchmarks\n below)\n- ``urlparse4`` currently doesn't pass CPython's ``test_urlparse.py``\n suite due to edge cases that Chromium's parser manages differently\n (usually in accordance to the RFCs, which ``urlparse`` doesn't follow\n entirely).\n- ``urlparse4`` only supports Python 2.7 for now\n\nHow to test\n-----------\n\nYou must have Docker installed and running. You can run CPython's test\nsuite for ``urlparse`` like this:\n\n::\n\n make docker_build\n make docker_test\n\nBenchmarks\n----------\n\nWe are testing the following librairies on a sample of 100k URLs from\nBlink and DMOZ:\n\n- urlparse4 ;-)\n- `CPython's\n urlparse `__\n- `urlparse2 `__\n- `YURL `__\n- `uritools `__\n- `pygurl / gurl-cython `__\n- `cyuri `__\n\nEach of them is being tested on a few different types of operations\n(basic urlsplit, relative link resolution, hostname extraction)\n\nHere is how to launch the tests:\n\n::\n\n make docker_build\n make docker_benchmark\n\nCurrent results on a 2.2GHz Intel Core i7 MBP (in seconds):\n\n::\n\n Benchmark results on 104300 URLs x 10 times, in seconds:\n\n Name Sum Mean Median 90%\n ---------------- ------------- ----------------- ----------------- -----------------\n\n urlsplit:\n ---- ---- ---- ---- ----\n urlparse4 1.681858 1.61251965484e-06 1.99999999984e-06 2.00000000006e-06\n pygurl 2.031712 1.94795014382e-06 1.99999999984e-06 2.00000000028e-06\n uritools 2.638991 2.53019271333e-06 2.00000000028e-06 3.00000000042e-06\n yurl 3.910247 3.74903835091e-06 3.00000000131e-06 4.99999999981e-06\n urlparse2 3.756782 3.60190028763e-06 2.99999999953e-06 4.00000000056e-06\n urlparse 3.862006 3.70278619367e-06 3.00000000308e-06 4.99999999803e-06\n cyuri 9.912275 9.50361936721e-06 8.00000000112e-06 1.30000000027e-05\n\n urljoin_sibling:\n ---- ---- ---- ---- ----\n urlparse4 2.008453 1.92565004794e-06 2.00000000206e-06 2.00000000206e-06\n pygurl 2.193427 2.10299808245e-06 2.00000000206e-06 2.99999999953e-06\n uritools 10.575344 1.01393518696e-05 9.99999999607e-06 1.20000000052e-05\n yurl 13.213052 1.26683144775e-05 1.19999999981e-05 1.60000000022e-05\n urlparse2 14.239327 1.36522790029e-05 1.19999999981e-05 1.69999999997e-05\n urlparse 9.25991500001 8.87815436242e-06 8.00000000822e-06 1.10000000006e-05\n cyuri 5.742724 5.50596740172e-06 5.00000000159e-06 7.00000001075e-06\n\n hostname:\n ---- ---- ---- ---- ----\n urlparse4 1.883982 1.80631064237e-06 1.99999999495e-06 2.00000000916e-06\n pygurl 1.67332099999 1.60433461169e-06 1.99999999495e-06 2.00000000916e-06\n uritools 3.31632199999 3.17959923297e-06 3.00000000664e-06 4.00000000411e-06\n yurl 3.853319 3.69445733461e-06 3.00000000664e-06 4.00000000411e-06\n urlparse2 4.641513 4.45015627996e-06 4.00000000411e-06 5.99999999906e-06\n urlparse 5.122682 4.91148801534e-06 4.00000000411e-06 5.99999999906e-06\n cyuri 11.108649 1.06506701822e-05 9.0000000057e-06 1.5999999988e-05\n\nSome libraries are included in the benchmark code but disabled for\nvarious reasons:\n\n- `urlparse3 `__ (Raises on\n valid URLs)\n- `slimurl `__ (Too slow)\n\nFeel free to submit pull requests to add new ones!\n\nFeedback\n--------\n\nWe'd love to hear your feedback! Feel free to look at the issues on\nGitHub and open new ones if needed :)", "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/commonsearch/urlparse4", "keywords": "urlparse,urlsplit,urljoin,url,parser,urlparser,parsing,gurl,cython,faster,speed,performance", "license": "Apache License, Version 2.0", "maintainer": null, "maintainer_email": null, "name": "urlparse4", "package_url": "https://pypi.org/project/urlparse4/", "platform": "any", "project_url": "https://pypi.org/project/urlparse4/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/commonsearch/urlparse4" }, "release_url": "https://pypi.org/project/urlparse4/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Performance-focused replacement for Python's urlparse module", "version": "0.1.3" }, "last_serial": 2213247, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b02ff55b74f799ed65da74fdd5bd96d0", "sha256": "118b336f5c56e8419c20507710aaaf264aad17d46dd54e580e447f653e401f91" }, "downloads": -1, "filename": "urlparse4-0.1.tar.gz", "has_sig": false, "md5_digest": "b02ff55b74f799ed65da74fdd5bd96d0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 152878, "upload_time": "2016-07-10T23:09:21", "url": "https://files.pythonhosted.org/packages/36/86/c8fa7c9534d1560f38455154bfc4000fb2cc02f60241f3e0e99582134aef/urlparse4-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "04642771797bb7820cebf70467641ecf", "sha256": "cc69218746b5cfda3543080e5b9dc1e93307222ab343ce729493c3ed292da207" }, "downloads": -1, "filename": "urlparse4-0.1.1.tar.gz", "has_sig": false, "md5_digest": "04642771797bb7820cebf70467641ecf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 154125, "upload_time": "2016-07-10T23:31:48", "url": "https://files.pythonhosted.org/packages/90/c1/caaff08824a5237d4d85bf569565049729aa497f1c6c2e4da7e873b82783/urlparse4-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d3762a2f634996cf818d4c149c413d58", "sha256": "048cc4519a49c0bb35ee81636d1f0e0fe2207e3bc1723a6398557fb613092bbd" }, "downloads": -1, "filename": "urlparse4-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d3762a2f634996cf818d4c149c413d58", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158428, "upload_time": "2016-07-10T23:37:25", "url": "https://files.pythonhosted.org/packages/d4/a9/1a1408217d91d726d7f91d62dae3e33f5728fa07cef51b6d584002c96c80/urlparse4-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "026865e0c0a035f3cee0025f1c0983a7", "sha256": "ac0e9869b96a162ceeb175200d4c2f947c42991cfc2d53b8030748facbf8f791" }, "downloads": -1, "filename": "urlparse4-0.1.3.tar.gz", "has_sig": false, "md5_digest": "026865e0c0a035f3cee0025f1c0983a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158431, "upload_time": "2016-07-10T23:48:37", "url": "https://files.pythonhosted.org/packages/af/6f/a2d1a397b47ce3af6c5bb8936a7a8f930bf29b4df42081da842c5c84c1d1/urlparse4-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "026865e0c0a035f3cee0025f1c0983a7", "sha256": "ac0e9869b96a162ceeb175200d4c2f947c42991cfc2d53b8030748facbf8f791" }, "downloads": -1, "filename": "urlparse4-0.1.3.tar.gz", "has_sig": false, "md5_digest": "026865e0c0a035f3cee0025f1c0983a7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 158431, "upload_time": "2016-07-10T23:48:37", "url": "https://files.pythonhosted.org/packages/af/6f/a2d1a397b47ce3af6c5bb8936a7a8f930bf29b4df42081da842c5c84c1d1/urlparse4-0.1.3.tar.gz" } ] }