# qstion
A querystring parsing and stringifying library with some added security.
Library was based on [this](https://www.npmjs.com/package/qs?activeTab=readme) js library.
## Usage
```python
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
Raw data
{
"_id": null,
"home_page": null,
"name": "qstion",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "querystring, query, string, url, parse, serialize, deserialize, nested, dict, dictionary, qs, qstion",
"author": null,
"author_email": "Marek Nemeth <99m.nemeth@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/04/e8/1cbd625f04d7d8f3097f88912c1aa2dec426419a947a8b7e718798acd4a2/qstion-1.1.7.tar.gz",
"platform": null,
"description": "# qstion\n\nA querystring parsing and stringifying library with some added security. \nLibrary was based on [this](https://www.npmjs.com/package/qs?activeTab=readme) js library.\n\n## Usage \n\n```python\nimport qstion as qs\n\nx = qs.parse('a=c')\nassert x == {'a': 'c'}\n\nx_str = qs.stringify(x)\nassert x_str == 'a=c'\n```\n\n### Documentation details\n\nFull documentation reference: https://www.npmjs.com/package/qs\nResult of parsing can be returned as root object if needed, but default implementation is to return a dictionary.\n\n#### Not supported\nParser:\n- `plainObjects`\n- `ignoreQueryPrefix` - always `False`, query is always considered without prefix\n- `Strict null handling`\n\n\nStringifier:\n- custom `encoder` and `decoder` functions\n- `sorting` of keys\n- `filtering` of keys\n\n#### Additional support\n- 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`\n\n#### Modifications:\nParser:\n- `sparse arrays` are represented as dictionaries with keys as indexes\n- `undefined` values are represented as strings `'undefined'`\n- queries such as `a` without `=` are considered as non-value and thus are not included in the result\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Simple package for parsing querystrings into nested dictionaries and vice versa.",
"version": "1.1.7",
"project_urls": {
"Bug Tracker": "https://github.com/kajotgames/qstion/issues",
"Documentation": "https://github.com/kajotgames/qstion/blob/main/README.md",
"Homepage": "https://github.com/kajotgames/qstion"
},
"split_keywords": [
"querystring",
" query",
" string",
" url",
" parse",
" serialize",
" deserialize",
" nested",
" dict",
" dictionary",
" qs",
" qstion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "72abbb442adee129f99df057ff0f3fba33af722ac33b9bc5c3ae0abe48cbbf73",
"md5": "e4aee1daa284819cf830707d7979cd22",
"sha256": "d2c00532a26527dd9778776a63f9148973f2eaee30054c78648e9d343e668438"
},
"downloads": -1,
"filename": "qstion-1.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e4aee1daa284819cf830707d7979cd22",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 15698,
"upload_time": "2024-09-25T07:52:22",
"upload_time_iso_8601": "2024-09-25T07:52:22.601809Z",
"url": "https://files.pythonhosted.org/packages/72/ab/bb442adee129f99df057ff0f3fba33af722ac33b9bc5c3ae0abe48cbbf73/qstion-1.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "04e81cbd625f04d7d8f3097f88912c1aa2dec426419a947a8b7e718798acd4a2",
"md5": "f4395002f242f8081b8960b933e8bc5d",
"sha256": "bc3bf6c31481b6d33816142b6f3afb8dfa5438403b15f7d4cb2846f6d495f17b"
},
"downloads": -1,
"filename": "qstion-1.1.7.tar.gz",
"has_sig": false,
"md5_digest": "f4395002f242f8081b8960b933e8bc5d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 19705,
"upload_time": "2024-09-25T07:52:23",
"upload_time_iso_8601": "2024-09-25T07:52:23.989227Z",
"url": "https://files.pythonhosted.org/packages/04/e8/1cbd625f04d7d8f3097f88912c1aa2dec426419a947a8b7e718798acd4a2/qstion-1.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-25 07:52:23",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "kajotgames",
"github_project": "qstion",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "qstion"
}