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.4.tar.gz
(572.7 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.4-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75530d333c046cd54f373bdee89ac6d9b4efa34e70b39b8609942b596ab1100e |
|
MD5 | 4fb992c1571896f253db00f2ce2f3dd8 |
|
BLAKE2b-256 | d91d9ef02b82d73780a57e7749bc7a1e620dd82c2b14baca4a72e0ea4cfcf21f |
Close
Hashes for prql_python-0.2.4-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39312822fb78e0f8cc140f26b35018c923cba69ea2b23de9a99afa2214f2d048 |
|
MD5 | 67d329eed9980b696a359f32b80af697 |
|
BLAKE2b-256 | ea7305da0f18c43161dcda491994931a318cd2abb21653972e5a0a0e3f9ccd40 |
Close
Hashes for prql_python-0.2.4-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d901e8e21ba707529b0a8539a676604ea5ac1c5ee69a442d856c12a9d8b6d2d9 |
|
MD5 | 136e53da13de1ce0bebdd8c625bdcd83 |
|
BLAKE2b-256 | a9f2abb0ce882f77b39c8468a563c51e52abdec661be6517c4c4a36cef54db90 |