Simple query string parser for LHS filtering, sorting and pagination
Project description
Simple query string parser for LHS filtering, sorting and pagination. This project is directly based on Qurl by Hector Carballo (https://github.com/hector-co/Qurl).
Installing
$ pip install pyqurl
Usage
from pyqurl import create_query_from_string
# Name contains "john"
create_query_from_string("name[ct]=john")
# Price is greater than 20
create_query_from_string("price[gt]=20")
# Disabled_at is not null
create_query_from_string("disabled_at[nn]=true")
# Year is between 2020 and 2022
create_query_from_string("year[rng]=2020,2022")
# Color is equal to yellow
create_query_from_string("color[eq]=yellow")
# Same result if the operator is not present
create_query_from_string("color=yellow")
# Category is drama, romance or comecy
create_query_from_string("category[in]=drama,romance,comedy")
# Category is not horror or action
create_query_from_string("category[nin]=horror,action")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyqurl-0.1.1.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file pyqurl-0.1.1.tar.gz
.
File metadata
- Download URL: pyqurl-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d34ac179ddbf5727d7a3b7f120675520511c06a961fc17c6f1f0f372e88f0205 |
|
MD5 | 8a0e104511092a30cef8f3b50124f709 |
|
BLAKE2b-256 | 33e95bc764359f657b65105358870c918bc87d5a10e5a242dc55e60d3fea1d69 |
File details
Details for the file pyqurl-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: pyqurl-0.1.1-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6ff859433dcb6830499916037735e11d37e7aaf322436d909582b4374256495 |
|
MD5 | cddd6f080ef570cf9428253336005645 |
|
BLAKE2b-256 | 4538b93b915d8287c2f148e8afbe28f86960c654f8012340c9dc7ea1a28f4e86 |