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.2.2.tar.gz
(7.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqurl-0.2.2.tar.gz.
File metadata
- Download URL: pyqurl-0.2.2.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fc3b7dea688468213dfde06500349975b064fb6d2b55b57e8421702a4560f35
|
|
| MD5 |
1f6a655537365584ce83b250ac607936
|
|
| BLAKE2b-256 |
5f74b99bb4fa827d91b71eaa0268526e153cf80aeb9e9ca4b0b88ae0f8a18bba
|
File details
Details for the file pyqurl-0.2.2-py3-none-any.whl.
File metadata
- Download URL: pyqurl-0.2.2-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
07c5194b32054c024433f59940b431105522b80eba65fb85d7f16c1e3538c086
|
|
| MD5 |
a010bc40e910225133407780c84f8d4a
|
|
| BLAKE2b-256 |
8df28540db4a3e0f696b4bf7519e12ec12960577f06037e4813b52a5b33f19bd
|