No project description provided
Project description
prql-python
prql-python
offers Rust bindings to the prql-compiler
Rust library. It
exposes a Python method compile(query: str) -> str
.
This is consumed by pyprql & dbt-prql.
The crate is not published to crates.io; only to PyPI at https://pypi-hypernode.com/project/prql-python/.
Installation
pip install prql-python
Usage
import prql_python as prql
prql_query = """
from employees
join salaries (==emp_id)
group {employees.dept_id, employees.gender} (
aggregate {
avg_salary = average salaries.salary
}
)
"""
options = prql.CompileOptions(
format=True, signature_comment=True, target="sql.postgres"
)
sql = prql.compile(prql_query)
sql_postgres = prql.compile(prql_query, options)
Relies on pyo3 for all the magic.
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
prql_python-0.11.1.tar.gz
(365.7 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.11.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eda4d204c0b6b9c44088d5978f4500aff116ca616ef13f29c3a542cae085d277 |
|
MD5 | 9accb41289c01faa3775b7eff1866479 |
|
BLAKE2b-256 | 0bc02f078bb85b753a4f10b1d3a14dc465a9fed41be3e6c63e1f3b9c05c06a52 |
Close
Hashes for prql_python-0.11.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48549105be16ef52c927b9228791ed4386af25a6d6ec25f39c66bc38e665fdb3 |
|
MD5 | 11e1937b045ea83e93e3ba8d5bb2cb7c |
|
BLAKE2b-256 | bbb51c5f5565eb6ad811c5bca80e17778271248ff1f8e26d74c61ebc8f4c6d79 |
Close
Hashes for prql_python-0.11.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f849fc51e5c19fc256b9fece835a6fe72834104034088c184aef9be0aec4b9bf |
|
MD5 | 66449027ca87cd8f99b0d6c5358a4b18 |
|
BLAKE2b-256 | 2f591b2358f3325548d9aae66dc17b9d99fe02c662eb9be88539122403074b06 |
Close
Hashes for prql_python-0.11.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 856537f99805e3ec664465487bb505dd33baf479525e7c24302600c8bd30f325 |
|
MD5 | 3cc37bc0c56901f4bee003538577a252 |
|
BLAKE2b-256 | 08c4d7f96491b86b81291e2eee4bec44818baeb73cc3fd28a899c8e8b8e9e7eb |