Pure Python PartiQL Parser
Project Links
Meta
Author: Bert Blommers
Classifiers
Development Status
- 4 - Beta
Intended Audience
- Developers
Programming Language
- Python :: 3
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
Topic
- Software Development :: Libraries
py-partiql-parser
A tokenizer/parser/executor for the PartiQL-language, in Python.
Much beta, such wow. Feel free to raise any issues you encounter.
S3 Usage
import json
from py_partiql_parser import S3SelectParser
original_json = json.dumps({"a1": "b1", "a2": "b2"})
parser = S3SelectParser(source_data={"s3object": original_json})
result = parser.parse("SELECT * FROM s3object")
DynamoDB Usage
import json
from py_partiql_parser import DynamoDBStatementParser
parser = DynamoDBStatementParser(source_data={"table1": {"a1": {"S": "b1"}, "a2": {"S": "b2"}}})
result = parser.parse("SELECT * from table1 WHERE a1 = ?", parameters=[{"S": "b1"}])
Meat
The important logic of this library can be found here: https://github.com/bblommers/py-partiql-parser/blob/main/py_partiql_parser/_internal/parser.py
It is implemented as a naive, dependency-free, TDD-first tokenizer.
Outstanding
- Support for functions such as
count(*) - Support for CSV conversion. A start has been made in
_internal/csv_converter.py - .. and I'm sure many other things.
Notes
The first iteration of this library was based on the spec, found here: https://partiql.org/assets/PartiQL-Specification.pdf
AWS doesn't follow its own spec though, most notably:
- a file containing a list (with multiple JSON documents) cannot be queried normally (
select *returns everything, but you cannotselect keyfor each document in the list) select valuesis not supported
Security contact information
To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.
0.6.3
Oct 18, 2025
0.6.2
Oct 15, 2025
0.6.1
Dec 25, 2024
0.6.0
Dec 25, 2024
0.5.6
Sep 06, 2024
0.5.5
May 11, 2024
0.5.4
Apr 05, 2024
0.5.3
Apr 05, 2024
0.5.2
Mar 23, 2024
0.5.1
Feb 01, 2024
0.5.0
Dec 17, 2023
0.4.2
Oct 29, 2023
0.4.1
Oct 22, 2023
0.4.0
Oct 15, 2023
0.3.8
Oct 05, 2023
0.3.7
Aug 01, 2023
0.3.6
Jul 30, 2023
0.3.5
Jul 19, 2023
0.3.4
Jun 13, 2023
0.3.3
May 29, 2023
0.3.2
May 28, 2023
0.3.1
May 25, 2023
0.3.0
Apr 16, 2023
0.2.1
Apr 13, 2023
0.2.0
Apr 13, 2023
0.1.0
Mar 20, 2023
0.0.1
Mar 19, 2023