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.9.tar.gz
(574.8 kB
view details)
Built Distributions
File details
Details for the file prql_python-0.2.9.tar.gz
.
File metadata
- Download URL: prql_python-0.2.9.tar.gz
- Upload date:
- Size: 574.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95450e5ecf651b72a7da8c341f96679809cc7efec5b3e69a1db57eb0d2332caa |
|
MD5 | 4f7dfc209515679fa951a726aa647e4b |
|
BLAKE2b-256 | 9df6f639a8d23c0e374c12a6073a0d16e927f7f9996139aa01c4ff9caf5894d0 |
File details
Details for the file prql_python-0.2.9-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: prql_python-0.2.9-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 714.5 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a959f0196e567edd94036e047d95aecaef1fccdca45ced58b04cf5799c89f687 |
|
MD5 | 61918dc886fd2caca90b0d791ce92054 |
|
BLAKE2b-256 | a784d12c5931b6b58c66e34ef17139e45eb993cc406147f780968787cd666bc9 |
File details
Details for the file prql_python-0.2.9-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: prql_python-0.2.9-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.8 MB
- Tags: CPython 3.7+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.13.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c528e0a0d00df185fa5ada3d5b0f3018bbc9383e12d620f26ae7790a6905623c |
|
MD5 | 7cba3f6ad35160ec3e3272c78514d53c |
|
BLAKE2b-256 | e989be9db16067096e35838c2417daa48cdf390b2add24859a1a8143c294dca1 |
File details
Details for the file prql_python-0.2.9-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: prql_python-0.2.9-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.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39a3ddd845d8e8dbfdfde3fd5e8e46ad8c8c27cab7ed92805851b0d5de35abdf |
|
MD5 | f92628c35711dbd978d95e7cd4b97ff0 |
|
BLAKE2b-256 | c9f0e8b3538c790e0d63b4db5ca6e8f646448bc689a761c0a8d98819a2f85294 |