Skip to main content

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


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.1.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

pyqurl-0.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pyqurl-0.2.1.tar.gz.

File metadata

  • Download URL: pyqurl-0.2.1.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for pyqurl-0.2.1.tar.gz
Algorithm Hash digest
SHA256 555a6bd82b99a214a9fa5017c7c546335ab27ff269899590b04ba8686daf4640
MD5 500eedf6019dc405429c09ef56c19995
BLAKE2b-256 04e546c1e7e537c68df0c1cf0c8a6b96724f8f76ba75c25a5a93c329ded25369

See more details on using hashes here.

File details

Details for the file pyqurl-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyqurl-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for pyqurl-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9935e9066d5a26c29d786716aa5ca9cff53c70926824b30270b0537985f600
MD5 ffca133229c693d4a0fd202e365e3fd2
BLAKE2b-256 5ec9d22ed441a2e306f5fa20d7f463439ec1c17616f45e6688178ae5a6fd6acc

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