qstion
A querystring parsing and stringifying library with some added security. Library was based on this js library.
Usage
import qstion as qs
x = qs.parse('a=c')
assert x == {'a': 'c'}
x_str = qs.stringify(x)
assert x_str == 'a=c'
Documentation details
Full documentation reference: https://www.npmjs.com/package/qs Result of parsing can be returned as root object if needed, but default implementation is to return a dictionary.
Not supported
Parser:
plainObjectsignoreQueryPrefix- alwaysFalse, query is always considered without prefixStrict null handling
Stringifier:
- custom
encoderanddecoderfunctions sortingof keysfilteringof keys
Additional support
- parsing
primitivevalues:int,floatare represented asdecimal.Decimal, bool-like values are represented asboolwhatever the case they are in, however this can be processed strictly usingprimitive_strictoption, null-like values are represented asNone
Modifications:
Parser:
sparse arraysare represented as dictionaries with keys as indexesundefinedvalues are represented as strings'undefined'- queries such as
awithout=are considered as non-value and thus are not included in the result
Release files for qstion 1.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qstion-1.1.7.tar.gz | 19.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qstion-1.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.4 kB
Release files / qstion-1.1.7.tar.gz
| Download URL | qstion-1.1.7.tar.gz |
|---|---|
| Size | 19.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bc3bf6c31481b6d33816142b6f3afb8dfa5438403b15f7d4cb2846f6d495f17b
|
|
BLAKE2b-256 checksum How to use checksums |
04e81cbd625f04d7d8f3097f88912c1aa2dec426419a947a8b7e718798acd4a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.5
|
Release files / qstion-1.1.7-py3-none-any.whl
| Download URL | qstion-1.1.7-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2c00532a26527dd9778776a63f9148973f2eaee30054c78648e9d343e668438
|
|
BLAKE2b-256 checksum How to use checksums |
72abbb442adee129f99df057ff0f3fba33af722ac33b9bc5c3ae0abe48cbbf73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.5
|