{ "info": { "author": "chrono-meter@gmx.net", "author_email": "chrono-meter@gmx.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "urlpath provides URL manipulator class that extends `pathlib.PurePath `_.\n====================================================================================================================================\n\n.. image:: https://img.shields.io/travis/chrono-meter/urlpath.svg\n :target: https://travis-ci.org/chrono-meter/urlpath\n\n.. image:: https://img.shields.io/pypi/v/urlpath.svg\n :target: https://pypi.python.org/pypi/urlpath\n\n.. image:: https://img.shields.io/pypi/l/urlpath.svg\n :target: http://python.org/psf/license\n\nDependencies\n------------\n\n* Python 3.2, 3.3, 3.4, 3.5\n* `pathlib `_ (Standard library in Python 3.4)\n* `unittest.mock `_ (Standard library in Python 3.3, or install\n `mock `_)\n* `Requests `_\n* `WebOb `_ (Optional)\n\nInstall\n-------\n\n``pip install urlpath``\n\nExamples\n--------\n\nImport::\n\n >>> from urlpath import URL\n\nCreate object::\n\n >>> url = URL(\n ... 'https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n\nRepresentation::\n\n >>> url\n URL('https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n >>> print(url)\n https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment\n >>> url.as_uri()\n 'https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment'\n >>> url.as_posix()\n 'https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment'\n\nAccess `pathlib.PurePath` compatible properties::\n\n >>> url.drive\n 'https://username:password@secure.example.com:1234'\n >>> url.root\n '/'\n >>> url.anchor\n 'https://username:password@secure.example.com:1234/'\n >>> url.path\n '/path/to/file.ext'\n >>> url.name\n 'file.ext'\n >>> url.suffix\n '.ext'\n >>> url.suffixes\n ['.ext']\n >>> url.stem\n 'file'\n >>> url.parts\n ('https://username:password@secure.example.com:1234/', 'path', 'to', 'file.ext')\n >>> url.parent\n URL('https://username:password@secure.example.com:1234/path/to')\n\nAccess scheme::\n\n >>> url.scheme\n 'https'\n\nAccess netloc::\n\n >>> url.netloc\n 'username:password@secure.example.com:1234'\n >>> url.username\n 'username'\n >>> url.password\n 'password'\n >>> url.hostname\n 'secure.example.com'\n >>> url.port\n 1234\n\nAccess query::\n\n >>> url.query\n 'field1=1&field2=2&field1=3'\n >>> url.form_fields\n (('field1', '1'), ('field2', '2'), ('field1', '3'))\n >>> url.form\n \n >>> url.form.get_one('field1')\n '1'\n >>> url.form.get_one('field3') is None\n True\n\nAccess fragment::\n\n >>> url.fragment\n 'fragment'\n\nPath operation::\n\n >>> url / 'suffix'\n URL('https://username:password@secure.example.com:1234/path/to/file.ext/suffix')\n >>> url / '../../rel'\n URL('https://username:password@secure.example.com:1234/path/to/file.ext/../../rel')\n >>> (url / '../../rel').resolve()\n URL('https://username:password@secure.example.com:1234/path/rel')\n >>> url / '/'\n URL('https://username:password@secure.example.com:1234/')\n >>> url / 'http://example.com/'\n URL('http://example.com/')\n\nReplace components::\n\n >>> url.with_scheme('http')\n URL('http://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n >>> url.with_netloc('www.example.com')\n URL('https://www.example.com/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n >>> url.with_userinfo('joe', 'pa33')\n URL('https://joe:pa33@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n >>> url.with_hostinfo('example.com', 8080)\n URL('https://username:password@example.com:8080/path/to/file.ext?field1=1&field2=2&field1=3#fragment')\n >>> url.with_fragment('new fragment')\n URL('https://username:password@secure.example.com:1234/path/to/file.ext?field1=1&field2=2&field1=3#new fragment')\n >>> url.with_components(username=None, password=None, query='query', fragment='frag')\n URL('https://secure.example.com:1234/path/to/file.ext?query#frag')\n\nReplace query::\n\n >>> url.with_query({'field3': '3', 'field4': [1, 2, 3]})\n URL('https://username:password@secure.example.com:1234/path/to/file.ext?field3=3&field4=1&field4=2&field4=3#fragment')\n >>> url.with_query(field3='3', field4=[1, 2, 3])\n URL('https://username:password@secure.example.com:1234/path/to/file.ext?field3=3&field4=1&field4=2&field4=3#fragment')\n >>> url.with_query('query')\n URL('https://username:password@secure.example.com:1234/path/to/file.ext?query#fragment')\n >>> url.with_query(None)\n URL('https://username:password@secure.example.com:1234/path/to/file.ext#fragment')\n\nDo HTTP requests::\n\n >>> url = URL('https://httpbin.org/get')\n >>> url.get()\n \n\n >>> url = URL('https://httpbin.org/post')\n >>> url.post(data={'key': 'value'})\n \n\n >>> url = URL('https://httpbin.org/delete')\n >>> url.delete()\n \n\n >>> url = URL('https://httpbin.org/patch')\n >>> url.patch(data={'key': 'value'})\n \n\n >>> url = URL('https://httpbin.org/put')\n >>> url.put(data={'key': 'value'})\n \n\nJail::\n\n >>> root = 'http://www.example.com/app/'\n >>> current = 'http://www.example.com/app/path/to/content'\n >>> url = URL(root).jailed / current\n >>> url / '/root'\n JailedURL('http://www.example.com/app/root')\n >>> (url / '../../../../../../root').resolve()\n JailedURL('http://www.example.com/app/root')\n >>> url / 'http://localhost/'\n JailedURL('http://www.example.com/app/')\n >>> url / 'http://www.example.com/app/file'\n JailedURL('http://www.example.com/app/file')\n\nTrailing separator will be remained::\n\n >>> url = URL('http://www.example.com/path/with/trailing/sep/')\n >>> str(url).endswith('/')\n True\n >>> url.trailing_sep\n '/'\n >>> url.name\n 'sep'\n >>> url.path\n '/path/with/trailing/sep/'\n >>> url.parts[-1]\n 'sep'\n\n >>> url = URL('http://www.example.com/path/without/trailing/sep')\n >>> str(url).endswith('/')\n False\n >>> url.trailing_sep\n ''\n >>> url.name\n 'sep'\n >>> url.path\n '/path/without/trailing/sep'\n >>> url.parts[-1]\n 'sep'\n\n", "description_content_type": "", "docs_url": null, "download_url": "http://pypi.python.org/pypi/urlpath", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/chrono-meter/urlpath", "keywords": "", "license": "PSF", "maintainer": "", "maintainer_email": "", "name": "urlpath", "package_url": "https://pypi.org/project/urlpath/", "platform": "", "project_url": "https://pypi.org/project/urlpath/", "project_urls": { "Download": "http://pypi.python.org/pypi/urlpath", "Homepage": "https://github.com/chrono-meter/urlpath" }, "release_url": "https://pypi.org/project/urlpath/1.1.4/", "requires_dist": null, "requires_python": "", "summary": "Object-oriented URL from `urllib.parse` and `pathlib`", "version": "1.1.4" }, "last_serial": 3701095, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "324965b0b3cc495d8f5a9fbdcd912a2a", "sha256": "f34714a9efc6d2820fc376632f12960c7f47d97656f58426399d3ad4628d0e5e" }, "downloads": -1, "filename": "urlpath-1.0.0-py3.4.egg", "has_sig": false, "md5_digest": "324965b0b3cc495d8f5a9fbdcd912a2a", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 12348, "upload_time": "2015-01-23T06:02:17", "url": "https://files.pythonhosted.org/packages/94/96/fd142ba420bebbaf7007f6e9f5918dad9fda836b1940a5d234d9f72a9344/urlpath-1.0.0-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "52ce3aad3a9dcfc6bb1c376b721a71df", "sha256": "31f741bccbb4d488a7c2faf330c5d92d0278f6398d3534ebf708167b4ef32299" }, "downloads": -1, "filename": "urlpath-1.0.0.zip", "has_sig": false, "md5_digest": "52ce3aad3a9dcfc6bb1c376b721a71df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11176, "upload_time": "2015-01-23T06:02:15", "url": "https://files.pythonhosted.org/packages/53/da/1df2a04d1c5ebc7fba13122b32ed26c91b25f72f2091b49cff08dfd9f9d5/urlpath-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "4e534d0db1464891b7cfb066d0d94375", "sha256": "da81705af78726af5258b21a6968e1f25b9de9d601cf33fb1bbb9b94ab25cfed" }, "downloads": -1, "filename": "urlpath-1.0.1-py3.4.egg", "has_sig": false, "md5_digest": "4e534d0db1464891b7cfb066d0d94375", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 12443, "upload_time": "2015-01-23T22:34:04", "url": "https://files.pythonhosted.org/packages/27/78/1b8bb5f4975234488421cf80ef245d62ab4d1d9db1616a51cdfe8887224c/urlpath-1.0.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "8526e7b21618ca93af9c1187e55abaa6", "sha256": "f40616df699db1f62cf48c22c2f58dd26b69b5cd503e09e71f420a3f2ee7a2fa" }, "downloads": -1, "filename": "urlpath-1.0.1.zip", "has_sig": false, "md5_digest": "8526e7b21618ca93af9c1187e55abaa6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11547, "upload_time": "2015-01-23T22:33:58", "url": "https://files.pythonhosted.org/packages/ea/7d/3bb3e5027be78fc70d3fe730584adc993305cddc2cc015f1725ceac50873/urlpath-1.0.1.zip" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "af8c4527715dbf6a48af4443c5d38f20", "sha256": "821e2763485ef977d9dae2070b5502ed312a01ca34eb80fac454c26fdce682f1" }, "downloads": -1, "filename": "urlpath-1.0.2-py3.4.egg", "has_sig": false, "md5_digest": "af8c4527715dbf6a48af4443c5d38f20", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 12468, "upload_time": "2015-01-23T22:51:59", "url": "https://files.pythonhosted.org/packages/da/50/32f1ebbf9aedc8ed1fc9d73416763464eba30921465d080cd8c9824cbb37/urlpath-1.0.2-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "65a5bd429ffeabe34de462773fbc54de", "sha256": "43731f7f03e2d235d8b060d0cecdd01c1bbd8730ce06af1e9ffa8446e7eea868" }, "downloads": -1, "filename": "urlpath-1.0.2.zip", "has_sig": false, "md5_digest": "65a5bd429ffeabe34de462773fbc54de", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11634, "upload_time": "2015-01-23T22:51:56", "url": "https://files.pythonhosted.org/packages/bb/2e/ff329f78308c3d493df7428bbf4853ede44c97b234af2ccd8e5e67ef1ebf/urlpath-1.0.2.zip" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "dc611881777db189c99812d7891abb3d", "sha256": "ebe3e551792a1ec9c9cf541a376732fa7a5bee8ae11e310e9e0c806f22600f82" }, "downloads": -1, "filename": "urlpath-1.0.3-py3.4.egg", "has_sig": false, "md5_digest": "dc611881777db189c99812d7891abb3d", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 13507, "upload_time": "2015-01-25T15:23:57", "url": "https://files.pythonhosted.org/packages/3a/75/342e1206f6ba857bcaf3e5429a41774e6c5cb8729933716cf50c5ad50332/urlpath-1.0.3-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "9f0b36ef91984a990809560ca40b3165", "sha256": "b7ff636ed5d9d6047383d46e5d51a4ed8eb0fd135b6cece5186d9a201135529f" }, "downloads": -1, "filename": "urlpath-1.0.3.zip", "has_sig": false, "md5_digest": "9f0b36ef91984a990809560ca40b3165", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12475, "upload_time": "2015-01-25T15:23:55", "url": "https://files.pythonhosted.org/packages/df/60/8e9850fca42e4685f70d9c15c7b38aae93c442799d48e6947d0ec059e713/urlpath-1.0.3.zip" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "3a893b80ee27b1416c51f655b1ce9ca7", "sha256": "a78692ffddd833d6de275b69d716799d96accf1e4ef7143c0c8686475a2845af" }, "downloads": -1, "filename": "urlpath-1.0.4-py3.4.egg", "has_sig": false, "md5_digest": "3a893b80ee27b1416c51f655b1ce9ca7", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 13936, "upload_time": "2015-01-27T01:33:43", "url": "https://files.pythonhosted.org/packages/48/91/4c047f51b835fa0ed077c63b99fc5f40433b35f9059dabe9de3ea9dfcd6c/urlpath-1.0.4-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "4471be5e59f3e917dddbb6b5c35b418e", "sha256": "a8a605310774ba56c760a3eeb0753410a3d8275b9c88f26db7ee543b364f39e6" }, "downloads": -1, "filename": "urlpath-1.0.4.zip", "has_sig": false, "md5_digest": "4471be5e59f3e917dddbb6b5c35b418e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12685, "upload_time": "2015-01-27T01:33:41", "url": "https://files.pythonhosted.org/packages/9b/d6/81cc00b7ad00e14b65113859463ba46204cda45b2dea343d1c0627de4ccf/urlpath-1.0.4.zip" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "434a817652c1c4aa17515053b6ff73e7", "sha256": "50d6e038f0f6f283135bf730616cbf09e6349a4d8848b10800cf2a3570b81ace" }, "downloads": -1, "filename": "urlpath-1.0.5-py3.4.egg", "has_sig": false, "md5_digest": "434a817652c1c4aa17515053b6ff73e7", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 14200, "upload_time": "2015-01-27T20:57:46", "url": "https://files.pythonhosted.org/packages/22/22/17aecd8c60d9925cddd42c303355a333054657de04784fdbf9e0bd88b445/urlpath-1.0.5-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "e531a8a3aa6304b84715f035b736ab90", "sha256": "ca33a2d10b3ae498b50f64fdfa7d6cf8c7176f0863df3a3fe33dcc215500ee52" }, "downloads": -1, "filename": "urlpath-1.0.5.zip", "has_sig": false, "md5_digest": "e531a8a3aa6304b84715f035b736ab90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12915, "upload_time": "2015-01-27T20:57:43", "url": "https://files.pythonhosted.org/packages/7e/2d/95e8e862e19b1b2c26ba25a453b98c2a41ae1d089292cef6846ce6d5c9c7/urlpath-1.0.5.zip" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "558f9544181a71b0ed5f6d3819d371b3", "sha256": "439f93e71d82cd0776aef0bfeb3058610df5a5e57379a962dd50fbf087825944" }, "downloads": -1, "filename": "urlpath-1.1.1-py3.4.egg", "has_sig": false, "md5_digest": "558f9544181a71b0ed5f6d3819d371b3", "packagetype": "bdist_egg", "python_version": "3.4", "requires_python": null, "size": 15560, "upload_time": "2015-12-04T21:55:50", "url": "https://files.pythonhosted.org/packages/0c/f7/4207c66dbbbd25a5f77e4a1fdd4dbf593e172b0cbf2df34c51ee384ea2b6/urlpath-1.1.1-py3.4.egg" }, { "comment_text": "", "digests": { "md5": "cc0cf8a1dafbfe7f820af60d7f858d36", "sha256": "aaa3634e58d240d7b1326aed2fe539e1f3d9a655f4df716b1023cf70f31debb0" }, "downloads": -1, "filename": "urlpath-1.1.1.zip", "has_sig": false, "md5_digest": "cc0cf8a1dafbfe7f820af60d7f858d36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14107, "upload_time": "2015-12-04T21:55:42", "url": "https://files.pythonhosted.org/packages/f9/ba/54701934bbdba7c70b7872aabf81986249cf8a6578a782a9360f3173e48f/urlpath-1.1.1.zip" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "9c0e06178f1d5724ccc46d157b4f4614", "sha256": "65712ad2f7b54ba0770408bf05568a39198a060f784d757da4d8548e2eecee42" }, "downloads": -1, "filename": "urlpath-1.1.2.zip", "has_sig": false, "md5_digest": "9c0e06178f1d5724ccc46d157b4f4614", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14564, "upload_time": "2015-12-16T08:46:09", "url": "https://files.pythonhosted.org/packages/17/72/fcc758153394e7a5220af0a9d0f799447e1cffa17bcbfd5452c270ab0274/urlpath-1.1.2.zip" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "706fd9ea989da1f5e595dadceffa9554", "sha256": "d6f543cf17bde4d6e6e53945fb28514e39b306e1039ae26dab99e9bb90fb7959" }, "downloads": -1, "filename": "urlpath-1.1.4.tar.gz", "has_sig": false, "md5_digest": "706fd9ea989da1f5e595dadceffa9554", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11010, "upload_time": "2018-03-24T05:45:41", "url": "https://files.pythonhosted.org/packages/b3/17/6261be4b03d1a50971748efc6dc416749050ff365973d39bef3eea3d4097/urlpath-1.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "706fd9ea989da1f5e595dadceffa9554", "sha256": "d6f543cf17bde4d6e6e53945fb28514e39b306e1039ae26dab99e9bb90fb7959" }, "downloads": -1, "filename": "urlpath-1.1.4.tar.gz", "has_sig": false, "md5_digest": "706fd9ea989da1f5e595dadceffa9554", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11010, "upload_time": "2018-03-24T05:45:41", "url": "https://files.pythonhosted.org/packages/b3/17/6261be4b03d1a50971748efc6dc416749050ff365973d39bef3eea3d4097/urlpath-1.1.4.tar.gz" } ] }