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.5.tar.gz
(572.9 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.5-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6cd822851b803dd93c0872f4e8004c8c753c553aa2d89cec66e8944a615af11 |
|
MD5 | 1486b7847e08f0e734c399c6ac7123a8 |
|
BLAKE2b-256 | 68407c40c08e48d78e242d6cd241bc962480050d0748dba218b9d2649a517acd |
Close
Hashes for prql_python-0.2.5-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7695128f216044b1ead2a38f194840f8918c691e30329ce9cb350d1cff45d299 |
|
MD5 | 58bf38483ab8f0719e3ff357a7842ab5 |
|
BLAKE2b-256 | 396910f6503799bffd693c135ca9195dcc450e5b164304997cdbbbd475e493c9 |
Close
Hashes for prql_python-0.2.5-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80756399614bce3b1d81b1b0a86f0f96e5519f672fdef033c0e01c30ce2bdf64 |
|
MD5 | e267041119d1c8e0d99affe5f8a31288 |
|
BLAKE2b-256 | cc192276df6725de107e7aa46985263ffb7b777838f81351dcb49331c55c4298 |