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 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.2.11-cp37-abi3-win_amd64.whl
.
File metadata
- Download URL: prql_python-0.2.11-cp37-abi3-win_amd64.whl
- Upload date:
- Size: 731.1 kB
- Tags: CPython 3.7+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/0.14.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e6037da977aa0727d31c1224c0f68f69e530aea423f0f36db884ff0b81d0686 |
|
MD5 | aa48d15bff9d039edc5cf8617726efda |
|
BLAKE2b-256 | 7e5eb854c3ad2aee765973c5906ecacae5d0fad382dd485cdbd59355fd982ab0 |
Provenance
File details
Details for the file prql_python-0.2.11-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: prql_python-0.2.11-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.14.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83426c414abe8e3f0bc79ecd82265980f49e04cb4dc368290416dfe6ea7a5805 |
|
MD5 | dc2285630dc73f118fa166a4f4d05c8f |
|
BLAKE2b-256 | e8d69ecd1928e730b73d6776626961fb5a9c16a738db64d7e7e6b49a9bad03b8 |
Provenance
File details
Details for the file prql_python-0.2.11-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
.
File metadata
- Download URL: prql_python-0.2.11-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.14.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6a01d8263a859dde97aa7aa1f2ce83c9a7ec2e2200e33809b4904ef7d54f02b |
|
MD5 | 24151d6a0068a0e55811142408979504 |
|
BLAKE2b-256 | 73b9fd3a50411cad931080ab81401d41662a50ebdc22dc1f722e687932b6e0d7 |