No project description provided
Project description
Python bindings to prqlc
The prqlc-python
crate offer Rust bindings to the prqlc
Rust library,
published to a python package named prqlc
.
The main entry point is a Python method prqlc.compile(query: str) -> str
.
The package is consumed by pyprql & dbt-prql.
The crate is not published to crates.io; only to PyPI at https://pypi.org/project/prql-python/.
Installation
pip install prqlc
Usage
import prqlc
prql_query = """
from employees
join salaries (==emp_id)
group {employees.dept_id, employees.gender} (
aggregate {
avg_salary = average salaries.salary
}
)
"""
options = prqlc.CompileOptions(
format=True, signature_comment=True, target="sql.postgres"
)
sql = prqlc.compile(prql_query)
sql_postgres = prqlc.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
prqlc-0.11.3.tar.gz
(442.8 kB
view hashes)
Built Distributions
Close
Hashes for prqlc-0.11.3-cp37-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bbe0e6963dd27812821cff1cbe550e1a72cd772caa3675dbc48fafdfe5714e5 |
|
MD5 | 29da9994ac578a866e72da7a4ba6a36f |
|
BLAKE2b-256 | a1c720249006d438eb609855fed8e8eb5204122e1631810f85e6fd69708ae4ff |
Close
Hashes for prqlc-0.11.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e753641b3a2549a45bbfc9b33d9e783840cd300e29c6505671ca1360fa8078a |
|
MD5 | 7012a6d8a264763f527a1a8d69f77b5c |
|
BLAKE2b-256 | 002624656aa8b84b7e244a71629c354c2130f0de3616ad43f14e6e1c54fb0a58 |
Close
Hashes for prqlc-0.11.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4d692ef76261fbc5bfe1db8e99143301cf67529f66f1c2ee8060ad7850af9f7 |
|
MD5 | 2693a21d229ee75328cd31822686dcc6 |
|
BLAKE2b-256 | 6987594f06449bd107d21c7a3acbe61657fe0e229c8c8070fb8195883efdde79 |
Close
Hashes for prqlc-0.11.3-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13a2d1e3725bb10aeae698bb567d5b26048e9597e93fb72ce0931740c7c1bb4e |
|
MD5 | c0090d0a9f5513e77b7e7ae25f5f7549 |
|
BLAKE2b-256 | 4f4ac51390c6924abda5f32cd55a7123b8949de3353c87abb2a82aafd11ab1fc |