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.1.tar.gz
(336.5 kB
view hashes)
Built Distributions
Close
Hashes for prql_python-0.9.1-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d99bc060f88bd46043bbcce1f2fbb5392d0b6c717279981708a8ddb5b9873c6 |
|
MD5 | 17ec5b5e934103031ddb9504cd6f0038 |
|
BLAKE2b-256 | aa3c763ea5e864b95e548333706ba39ab15f8062c7ff2e2e000c7ed92bab84d5 |
Close
Hashes for prql_python-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8676efcb22a65cc014500300024bb6b7d564d6f852917f83006f60e423ff6362 |
|
MD5 | 01d682b73ca31557029d226767ce8b13 |
|
BLAKE2b-256 | ec66b9b489406532c1c81fc25975459dbf36c61567ac34d382579288de29e73c |
Close
Hashes for prql_python-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abc33f6797dd17ae93d1c94a1a59f2eb90b6d234856729e4165e171ca1d1346 |
|
MD5 | 48d17a2b50e92da522b8570dd964c102 |
|
BLAKE2b-256 | 1c6ff9462007c23f3b57462dfa68bb45d6e852576fc360a940b11b7f95862b2a |
Close
Hashes for prql_python-0.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2d6207abc0c9a9f10bfbb6b03818f01c7d0d5a54f8b204ab1c90eb2735c5daf |
|
MD5 | de275c6cc078eee2017ce98950f94ae0 |
|
BLAKE2b-256 | 181425ae941579102ce2b43f8169cf717b07c7a64da54313cddaf262404c8103 |