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.9.2.tar.gz
(336.4 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.9.2-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4598ad722f048a25a29a85aeee8dcb1e046c85af06825cfe90d003d750354583 |
|
MD5 | e96c92e0ac45955f488519d99b7edda9 |
|
BLAKE2b-256 | 6080a615805ac22077060f4826999b846cb89c93132d2c6d002540eabb80bef7 |
Close
Hashes for prql_python-0.9.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 550d1832d850b8d40393a89ed62043a1ad924e80be21170fa6a2908134a6e74e |
|
MD5 | 83cd035350084d2724797718d3a3fede |
|
BLAKE2b-256 | 24f7dec62f910f797007ed3eb08a5d6119d5a7ddb03c5b4dbfceade80d589721 |
Close
Hashes for prql_python-0.9.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d90ade324bf2b5aa1b95de71551bd2ee29fc377f553695d8d9d78fd8575e8a3 |
|
MD5 | b37234b26b73f5a197a4c32143862dd2 |
|
BLAKE2b-256 | 1fc786261a5545b73a4280375d5aef0ee92ee16302cff6dc6518b9637e626dfe |
Close
Hashes for prql_python-0.9.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0da87163da01646820bc4a460403c667d19e66c7b4c946ce8279d434fefb649e |
|
MD5 | 509ae6f64282350e658440fb391b1374 |
|
BLAKE2b-256 | b60c710828249738e1cc6b92af7531c83ded678db79725a80c68f116a47439e3 |