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.
Installation
pip install prql-python
Usage
import prql_python as prql
prql_query = """
from employees
join salaries [emp_id]
group [emp_id, gender] (
aggregate [
avg_salary = average salary
]
)
join departments [dept_id]
"""
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.0.tar.gz
(73.4 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.2.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6014df63e5d1dc065781b909641498d7629b3d4cb71ce1b701d46dd62b41b34 |
|
MD5 | aa12f647ba8e98dafbf76a77d96b88ca |
|
BLAKE2b-256 | c506d395a7aaa864589803d681d50f1ab577bc00a8b3db67930f894cac224509 |
Close
Hashes for prql_python-0.2.0-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07fffca1e6e882b5fe0556006cdeece5ed31a6165ed6e2fd3d29ba2142bae4fe |
|
MD5 | 24f194152e2ee137c5a837360168ac2f |
|
BLAKE2b-256 | 40440cf85e5f8a430163c0a40ab1a84865dba0bb1511b594954ce1837bbaa4ed |
Close
Hashes for prql_python-0.2.0-cp37-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7f8edf87ccdac2456d8179259892994c5dde128cdda35976ff3820d65b60f3 |
|
MD5 | f752ad97d4b3fe300b58c75661a48817 |
|
BLAKE2b-256 | d8c289579fc9d6f2769911623edbe5903d3f576082c8335fa81759179edf06d1 |
Close
Hashes for prql_python-0.2.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d4a34a8b5aadbc6564151dc1089bd263de29b943cd3da77d32a13f218c9f387 |
|
MD5 | 45670a62968073d87cdec44ff6775b12 |
|
BLAKE2b-256 | 2aaebe6975c45e5e0fc21b32fcda7125c9948d3ca95b8d9a8e95832b78f5716d |