{ "info": { "author": "UNKNOWN", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [], "description": "This repo is a port of the `node.js querystring module `_.\n\nIt contains two methods, ``parse_qs`` and ``stringify_obj`` that are functionally equivalent to the\n``querystring.parse`` and ``querystring.stringify`` node counterparts. It also contains default\n``encode_uri_component`` and ``decode_uri_component`` functions that can be used for convenience.\n\n\nInstallation\n============\n\n::\n\n pip install querystring\n\n\nUsage\n=====\n\n**Parsing a query string**\n\n>>> querystring.parse_qs('foo=bar&baz=qux&baz=quux&corge=')\n{u'foo': u'bar', u'baz': [u'qux', u'quux'], u'corge': u''}\n\n>>> querystring.parse_qs('foo:bar;baz:qux;baz:quux;corge:', sep=';', eq=':')\n{u'foo': u'bar', u'baz': [u'qux', u'quux'], u'corge': u''}\n\n>>> def gbk_decode(s):\n... return urllib.unquote(s)\n...\n>>> querystring.parse_qs('foo=bar&w=%D6%D0%CE%C4', decode_fn=gbk_decode)\n{'foo': 'bar', 'w': '\\xd6\\xd0\\xce\\xc4'} # u'\u4e2d\u6587'\n\n**Converting an object back into a query string**\n\n>>> querystring.stringify_obj({'foo': 'bar', 'baz': ['qux', 'quux'], 'corge': ''})\n'foo=bar&baz=qux&baz=quux&corge='\n\n>>> querystring.stringify_obj({'foo': 'bar', 'baz': ['qux', 'quux'], 'corge': ''}, sep=';', eq=':')\n'foo:bar;baz:qux;baz:quux;corge:'\n\n>>> def gbk_encode(s):\n... return urllib.quote(unicode(s).encode('gbk'))\n...\n>>> querystring.stringify_obj({'foo': 'bar', 'w': u'\u4e2d\u6587'}, encode_fn=gbk_encode)\n'foo=bar&w=%D6%D0%CE%C4'\n\n\nMotivation\n==========\n\nWe were looking for a simple module to parse query parameters in a sensible way,\nand were unsatisfied by how ``urlparse`` handled params (putting all values in a list),\nso we made this.\n\n\nLicense\n=======\n\nCopyright Refinery29, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to permit\npersons to whom the Software is furnished to do so, subject to the\nfollowing conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\nNO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\nDAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\nOTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\nUSE OR OTHER DEALINGS IN THE SOFTWARE.\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "querystring", "package_url": "https://pypi.org/project/querystring/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/querystring/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/querystring/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Python port of the node.js querystring module", "version": "0.1.0" }, "last_serial": 1460404, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "17201172438c0f5e08c7bd76c83efb5c", "sha256": "b48eb7259cef632b817dd388c223d0799d2c5bc1a23e3daa154a4e0b481e41d5" }, "downloads": -1, "filename": "querystring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "17201172438c0f5e08c7bd76c83efb5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3880, "upload_time": "2015-03-13T19:44:17", "url": "https://files.pythonhosted.org/packages/bc/97/f3cce4f2e490bb52864defa91fc2e244b0b8e0dd673ddd13b2054e847244/querystring-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "17201172438c0f5e08c7bd76c83efb5c", "sha256": "b48eb7259cef632b817dd388c223d0799d2c5bc1a23e3daa154a4e0b481e41d5" }, "downloads": -1, "filename": "querystring-0.1.0.tar.gz", "has_sig": false, "md5_digest": "17201172438c0f5e08c7bd76c83efb5c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3880, "upload_time": "2015-03-13T19:44:17", "url": "https://files.pythonhosted.org/packages/bc/97/f3cce4f2e490bb52864defa91fc2e244b0b8e0dd673ddd13b2054e847244/querystring-0.1.0.tar.gz" } ] }