Skip to main content

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.

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
      ]
    )
"""

sql = prql.compile(prql_query)

Relies on pyo3 for all the magic.

Project details


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

prql_python-0.4.2-cp37-abi3-win_amd64.whl (1.8 MB view details)

Uploaded CPython 3.7+ Windows x86-64

prql_python-0.4.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ x86-64

prql_python-0.4.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (4.0 MB view details)

Uploaded CPython 3.7+ macOS 10.9+ universal2 (ARM64, x86-64) macOS 10.9+ x86-64 macOS 11.0+ ARM64

File details

Details for the file prql_python-0.4.2-cp37-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for prql_python-0.4.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 89728e6226ab7bd2e58fee8d0a7f81e417309e5e738c827ee90bd45438e68711
MD5 2fa0f2a4267d0aa1642e4995123e2da2
BLAKE2b-256 121df980f409f3ecc642034e2aad70e62b4fa45cdfb6ea4b2c521402b41fa2d9

See more details on using hashes here.

File details

Details for the file prql_python-0.4.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for prql_python-0.4.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 aeebe6f3bc0adc046689152580020c118b286da17c20739aa09334a12374854f
MD5 1be634c99e88e5b315f92353501936f5
BLAKE2b-256 212f83eff558ea68d7fb2f5aa51a71859dcc081f1c34f7010bd5398c7d71c186

See more details on using hashes here.

File details

Details for the file prql_python-0.4.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for prql_python-0.4.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 3a440eb41910e8a6d810f5d65c0e8b1123bb8db196407fe89ba3d99421511282
MD5 60623e82c5588124e213303c53277f9e
BLAKE2b-256 be3ac1eaf5c958b5deedb569d0aa3be0282eedcb681d3135d3958cdeed5e6757

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page