No project description provided
Project description
prql-python
prql-python
offers Rust bindings to the prql-compiler
Rust library. It
exposes a Python method compile(query: str) -> str
.
This is consumed by pyprql & dbt-prql.
The crate is not published to crates.io; only to PyPI at https://pypi-hypernode.com/project/prql-python/.
Installation
pip install prql-python
Usage
import prql_python as prql
prql_query = """
from employees
join salaries (==emp_id)
group {employees.dept_id, employees.gender} (
aggregate {
avg_salary = average salaries.salary
}
)
"""
options = prql.CompileOptions(
format=True, signature_comment=True, target="sql.postgres"
)
sql = prql.compile(prql_query)
sql_postgres = prql.compile(prql_query, options)
Relies on pyo3 for all the magic.
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.9.4.tar.gz
(338.2 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.9.4-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 86f4d91dcf2fa41f0c59622c2a11c5742c28b508cbfbc85c89024feb18196813 |
|
MD5 | 009b65278eda43012cbe675a10b98be2 |
|
BLAKE2b-256 | a6a5a62969e612400b4e0b22fe290f0dec17bc2ff60d55b6b7b934fd21d74e8b |
Close
Hashes for prql_python-0.9.4-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa24d6891d14cf6269cd1268831089919faaf03de2a3f081f453660af078c4f7 |
|
MD5 | 82b64e41400fa668c8f394c549c28909 |
|
BLAKE2b-256 | 3fd08628183f778bf4b20f333a0d6b8e16f5bf736db89f7d31afa476a95949fa |
Close
Hashes for prql_python-0.9.4-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9979610a75459438e70c51814945d2cea4ac2072f2f1a3c40ba0d483d9c5414 |
|
MD5 | 5a552b97bcaf2979987884f2acb7ebe1 |
|
BLAKE2b-256 | 6592c98e4fc8c0ea69d8fd7a0d596e791e4ec428a83d4214210b2fffb12e23d1 |
Close
Hashes for prql_python-0.9.4-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27d9dc3cb7b289efcbe4ba1ffa8560796ea869876da13e7a1161602b9efe571d |
|
MD5 | b63e904feb52966816c5503772764eab |
|
BLAKE2b-256 | 8ef62d9952b77e316c9045dad605e2f6b56376d2b20765eb6f11d95f47e1fdb1 |