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.10.1.tar.gz
(345.5 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.10.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 103873186ac8869bfc2bf2b1a0582d3937ec4bce0be672b1bf2246b2b94eb1b6 |
|
MD5 | cb7d70a7ab5a080bbdc0b488c13a85c1 |
|
BLAKE2b-256 | a5ca32dd029d289a14ecc7ff9cc4ee51570316979f43dd3c01832ebc071704f4 |
Close
Hashes for prql_python-0.10.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a886799829dc741070d44a77ca7d6563709bbf1a903051fef3af76e438fd726 |
|
MD5 | 8d11f724ead8c7ca866d95c9c9482ee0 |
|
BLAKE2b-256 | af5c1a940ffbe6dc1501dbfec6555329966ca833081d48773fa40cdf75456fb4 |
Close
Hashes for prql_python-0.10.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 428123feb0fae24c80eaf5b9647505c770f3dcc5457db53536fcf97c85ae6de4 |
|
MD5 | c5403091a846f610bff45efd20d5e04f |
|
BLAKE2b-256 | 84f06c6df028f0d17ec0593b0da1723445c8d07b75956434f7efdb179ea9d37c |
Close
Hashes for prql_python-0.10.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 668d5b270448990a979899202692354491996195749b926c3efadd189884354b |
|
MD5 | 5b27bb7a912388f7d84c838e60c21b7d |
|
BLAKE2b-256 | e7c99d4675b4bcf52b7c557e0f8c97a3232cb4572c856766e995baaf7c217096 |