{"id":27324,"library":"query-string","title":"query-string","description":"A lightweight Python library for parsing and manipulating URL query strings. The current version is 2020.12.3, released in December 2020. Development appears inactive; no new releases since then.","status":"deprecated","version":"2020.12.3","language":"python","source_language":"en","source_url":"https://github.com/andrewp-as-is/query-string.py","tags":["query-string","url","parsing"],"install":[{"cmd":"pip install query-string==2020.12.3","lang":"bash","label":"Install specific version"}],"dependencies":[],"imports":[{"note":"Direct import of module is possible but parse() is the main function","wrong":"import query_string","symbol":"parse","correct":"from query_string import parse"},{"note":"No class named query_string","wrong":"from query_string import query_string","symbol":"parse","correct":"from query_string import parse"}],"quickstart":{"code":"from query_string import parse\n\nurl = \"http://example.com?foo=1&bar=2\"\nparams = parse(url)\nprint(params)  # {'foo': '1', 'bar': '2'}","lang":"python","description":"Parse a URL query string into a dictionary."},"warnings":[{"fix":"Always pass a full URL including scheme and host, or prefix with 'http://example.com/?'.","message":"The parse() function expects a full URL string, not just the query part. If you pass only 'key=value', it may fail or return unexpected results.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from urllib.parse import urlparse, parse_qs' or 'import requests'.","message":"This library is effectively deprecated. No releases since 2020. The author recommends using urllib.parse (stdlib) or the requests library instead.","severity":"deprecated","affected_versions":">=2017.0.0"},{"fix":"Convert values manually after parsing.","message":"The library returns values as strings. It does not perform type conversion. Query parameters like 'num=42' will be string '42', not integer 42.","severity":"gotcha","affected_versions":"all"},{"fix":"If you expect a single value, use dict comprehension to take the first or last element from the list.","message":"In version 2020.12.3, the parse function behavior changed regarding duplicate keys. Previously, it returned the last value; now it returns a list of values for duplicate keys.","severity":"breaking","affected_versions":">=2020.12.3"}],"env_vars":null,"search_vec":"'2020':23 '2020.12.3':19 'appear':25 'current':16 'decemb':22 'develop':24 'inact':26 'librari':7 'lightweight':5 'manipul':11 'new':28 'pars':9,36 'python':6 'queri':2,13,33 'query-str':1,32 'releas':20,29 'sinc':30 'string':3,14,34 'url':12,35 'version':17","created_at":"2026-05-01T17:45:39.828008+00:00","updated_at":"2026-05-01T17:45:39.828008+00:00","problems":[{"fix":"Use 'from query_string import parse'.","cause":"Importing the module itself instead of the function.","error":"AttributeError: module 'query_string' has no attribute 'parse'"},{"fix":"Ensure you pass a full URL like 'http://example.com?foo=1'.","cause":"Passing only a query string (e.g., 'foo=1') without a full URL.","error":"ValueError: Invalid URL"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/andrewp-as-is/query-string.py","docs":null,"changelog":null,"pypi":"https://pypi.org/project/query-string/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["http-networking","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-28","install_tag":null}}