{ "info": { "author": "Britney L.", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "P.url\n=====\n\nP.url is a simple url parsing library for python. Currently, you can\nmodify querystrings for given urls by adding or deleting. Chaining is\nsupported!\n\nUsage\n-----\n\nAdd/update query\n~~~~~~~~~~~~~~~~\n\n.. code:: py\n\n from purl import Purl\n\n url = Purl('https://github.com/search?q=cat')\n\n str(url.add_query('q', 'dog')) # => 'https://github.com/search?q=dog'\n\n.. code:: py\n\n url = Purl('https://github.com/search')\n\n str(url.add_query({\n 'q': 'cat',\n 'l': 'JavaScript',\n 'type': 'Issues'\n }))\n\n # or\n\n url = Purl('https://github.com/search')\n\n str(url.add_query('q', 'cat')\n .add_query('l', 'JavaScript')\n .add_query('type', 'Issues')) # => 'https://github.com/search?l=JavaScript&q=cat&type=Issues'\n\nDelete query\n~~~~~~~~~~~~\n\n.. code:: py\n\n from purl import Purl\n\n url = Purl('https://github.com/search?q=cat')\n\n str(url.delete_query('q')) # => 'https://github.com/search'\n\n.. code:: py\n\n url = Purl('https://github.com/search?l=JavaScript&q=cat&type=Issues')\n\n str(url.delete_query(['q', 'type'])) # => https://github.com/search?l=JavaScript\n\n # or\n\n url = Purl('https://github.com/search?l=JavaScript&q=cat&type=Issues')\n str(url.delete_query('q')\n .delete_query('type')) # => 'https://github.com/search?l=JavaScript'\n\nParams\n~~~~~~\n\n.. code:: py\n\n url = ( Purl('https://some.public.api.com')\n .path('/:resource/:id/:action')\n .param('resource', 'user').param('id', 12).param('action', 'favorites')\n )\n str(url)\n\n # or\n\n url = ( Purl('https://some.public.api.com')\n .path('/:resource/:id/:action')\n .param({\n 'resource': 'user',\n 'id': 12,\n 'action': 'favorites'\n })\n )\n str(url) # => 'https://some.public.api.com/user/12/favorites'\n\nRunning the tests\n-----------------\n\nmake sure you have py test installed\n\n``pip install pytest``\n\nThen run:\n\n``py.test``", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ultrabluewolf/p.url", "keywords": "url", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "p.url", "package_url": "https://pypi.org/project/p.url/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/p.url/", "project_urls": { "Homepage": "https://github.com/ultrabluewolf/p.url" }, "release_url": "https://pypi.org/project/p.url/0.1.0a4/", "requires_dist": null, "requires_python": "", "summary": "A simple url parsing library for python", "version": "0.1.0a4" }, "last_serial": 1970828, "releases": { "0.1.0a4": [ { "comment_text": "", "digests": { "md5": "c1df900bf5093abab4514c4f9afa250f", "sha256": "1f5fc1cad269108d96089a2a9244ece90fc7c962800bd0a528936b394e639abc" }, "downloads": -1, "filename": "p.url-0.1.0a4.tar.gz", "has_sig": false, "md5_digest": "c1df900bf5093abab4514c4f9afa250f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2016-02-23T02:20:48", "url": "https://files.pythonhosted.org/packages/cf/56/e36096056649758114fec535a4b1be7259c2ba556931b3ed9dcc712e33a7/p.url-0.1.0a4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c1df900bf5093abab4514c4f9afa250f", "sha256": "1f5fc1cad269108d96089a2a9244ece90fc7c962800bd0a528936b394e639abc" }, "downloads": -1, "filename": "p.url-0.1.0a4.tar.gz", "has_sig": false, "md5_digest": "c1df900bf5093abab4514c4f9afa250f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2016-02-23T02:20:48", "url": "https://files.pythonhosted.org/packages/cf/56/e36096056649758114fec535a4b1be7259c2ba556931b3ed9dcc712e33a7/p.url-0.1.0a4.tar.gz" } ] }