Skip to main content

No project description provided

Project description

Python bindings to prqlc

The prqlc-python crate offer Rust bindings to the prqlc Rust library, published to a python package named prqlc.

The main entry point is a Python method prqlc.compile(query: str) -> str.

The package 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 prqlc

Usage

import prqlc

prql_query = """
    from employees
    join salaries (==emp_id)
    group {employees.dept_id, employees.gender} (
      aggregate {
        avg_salary = average salaries.salary
      }
    )
"""

options = prqlc.CompileOptions(
    format=True, signature_comment=True, target="sql.postgres"
)

sql = prqlc.compile(prql_query)
sql_postgres = prqlc.compile(prql_query, options)

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 Distribution

prqlc-0.11.3.tar.gz (442.8 kB view details)

Uploaded Source

Built Distributions

prqlc-0.11.3-cp37-abi3-win_amd64.whl (2.2 MB view details)

Uploaded CPython 3.7+ Windows x86-64

prqlc-0.11.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.0 MB view details)

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

prqlc-0.11.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.0 MB view details)

Uploaded CPython 3.7+ manylinux: glibc 2.17+ ARM64

prqlc-0.11.3-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl (5.3 MB view details)

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

File details

Details for the file prqlc-0.11.3.tar.gz.

File metadata

  • Download URL: prqlc-0.11.3.tar.gz
  • Upload date:
  • Size: 442.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for prqlc-0.11.3.tar.gz
Algorithm Hash digest
SHA256 da7a87086b11a7503c7dae2403bc62279e76950addcfbfde90e48532cbe78ee7
MD5 a048e825b5eb1cf47c2b2643dbab94d6
BLAKE2b-256 f30308af302a6df3201ec41db6a3c5376ba712a1345fab7d1878abbfeb1483de

See more details on using hashes here.

File details

Details for the file prqlc-0.11.3-cp37-abi3-win_amd64.whl.

File metadata

  • Download URL: prqlc-0.11.3-cp37-abi3-win_amd64.whl
  • Upload date:
  • Size: 2.2 MB
  • Tags: CPython 3.7+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.4.0

File hashes

Hashes for prqlc-0.11.3-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0bbe0e6963dd27812821cff1cbe550e1a72cd772caa3675dbc48fafdfe5714e5
MD5 29da9994ac578a866e72da7a4ba6a36f
BLAKE2b-256 a1c720249006d438eb609855fed8e8eb5204122e1631810f85e6fd69708ae4ff

See more details on using hashes here.

File details

Details for the file prqlc-0.11.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for prqlc-0.11.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9e753641b3a2549a45bbfc9b33d9e783840cd300e29c6505671ca1360fa8078a
MD5 7012a6d8a264763f527a1a8d69f77b5c
BLAKE2b-256 002624656aa8b84b7e244a71629c354c2130f0de3616ad43f14e6e1c54fb0a58

See more details on using hashes here.

File details

Details for the file prqlc-0.11.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for prqlc-0.11.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 b4d692ef76261fbc5bfe1db8e99143301cf67529f66f1c2ee8060ad7850af9f7
MD5 2693a21d229ee75328cd31822686dcc6
BLAKE2b-256 6987594f06449bd107d21c7a3acbe61657fe0e229c8c8070fb8195883efdde79

See more details on using hashes here.

File details

Details for the file prqlc-0.11.3-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl.

File metadata

File hashes

Hashes for prqlc-0.11.3-cp37-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 13a2d1e3725bb10aeae698bb567d5b26048e9597e93fb72ce0931740c7c1bb4e
MD5 c0090d0a9f5513e77b7e7ae25f5f7549
BLAKE2b-256 4f4ac51390c6924abda5f32cd55a7123b8949de3353c87abb2a82aafd11ab1fc

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