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.3.tar.gz
(570.1 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2453a695128ccbd5deb56dea45cf9d2bdfd616cca810759c40f10429deb7f413 |
|
MD5 | ce2b3b887381f26ff0332f933fb09053 |
|
BLAKE2b-256 | 5170f05ff5c63228f8d19e4d4ca5ba019b9924daa0dd009d1dad2b629f591c5c |
Close
Hashes for prql_python-0.2.3-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ea0f6ee9f2470bc0b0446f91fb3404d1de4fbbe157b01c492f97e7e605f208f |
|
MD5 | 1a8d1363d3bb16071ea242a4c3023c11 |
|
BLAKE2b-256 | e935d725a2586bff2453c40d5d16b037b01affb90df01741f62849ba590b25a9 |
Close
Hashes for prql_python-0.2.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6003c5344313bd5a8b18ec71ff81e1e36444b8b214289776e177f0028ca118b9 |
|
MD5 | 39ba69b44d1df6db4ff44843e1fb9cca |
|
BLAKE2b-256 | de39e378d51108dc9ab7092306af9dc50083de98e36a3b65d13bcd4c529a4107 |