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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
File details
Details for the file prql_python-0.8.1-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: prql_python-0.8.1-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 2.2 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2dd2f8705aec3c318564d06a7d75333b0e4bfdb2cfbcc2a21ac2efe3bcfbb2f4 |
|
MD5 | f9b32209f330a76608e58b2042103438 |
|
BLAKE2b-256 | 3172776ab1a8541fdfd02873df7896d1f45521a1c7d133ca861988d5efa5163e |
File details
Details for the file prql_python-0.8.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: prql_python-0.8.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddbd51a956f8072c9dc009ae9602fe960f7e81410ae9704a2e923c44f4c7b606 |
|
MD5 | 04af7aa985caa8fcc2fa873e892e2074 |
|
BLAKE2b-256 | d0357105c88bf9dee4013ea6e5d217992d387bf0fc5ae5bc39ac6ef57db46bf1 |
File details
Details for the file prql_python-0.8.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: prql_python-0.8.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.7+, macOS 10.9+ universal2 (ARM64, x86-64), macOS 10.9+ x86-64, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f0bd1dff1d1dda2607572cb6073e3ed767c5a0c106983a73cdf1c2253c04c52 |
|
MD5 | d2ebdbed61fc15a76ed8753f89ba44c0 |
|
BLAKE2b-256 | c7410a8dedcf671566e197b9e8c25d356aa21f0dc2b1e1b0e39f8e1972eec6c5 |