No project description provided
Project description
prql-python
prql-python
offers rust bindings to the prql-compiler
rust library. It
exposes a python method to_sql(query: str) -> str
.
This is consumed by PyPrql & dbt-prql.
The crate is not published to crates.io; only to PyPI.
Installation
pip install prql-python
Usage
import prql_python as prql
prql_query = """
from employees
join salaries [emp_id]
group [dept_id, gender] (
aggregate [
avg_salary = average salary
]
)
"""
sql = prql.to_sql(prql_query)
Relies on pyo3 for all the magic.
#[pyfunction]
pub fn to_sql(query: &str) -> PyResult<String> {}
fn prql_python(_py: Python, m: &PyModule) -> PyResult<()> {}
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.2.8.tar.gz
(574.8 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.8-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b39e0d90b0ab10e98364cd26c9b09761a0da378dba674c0514d72709b797706 |
|
MD5 | 60fb527531001b5170a1af585693b68a |
|
BLAKE2b-256 | dffb37af4737f864a08642bbe4499564a2b20829121da8877eb4afdd4a1afca8 |
Close
Hashes for prql_python-0.2.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 973f721d7232efb47196150f7914badefb7f28442828ef83eb51a0ab12d755b5 |
|
MD5 | 791a43da20dca9422c42a86606f94351 |
|
BLAKE2b-256 | cd8ea184f2f035eebec64b8cacfe9dd9ee10ea1495f9aa453bb5234b0f5f1a56 |
Close
Hashes for prql_python-0.2.8-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c3f78ff0710966705a97e1121d2df6e48b00be5219061b7587e901b25450efaf |
|
MD5 | a37339fe9a4bb915bb66f153519bf8c5 |
|
BLAKE2b-256 | 0d4ea4622ef7ee7fc195a65d6a1cb53682f01a6bb226f773a56c9726b03edcb0 |