Query Parser
Project description
qparser
Query Parser
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 |
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
qparser-0.1a1.tar.gz
(4.7 kB
view details)
Built Distribution
File details
Details for the file qparser-0.1a1.tar.gz
.
File metadata
- Download URL: qparser-0.1a1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 618bbb01a4a461abac408684e0f70cce587693d933636307a65dfbd2110a738a |
|
MD5 | 648f9b56ade773b379db73bc880035ad |
|
BLAKE2b-256 | be11ebb5be9cd43f8993996067393794c87169f4e55caf53ee3306a15bca8d2d |
File details
Details for the file qparser-0.1a1-py3-none-any.whl
.
File metadata
- Download URL: qparser-0.1a1-py3-none-any.whl
- Upload date:
- Size: 4.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62d0d7ab0e291e24f50bcfb169c36a71861b9b7aee72bb91556afe79c038fd7d |
|
MD5 | 5a495083d8aad6f35a2bc7b203af9043 |
|
BLAKE2b-256 | 7a9a3da36e83cbd49fa35726e7bd110fb844537ce2c5be2d88bba11897bd0674 |