No project description provided
Project description
prql-python
prql-python
offers rust bindings to the prql-compiler
rust library. It
exposes a python method to_sql(query: str) -> str
.
This is consumed by PyPrql & dbt-prql.
The crate is not published to crates.io; only to PyPI.
Installation
pip install prql-python
Usage
import prql_python as prql
prql_query = """
from employees
join salaries [emp_id]
group [dept_id, gender] (
aggregate [
avg_salary = average salary
]
)
"""
sql = prql.to_sql(prql_query)
Relies on pyo3 for all the magic.
#[pyfunction]
pub fn to_sql(query: &str) -> PyResult<String> {}
fn prql_python(_py: Python, m: &PyModule) -> PyResult<()> {}
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.2.7.tar.gz
(574.7 kB
view details)
Built Distributions
File details
Details for the file prql_python-0.2.7.tar.gz
.
File metadata
- Download URL: prql_python-0.2.7.tar.gz
- Upload date:
- Size: 574.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e87803c2cf9082a48addbd63d5646015cc5ec6ae0d9ae0521b4db0e39620821 |
|
MD5 | 3a04171f4ea801fffe12d6f7c2f4318f |
|
BLAKE2b-256 | 246bbc4b3a02156f15f003955ffb682861ef4e5ed976ceb4641f7bdbfcd4501d |
File details
Details for the file prql_python-0.2.7-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: prql_python-0.2.7-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 713.7 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f50983083e3701b320a18a7000ccd1201705207151f579effb1c6d682d6121e |
|
MD5 | a6a21ccfad9df520c712360fe8882690 |
|
BLAKE2b-256 | a2f3a939810a81d81bde92f79fc5719e8e2879af49e777958c0750be33810c22 |
File details
Details for the file prql_python-0.2.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
.
File metadata
- Download URL: prql_python-0.2.7-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.7+, manylinux: glibc 2.5+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0205e665a9b04351018e72dfcb0f01b249578eddf8cf988b9803359b9db0569f |
|
MD5 | 3bf6a0e5ca3895e2e09b329da093d419 |
|
BLAKE2b-256 | bb5551a9f40a2a64afa68d070d11f2e0af133fc5eb9687b0c257e49b878304f5 |
File details
Details for the file prql_python-0.2.7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: prql_python-0.2.7-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
- Upload date:
- Size: 1.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/0.13.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ac8fac7d393c76e60bbaf85c7358a6aeb2312dcd79010e229e99834d5a1e57a |
|
MD5 | 2cd3219f76a4060b5f34825b8c8aeadf |
|
BLAKE2b-256 | 1ea71d511bbd103094288f97bc0991e5c1ef966ad435777a22e1ae774cd7c459 |