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

Uploaded Source

Built Distribution

pyqurl-0.1.6-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyqurl-0.1.6.tar.gz
  • Upload date:
  • Size: 7.0 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.6.tar.gz
Algorithm Hash digest
SHA256 81b40fb4bae52946403dc68f1c99ad09b4192c02e677d51578eb2c395fa9ce14
MD5 84d731eb34cf050da323371a0de4bd52
BLAKE2b-256 6857a93de94f72d6048b103fdfe684eb658ada0713f1f4289389c496bff6ed8e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyqurl-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 6.8 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 430f58bb74c8d8a8535f9b3c6ae40783f2e133e417f5305f7d88e710d77bf796
MD5 76f8f86c0c826174cf556869c478a534
BLAKE2b-256 a914c71e97fcdd66d0a6ceb699f62623a075fb60e4f0918544f1bed666c46220

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