{"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,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","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,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}