Skip to main content

Python TUI database client that supports prql

Project description

PyPrql

Project Status: Active – The project has reached a stable, usable state and is being actively developed. PyPI - License PyPI PyPI - Python Version

Documentation Status Discord GitHub contributors GitHub Repo stars

CI/CD codecov

Codestyle: Black Imports: isort

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


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.9.tar.gz (20.9 kB view hashes)

Uploaded Source

Built Distribution

pyprql-0.5.9-py3-none-any.whl (23.6 kB view hashes)

Uploaded Python 3

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