pyqql
Native Python bindings for QQL (parser, plan, execute) via PyO3.
Proposition
Write Qdrant operations as QQL instead of hand-built JSON. Same language as the
CLI and other SDKs: hybrid search, multitenancy (inject_filter + SHARD),
schema-as-code, REST or gRPC.
Install
pip install pyqql
Python 3.8+ (stable ABI wheels). REST + gRPC included.
Quick start
import pyqql
embedder = pyqql.HttpEmbedder(
endpoint="http://localhost:11434/v1/embeddings",
model="all-minilm:l6-v2",
dimension=384,
)
client = pyqql.Client("http://localhost:6333", embedder=embedder)
report = client.execute(
"QUERY TEXT 'cardiology' FROM medical_records USING dense LIMIT 5"
)
print(report) # ExecutionReport: ok, results[], succeeded, failed
# Isolation (always on untrusted QQL)
stmt = pyqql.parse("QUERY TEXT 'risks' FROM sec10k USING dense LIMIT 10")[0]
pyqql.inject_filter(stmt, "tenant_id", "=", "honeywell")
# Routing (custom sharding): prefer SHARD in QQL, or set after parse
# QUERY ... SHARD 'honeywell' LIMIT 10
stmt.shard_key = "honeywell"
client.execute(stmt)
API summary
| Export | Role |
|---|---|
Client(url, api_key=None, use_grpc=False, embedder=None) |
Execute against Qdrant |
HttpEmbedder(endpoint, model, dimension, api_key="") |
OpenAI-compatible embeddings |
parse / is_valid / tokenize |
Frontend |
inject_filter(query|Stmt, field, op, value) |
Host isolation (AST) |
Stmt.shard_key |
Same field as QQL SHARD '…' (get/set; no inject_shard_key) |
compile_query / explain |
Offline plan / REST projection |
execute / execute_async |
One-shot free functions |
inject_filter operators
Accepted: =, >, >=, <, <= (and aliases).
Rejected: !=, IN, … — write those in QQL or inject equality only.
Isolation vs routing
| Concern | API | Wire |
|---|---|---|
| Isolation | inject_filter / WHERE |
REST/gRPC Filter |
| Routing | SHARD '…' or stmt.shard_key |
REST shard_key / gRPC ShardKeySelector |
| Partition DDL | CREATE SHARD KEY '…' |
Admin shard-key API |
Execution report
{
"ok": True,
"results": [{"ok": True, "operation": "QUERY", "message": "…", "data": …}],
"succeeded": 1,
"failed": 0,
}
on_error="stop" (default) or "continue".
Docs
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyqql-0.2.0-cp38-abi3-win_amd64.whl.
File metadata
- Download URL: pyqql-0.2.0-cp38-abi3-win_amd64.whl
- Upload date:
- Size: 3.4 MB
- Tags: CPython 3.8+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e091c9f70a1402a5a5f43d55c77a2f16114a97da0b08b5fa09dbe8e0fdfb4dc2
|
|
| MD5 |
14a911e15c8add923621fede0e897eb7
|
|
| BLAKE2b-256 |
602f855599eb50ab79aa57f845b444e700129f403b75f743618a544cac617625
|
Provenance
The following attestation bundles were made for pyqql-0.2.0-cp38-abi3-win_amd64.whl:
Publisher:
release.yml on srimon12/qql-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqql-0.2.0-cp38-abi3-win_amd64.whl -
Subject digest:
e091c9f70a1402a5a5f43d55c77a2f16114a97da0b08b5fa09dbe8e0fdfb4dc2 - Sigstore transparency entry: 2306483840
- Sigstore integration time:
-
Permalink:
srimon12/qql-rs@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/srimon12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyqql-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyqql-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.8+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b98b5e99c4c94678b88721aa49b6cec1d472a8db0731b5b791896a0b34e54fc1
|
|
| MD5 |
7d5c1e5af6d4f1fc75346a3f1e95fb94
|
|
| BLAKE2b-256 |
fe29d9fefbf3ade140f0d18384271ab8656c513c4d5519cafe2fb4463fba3d83
|
Provenance
The following attestation bundles were made for pyqql-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl:
Publisher:
release.yml on srimon12/qql-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqql-0.2.0-cp38-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
b98b5e99c4c94678b88721aa49b6cec1d472a8db0731b5b791896a0b34e54fc1 - Sigstore transparency entry: 2306483689
- Sigstore integration time:
-
Permalink:
srimon12/qql-rs@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/srimon12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyqql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyqql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.8+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ab123620d3d9444b99fd1a7c5b5373ede0c0112e8f6c2da9ebbe150111380aa
|
|
| MD5 |
08e125cce3e198f3911874d5a6b47002
|
|
| BLAKE2b-256 |
9f191542190c84e3eb4bb336e0629de7c53b4167bf11a1e0ea06ad9daf1fe0ac
|
Provenance
The following attestation bundles were made for pyqql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl:
Publisher:
release.yml on srimon12/qql-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqql-0.2.0-cp38-abi3-macosx_11_0_arm64.whl -
Subject digest:
7ab123620d3d9444b99fd1a7c5b5373ede0c0112e8f6c2da9ebbe150111380aa - Sigstore transparency entry: 2306483800
- Sigstore integration time:
-
Permalink:
srimon12/qql-rs@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/srimon12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyqql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pyqql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 3.1 MB
- Tags: CPython 3.8+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a8b48449edc1e66109650440a5c9d77d034b9c8d6b66aae028db802a6ab1a0a
|
|
| MD5 |
95cf3026bb0432095a41cac5c69b02fe
|
|
| BLAKE2b-256 |
1f06b57bfbf9e81bee539fc20b6be75a8d493188273f6d5f22b7118bac456d05
|
Provenance
The following attestation bundles were made for pyqql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl:
Publisher:
release.yml on srimon12/qql-rs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyqql-0.2.0-cp38-abi3-macosx_10_12_x86_64.whl -
Subject digest:
3a8b48449edc1e66109650440a5c9d77d034b9c8d6b66aae028db802a6ab1a0a - Sigstore transparency entry: 2306483733
- Sigstore integration time:
-
Permalink:
srimon12/qql-rs@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/srimon12
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@c1c2bf2c149eae54cb88a83ab0b0b317ef505439 -
Trigger Event:
push
-
Statement type: