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.7.tar.gz
(574.7 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.7-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f50983083e3701b320a18a7000ccd1201705207151f579effb1c6d682d6121e |
|
MD5 | a6a21ccfad9df520c712360fe8882690 |
|
BLAKE2b-256 | a2f3a939810a81d81bde92f79fc5719e8e2879af49e777958c0750be33810c22 |
Close
Hashes for prql_python-0.2.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0205e665a9b04351018e72dfcb0f01b249578eddf8cf988b9803359b9db0569f |
|
MD5 | 3bf6a0e5ca3895e2e09b329da093d419 |
|
BLAKE2b-256 | bb5551a9f40a2a64afa68d070d11f2e0af133fc5eb9687b0c257e49b878304f5 |
Close
Hashes for prql_python-0.2.7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ac8fac7d393c76e60bbaf85c7358a6aeb2312dcd79010e229e99834d5a1e57a |
|
MD5 | 2cd3219f76a4060b5f34825b8c8aeadf |
|
BLAKE2b-256 | 1ea71d511bbd103094288f97bc0991e5c1ef966ad435777a22e1ae774cd7c459 |