Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

qparser

A Query Parser

Build Status Package version

Usage

from qparser import query 
terms = query("bob AND alice")

Syntax

query = and | or | not | near | has | sequence | exact | token
and = query "AND" query | "{" query { query } "}"
or = query "OR" query | "[" query { query } "]"
not = "NOT" query | "!" query
has = "HAS" query
near = query "NEAR" query
sequence = query { query } | "(" query { query } ")"
exact = "'" query { query } "'" | '"' query { query } '"'
token = character { character }
character = ! ( "AND" | "OR" | "NOT" | "NEAR" | "HAS" | "!" | "{" | "}" | "(" | ")" | "[" | "]" | "'" | '"' | space )
space = " "

Examples

Query Matches
bob AND alice Bob sent a message to Alice
bob OR alice Alice received a message
bob NOT alice Bob sent a message
bob NEAR alice Bob and Alice corresponded
bob HAS movie Bob, Alice, and Carol went to the movies
bob AND alice AND carol Bob and Alice sent a message that Carol intercepted
a message AND alice Bob sent a message to Alice
[ bob alice ] AND carol Alice didn't send the message to Carol
bob sent AND alice received Bob sent a message that Alice received

Release files for qparser 0.1a3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for qparser 0.1a3
File Size Uploaded
qparser-0.1a3.tar.gz 4.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for qparser 0.1a3
File Interpreter ABI Platform
qparser-0.1a3-py3-none-any.whl Python 3 none any Details

Total release size: 9.8 kB

Release files / qparser-0.1a3.tar.gz

Download URL qparser-0.1a3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
356656cd11974f0aa4e9c21b53208ee8e7d4183390bd4b6fc201beb87ad47b7a
BLAKE2b-256 checksum
How to use checksums
83a072ffc5a68f84172347152c313d9bc8d12c4649c7b97aeb35a2f86f71ea11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release files / qparser-0.1a3-py3-none-any.whl

Download URL qparser-0.1a3-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e47e0acba8baa335f095c66671212cdeea2bec7b59bbdb27a6a200dddcdbcd43
BLAKE2b-256 checksum
How to use checksums
08649a135339af0d68fcdb7ebc84b750c8b3a85eee64e093ef16714e1278e8ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.9

Release history Release notifications | RSS feed

This release

0.1a3 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page