fast-query-parsers

raw JSON →
1.0.3 verified Mon Apr 27 auth: no python

Ultra-fast query string and URL-encoded form-data parsers for Python. Current version 1.0.3, license MIT, requires Python >=3.8. Aimed at high-performance web applications.

pip install fast-query-parsers
error ImportError: cannot import name 'parse_query_string' from 'fast_query_parsers'
cause Incorrect package name or version mismatch.
fix
Install/upgrade fast-query-parsers: pip install --upgrade fast-query-parsers
error TypeError: expected string or bytes-like object
cause Passing non-string input to parse_query_string.
fix
Ensure input is a string (URL or query string).
gotcha parse_query_string returns all values as strings; use int_list for integer conversion.
fix Use int_list(url, key) to get a list of ints for a specific key.
gotcha The library parses from full URL paths; ensure you pass the complete URL or query string correctly.
fix Pass the URL path including query string, e.g., '/path?key=value'.
deprecated Version 1.0.3 is current; no known deprecations yet.
breaking No breaking changes documented; sudden behavior changes possible in future versions.
fix Pin to a specific version in production.

Parse query strings and extract integer lists from URLs.

from fast_query_parsers import parse_query_string, int_list

url = '/path?key=value&arr=1&arr=2&arr=3'
parsed = parse_query_string(url)
print(parsed)  # {'key': 'value', 'arr': ['1', '2', '3']}

# Use int_list for integer conversion
def parse_ints(url):
    return int_list(url, 'arr')

print(parse_ints(url))  # [1, 2, 3]