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.3.tar.gz
(337.2 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.9.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c519bebbe446c9ca34d2bdaf2fa4c546c706a52ac76ba1c0d53a4a6035ce1c7 |
|
MD5 | b5aa2ef24c739844d83c527879dea51e |
|
BLAKE2b-256 | cc02a7e1355ce1bbe8b4cb76472232e98359fddb60298d4d89a7eff2d0a9abf6 |
Close
Hashes for prql_python-0.9.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98371e0f0bedbe6d8fc93acdd4c3a81db504bfe42ac976000216b30cb0314636 |
|
MD5 | b32f23308c51fefb2f0489dfe9493a24 |
|
BLAKE2b-256 | d2a0b820a811aeaa3585a2de117023258ec6ce5fc1a0ca27a325a280c904dc94 |
Close
Hashes for prql_python-0.9.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 909a389bbcc80a61a631ef79d90c0542bce6de69e0a5ff3be0ac252606d071b2 |
|
MD5 | 2479332aec8eccceaecc9ca7a3089b02 |
|
BLAKE2b-256 | 24349cf8266b11eb50de8fa32a930bc3f405b65b705c2aeb514f07319b074091 |
Close
Hashes for prql_python-0.9.3-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c328c69d467cd28060246403aeae7834e48dc1e220da9dc934161ccc05cdb3cd |
|
MD5 | 5eb102ed09601c03cab4ff661a7106af |
|
BLAKE2b-256 | b12c665dc6f69a461db6d1cf17d157e37e3760cad8270aa01191b4d92abcf3dc |