Python TUI database client that supports prql
Project description
PyPrql
PyPRQL contains these tools:
- pyprql.pandas_accessor - Pandas integration for PRQL
- pyprql.magic - IPython magic for connecting to databases using
%%prql
- pyprql.cli - TUI for databases using PRQL
For docs, Check out the PyPRQL Docs, and the PRQL Book.
This project is maintained by @charlie-sanders and @rbpatt2019
Installation
pip install pyprql
Try out the Pandas integration
import pandas as pd
import pyprql.pandas_accessor
df = (...)
results_df = df.prql.query('select [age,name,occupation] | filter age > 21')
Try out the Jupyter Magic
In [1]: %load_ext pyprql.magic
In [2]: %prql postgresql://user:password@localhost:5432/database
In [3]: %%prql
...: from p
...: group categoryID (
...: aggregate [average unitPrice]
...: )
In [4]: %%prql results <<
...: from p
...: aggregate [min unitsInStock, max unitsInStock]
Try out the TUI
With a CSV file:
curl https://people.sc.fsu.edu/~jburkardt/data/csv/zillow.csv
pyprql zillow.csv
With a Database:
pyprql 'postgresql://user:password@localhost:5432/database'
PRQL> show tables
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 Distribution
pyprql-0.5.8.tar.gz
(21.0 kB
view details)
Built Distribution
pyprql-0.5.8-py3-none-any.whl
(23.6 kB
view details)
File details
Details for the file pyprql-0.5.8.tar.gz
.
File metadata
- Download URL: pyprql-0.5.8.tar.gz
- Upload date:
- Size: 21.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d351146f0ace9bd3dbb1e5258c7f418d46aa03f06ca8aa9c5c817424119349e |
|
MD5 | ecdca503e28b3d206cb587f24dde1ded |
|
BLAKE2b-256 | b5800a5ad05e3e48381f129771b568d1b949ee139c4adb69f4412261fc483a09 |
Provenance
File details
Details for the file pyprql-0.5.8-py3-none-any.whl
.
File metadata
- Download URL: pyprql-0.5.8-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.2 readme-renderer/37.3 requests/2.28.1 requests-toolbelt/0.10.1 urllib3/1.26.13 tqdm/4.64.1 importlib-metadata/5.1.0 keyring/23.11.0 rfc3986/2.0.0 colorama/0.4.6 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 838d16742279f080510d244e4a67ebefc4c8f47185f2d8b9febeba172d9d1e4c |
|
MD5 | 509f34c61ad72a65b1fd204879fceef7 |
|
BLAKE2b-256 | efe0b2b655b90a7863f3b73b2259013b392f6bf5e8b4ca50abe31c262ff16d01 |