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.
Metadata
Release files for py-partiql-parser 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| py_partiql_parser-0.6.3.tar.gz | 17.5 kB | Without provenance | Details for py_partiql_parser-0.6.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| py_partiql_parser-0.6.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for py_partiql_parser-0.6.3-py2.py3-none-any.whl |
Total release size: 41.2 kB
Release files / py_partiql_parser-0.6.3.tar.gz
| Download URL | py_partiql_parser-0.6.3.tar.gz |
|---|---|
| Size | 17.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09cecf916ce6e3da2c050f0cb6106166de42c33d34a078ec2eb19377ea70389a
|
|
BLAKE2b-256 checksum How to use checksums |
567aa0f6bda783eb4df8e3dfd55973a1ac6d368a89178c300e1b5b91cd181e5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Release files / py_partiql_parser-0.6.3-py2.py3-none-any.whl
| Download URL | py_partiql_parser-0.6.3-py2.py3-none-any.whl |
|---|---|
| Size | 23.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
deb0769c3346179d2f590dcbde556f708cdb929059fb654bad75f4cf6e07f582
|
|
BLAKE2b-256 checksum How to use checksums |
c933a7cbfccc39056a5cf8126b7aab4c8bafbedd4f0ca68ae40ecb627a2d2cd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Security for py-partiql-parser 0.6.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.