querystring-parser is a Python library designed for parsing URL query strings, particularly within Python and Django projects. Its key feature is the ability to correctly interpret and construct nested dictionaries from complex query string data, such as that often sent from HTML forms. The current version is 1.2.4, and its release cadence appears mature with infrequent updates.
Install & Compatibility
Where this runs
tested against v1.2.4 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.925 runs
installs and imports cleanly · install 0.0s · import 0.021s · 17.9MB
glibcpy 3.10–3.925 runs
installs and imports cleanly · install 1.6s · import 0.021s · 18MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
from querystring_parser import parser
Parse a query string into a nested Python dictionary. The library automatically handles URL-encoded values and converts array-like syntax (e.g., `items[]=value`) and dot notation (e.g., `user.name=value`) into appropriate dictionary structures.
from querystring_parser import parser
query_string = 'name=John%20Doe&address[city]=New%20York&address[zip]=10001&items[]=apple&items[]=banana'
parsed_data = parser.parse(query_string)
print(parsed_data)
# Expected output: {'name': 'John Doe', 'address': {'city': 'New York', 'zip': '10001'}, 'items': ['apple', 'banana']}
# Example with Django-style nested dicts (though library handles both standard and Django form data)
query_string_django = 'user.name=Alice&user.email=alice@example.com'
parsed_data_django = parser.parse(query_string_django)
print(parsed_data_django)
# Expected output: {'user': {'name': 'Alice', 'email': 'alice@example.com'}}
Upgrade
Version history
Breaking-change detection hasn't run for this library yet.
Audit
Security & dependencies
CVE tracking and dependency tree are planned for a later release.