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.5.tar.gz
(339.6 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.9.5-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5327cbc550032be7bcad1ecdebea04487227e47c944d832e5a2998263165e9c |
|
MD5 | 2c50b280209b9c114714a086acdd2128 |
|
BLAKE2b-256 | 64cf1423f917446a3c3fdfec4b3e3c514404e958bb53db7d460c58a7f45daa7d |
Close
Hashes for prql_python-0.9.5-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2856290eb8995728f5081bab0e80791b4a57eea70690668464ce3bdeca9b49af |
|
MD5 | 0c43acc5237d48464cb933b5cdc96f83 |
|
BLAKE2b-256 | 640e46a52be66ddcfb42f4c437d3d3e117487edf5e6a58234a11eb911d16dedb |
Close
Hashes for prql_python-0.9.5-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 072f040cc216389ed3ce9f1fde763ec25cfc609ec3554884ff850a8d02b6a61b |
|
MD5 | 1310edb354d5ea5706cb4de63bf76a30 |
|
BLAKE2b-256 | e60ea9ed6c3e5e39492b7d6b6ec1b6058590fd06c5a72f590ba604a693bb4723 |
Close
Hashes for prql_python-0.9.5-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9d13039f27b94c409e1da572e741764311a25557e33f1c9a350e6c06a76f38f |
|
MD5 | 9b058a18614f8505ad17bd9e8263b43b |
|
BLAKE2b-256 | ed19aefe6bb1bb73bef83dab0783e956550d43d246f1b334914d132b08a7974b |