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.0.tar.gz
(342.7 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.10.0-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb02d566a9b2cb78d4bb3735bc1b486482d4b9d998f51159483cf51f299309e |
|
MD5 | 5d995e52739d7b32f88f728ca9937741 |
|
BLAKE2b-256 | 001d81dffb505c5dbf9fbd52a24ccb5d598560e0792d8e89975eb25af94a31fb |
Close
Hashes for prql_python-0.10.0-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1932c437c01f18713edb881f1b924b3cedce7e1cbce7e092986be2b524687e54 |
|
MD5 | bf825711afdb384872b0c3db4a1a6406 |
|
BLAKE2b-256 | f338c7537588af01f000212e8577e3ea72b0f1ca554e7349357be287807dde83 |
Close
Hashes for prql_python-0.10.0-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30be3de908c7055ff7eb7853b3f8943629552eaacafff00c5e984d3276cb0af4 |
|
MD5 | e5f92c2f61696378315d3ef05d02fcbe |
|
BLAKE2b-256 | f84c8f9bdd40ba2394b61400398d32b20bfe8c887fb9e30ff62309bb0cf5f09a |
Close
Hashes for prql_python-0.10.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 87dc877d0d2ee1263ba7a086ef7b219aa690769c84654993ce411e57cc5f252a |
|
MD5 | c9f83d9af4057dc83839022813bcc0c1 |
|
BLAKE2b-256 | f5ec73b0e4d269ba122a0d8c7ba9fb9b2cdc442b7ffad8d31b60f0cc938c0af8 |