Skip to main content

No project description provided

Project description

prql-python

prql-python exposes the prql-compiler rust package via the python method to_sql(query:str)->str

Installation

pip install prql-python

Usage

import prql_python as prql
prql_query = '''
    from employees
    join salaries [emp_no]
    aggregate by:[emp_no, gender] [
      emp_salary: average salary
    ]
    join departments [dept_no]
'''
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


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.0.2.tar.gz (51.5 kB view details)

Uploaded Source

Built Distributions

prql_python-0.0.2-cp37-abi3-win_amd64.whl (506.7 kB view details)

Uploaded CPython 3.7+ Windows x86-64

prql_python-0.0.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl (1.5 MB view details)

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

prql_python-0.0.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl (1.3 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.0.2.tar.gz.

File metadata

  • Download URL: prql_python-0.0.2.tar.gz
  • Upload date:
  • Size: 51.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/0.12.12

File hashes

Hashes for prql_python-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2b70ccdb99cd47b26b9b54836d7bc9b3edc37d554befb406efc39b78fac7e41b
MD5 32cf443cb2074279a404bf10ff81705e
BLAKE2b-256 f7e8438135ac69c730a230175a3610cff17d5c5023de010776f28713c2684f38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for prql_python-0.0.2-cp37-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 04bbb41e9b7dc6b4727972c8bc27e3b00fdbf42a842184c6cebf4cda9b47dcac
MD5 641a5886e17ea538dfff0682c9b23b65
BLAKE2b-256 9791db4090667f85e218584a0092c6da82d1956495d4531260a0c96548a7ca6a

See more details on using hashes here.

File details

Details for the file prql_python-0.0.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl.

File metadata

File hashes

Hashes for prql_python-0.0.2-cp37-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8edb43675d7bd0d3441db9bb6b11ad069d0d9cef6a79d1424a6a175071aaedd8
MD5 8085980d2e4375758ac1df7e7232c286
BLAKE2b-256 dd2185df9afb57d82cc9b3d7382e888d420a2f91316406b82ba74b3f0a5c63bd

See more details on using hashes here.

File details

Details for the file prql_python-0.0.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.0.2-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dd05004a53aa6e53287663fd26abaa919b2938029d5667f27489b495ac83da0c
MD5 3c98bccb5af8d42dba852cd35b754e15
BLAKE2b-256 8d4fd4170d87b9eadf09b0b647718a09219feaf148f83b6ea27180e30cb942ea

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