Skip to main content

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:

  • plainObjects
  • ignoreQueryPrefix - always False, query is always considered without prefix
  • Strict null handling

Stringifier:

  • custom encoder and decoder functions
  • sorting of keys
  • filtering of keys

Additional support

  • parsing primitive values: int, float are represented as decimal.Decimal, bool-like values are represented as bool whatever the case they are in, however this can be processed strictly using primitive_strict option, null-like values are represented as None

Modifications:

Parser:

  • sparse arrays are represented as dictionaries with keys as indexes
  • undefined values are represented as strings 'undefined'
  • queries such as a without = 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)

Source distribution for qstion 1.1.7
File Size Uploaded
qstion-1.1.7.tar.gz 19.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qstion 1.1.7
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

1.1.7 This release

2 release files

1.1.6

2 release files

1.1.5

2 release files

1.1.4

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page