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
Built Distributions
File details
Details for the file prql_python-0.9.1.tar.gz
.
File metadata
- Download URL: prql_python-0.9.1.tar.gz
- Upload date:
- Size: 336.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6f09e389a0238baa4f61b5945fa00e91dbdd0efb7218c1b4fd7bc897f05f6d30 |
|
MD5 | 22aca7cb44ef2130d44011965ee6df8b |
|
BLAKE2b-256 | 24932dbd473083b834545c5803f83c8605b3c2a626012021e56633d96cfbeecd |
File details
Details for the file prql_python-0.9.1-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: prql_python-0.9.1-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 2.6 MB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d99bc060f88bd46043bbcce1f2fbb5392d0b6c717279981708a8ddb5b9873c6 |
|
MD5 | 17ec5b5e934103031ddb9504cd6f0038 |
|
BLAKE2b-256 | aa3c763ea5e864b95e548333706ba39ab15f8062c7ff2e2e000c7ed92bab84d5 |
File details
Details for the file prql_python-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: prql_python-0.9.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.2 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8676efcb22a65cc014500300024bb6b7d564d6f852917f83006f60e423ff6362 |
|
MD5 | 01d682b73ca31557029d226767ce8b13 |
|
BLAKE2b-256 | ec66b9b489406532c1c81fc25975459dbf36c61567ac34d382579288de29e73c |
File details
Details for the file prql_python-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
.
File metadata
- Download URL: prql_python-0.9.1-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.3 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1abc33f6797dd17ae93d1c94a1a59f2eb90b6d234856729e4165e171ca1d1346 |
|
MD5 | 48d17a2b50e92da522b8570dd964c102 |
|
BLAKE2b-256 | 1c6ff9462007c23f3b57462dfa68bb45d6e852576fc360a940b11b7f95862b2a |
File details
Details for the file prql_python-0.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: prql_python-0.9.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 5.8 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/1.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2d6207abc0c9a9f10bfbb6b03818f01c7d0d5a54f8b204ab1c90eb2735c5daf |
|
MD5 | de275c6cc078eee2017ce98950f94ae0 |
|
BLAKE2b-256 | 181425ae941579102ce2b43f8169cf717b07c7a64da54313cddaf262404c8103 |