Skip to main content

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.org/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.

Metadata

Release files for prql-python 0.11.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prql-python 0.11.2
File Size Uploaded
prql_python-0.11.2.tar.gz 440.1 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for prql-python 0.11.2
File
prql_python-0.11.2-cp37-abi3-win_amd64.whl CPython 3.7 abi3 Windows x86-64 Details
prql_python-0.11.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.7 abi3 Linux glibc 2.17+ x86-64 Details
prql_python-0.11.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.7 abi3 Linux glibc 2.17+ ARM64 Details
prql_python-0.11.2-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.7 abi3 macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64), macOS 11.0+ ARM64 Details

Total release size: 15.9 MB

Release files / prql_python-0.11.2.tar.gz

Download URL prql_python-0.11.2.tar.gz
Size 440.1 kB
Tags Source
SHA-256 checksum
How to use checksums
79924121c1cf4ae3b96a23753851f84ec0bf69f84524867ab17875d4657cd7e9
BLAKE2b-256 checksum
How to use checksums
4afd4925e221ca85fdee1024a72db67a5caae2bfffe2cadad2ca467782ad19d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / prql_python-0.11.2-cp37-abi3-win_amd64.whl

Download URL prql_python-0.11.2-cp37-abi3-win_amd64.whl
Size 2.2 MB
Tags CPython 3.7 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
78bf105a542421251463b33e2026ffb9dca6cdf0cc8a2194734cc57558513192
BLAKE2b-256 checksum
How to use checksums
3cf2675108d49f39fa017abd6324bb49881646e1106a77bf6f7068a5ce969525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / prql_python-0.11.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL prql_python-0.11.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.0 MB
Tags CPython 3.7 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
8b3d2b3a0fc88f5b5f2d84ed625ee5636ca1d2f19c4c3c5ce0efd5e7b3dc25b5
BLAKE2b-256 checksum
How to use checksums
626c5a67c02f4cf12b830656b3719f53452d7a73aebcdddef43abf4e3af12665
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / prql_python-0.11.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL prql_python-0.11.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 4.0 MB
Tags CPython 3.7 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
7df71fb962c6fbd65bd28555f46a1d20d3b7c5aa684989c3351822e6d10e9228
BLAKE2b-256 checksum
How to use checksums
a72f4e5723a0e10999e452509ef349a0850ebc54dbe77fdf34299a25b43a2394
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release files / prql_python-0.11.2-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL prql_python-0.11.2-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 5.3 MB
Tags CPython 3.7 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
77472d54e40920012465170d2c18e55f968ef242051411f963358aa64fe8a707
BLAKE2b-256 checksum
How to use checksums
5ea362cf5378fd1fb153fda4aa8a101af65b1bd2f20462a35a1cb240cbb10afa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.4.0

Release history Release notifications | RSS feed

This release

0.11.2 This release

5 release files

0.11.1

5 release files

0.11.0

5 release files

0.10.1

5 release files

0.10.0

5 release files

0.9.5

5 release files

0.9.4

5 release files

0.9.3

5 release files

0.9.2

5 release files

0.9.1

5 release files

0.9.0

5 release files

0.8.1

3 release files

0.8.0

3 release files

0.7.1

3 release files

0.7.0

3 release files

0.6.1

3 release files

0.6.0

3 release files

0.5.2

3 release files

0.5.1

3 release files

0.5.0

3 release files

0.4.2

3 release files

0.4.1

3 release files

0.4.0

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.11

3 release files

0.2.9

4 release files

0.2.8

4 release files

0.2.7

4 release files

0.2.6

4 release files

0.2.5

4 release files

0.2.4

4 release files

0.2.3

4 release files

0.2.2

3 release files

0.2.0

5 release files

0.0.3

2 release files

0.0.2

4 release files

0.0.1

4 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page