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.6.tar.gz
(574.5 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.6-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3314ca0e75d74716909ebe4991b28149668c07bfe7e01734313d7231186af384 |
|
MD5 | be46729c272501d550e39fc212613378 |
|
BLAKE2b-256 | bb1bef14c5f9c793fed44d5530a7be86c680e149663c8a5068b5be07973839e1 |
Close
Hashes for prql_python-0.2.6-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce197e4e5122139f6618325fbaea435e903d131296d9741b9c9a845afc5909a9 |
|
MD5 | 659f7291699ba00ba6de71fa66595294 |
|
BLAKE2b-256 | 0745fbb039b0284e3870399ea0ebba156ba7b3284a0dcd680370843042a0563e |
Close
Hashes for prql_python-0.2.6-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 616d092486d34c8bb467c4c45fe1a35ed9d7ba6dbdd10dcc5aae51670b9b2ccf |
|
MD5 | f73bcae471d1166267b795d7d1d63677 |
|
BLAKE2b-256 | f74d6ad0d06cfcbcb92ac9373577c81da9393073a6b77cfbd1d8f0959ca7a29d |