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

Uploaded Source

Built Distribution

pyqurl-0.1.2-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyqurl-0.1.2.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.5

File hashes

Hashes for pyqurl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 ae9f1306d8021aca6b7ef72a6a96d6d9624a7ba38e52796d8e4c633e41e8e68d
MD5 cd332bfbda8fc8b3112637673a3e6a51
BLAKE2b-256 32fc90c23051369de19d006057fcb18511d6ea377477b534649768320c42c2c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqurl-0.1.2-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

Hashes for pyqurl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 436f24522d4b5701d3b70388b4afc9d6d69c2f5eb34db595234e0010cc9bb13e
MD5 aa1875f2ab1a47f7ef1cfd63b7aad1c3
BLAKE2b-256 d89ed642057a27d2e5d5e83f12d09f2c4ce8e3d37df35819a82c25202d12fef8

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