Skip to main content

Query string parser with nested structure supported.

Project description

qsparser

Query string parser with nested structure supported.

Usage

Stringify

from qsparser import stringify

# simple object
stringify({'a': '5', 'b': 'c'}) # a=5&b=c

# nested object
stringify({'a': {'b': 'c'},'d': {'e': 'f'}}) # a[b]=c&d[e]=f

Parse

from qsparser import parse

# simple string
parse('a=5&b=c') # {'a': '5', 'b': 'c'}

# multiple string
parse('a[b]=c&d[e]=f') # {'a': {'b': 'c'},'d': {'e': 'f'}}

Installation

pip install qsparser

Changelog

1.1.0

  • Rigid rules on string with null representing content.
  • Use private function names.

Author

qsparser is authored by Victor Teo and Chun Tse.

License

MIT License

Copyright (c) 2021 Fillmula Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qsparser-1.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

qsparser-1.1.0-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file qsparser-1.1.0.tar.gz.

File metadata

  • Download URL: qsparser-1.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7

File hashes

Hashes for qsparser-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9d459911bc04e1a422df32c0dab67ef1486dca1566d4a80176d4b33f0a0f5972
MD5 26967a6080bae9f0c5c9d07b36c01555
BLAKE2b-256 dd2e4b40b8c2a21f8d9a7c9e40e08660c552fc49ffeb32b69adad928ebc2afbb

See more details on using hashes here.

File details

Details for the file qsparser-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: qsparser-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.9.7

File hashes

Hashes for qsparser-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 57b7e945393e34b7097c89b95b4a46102b220065fb9b498b92b3b514a96ac4d7
MD5 56f65593541b790ec39d51ed82a84758
BLAKE2b-256 36a021949d6a32bf166c5ed975b6e1fe0d45ece349c7522f7099de5f66dd6f3d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page