Skip to main content

An SQL interface for your everyday data

Project description

Querify

Build Status

Querify is a CLI tool that provides SQL interface for data sources. It is useful for data manipulation using a standard interface for various data sources, and provides an SQL features that allows to query the data in a more convenient way, like WHERE, GROUP BY, ORDER BY and LIMIT.

Installation

Use the package manager pip to install foobar.

pip install sql-querify

Usage

qy <query>

Examples

List all tables

qy "SHOW tables"
table_name
dirs
files
processes

Describe a table

qy "DESC processes"
field_name data_type
pid int
name str
cmdline str
status str
username str
cpu_pct float
memory_pct float
create_time datetime

Count processes by username

qy "SELECT username, COUNT(1) AS count FROM processes GROUP BY username ORDER BY count DESC"
username count
user1 443
root 215

Top 5 directories by size

qy "SELECT name, size_in_bytes/1024/1024 AS size_mb FROM dirs ORDER BY size_mb DESC LIMIT 5"
name size_mb
pydantic_core 4
chardet 1
distlib 1
_vendor/rich/pycache 1
pip/_vendor/chardet 1

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

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

sql_querify-0.1.2.tar.gz (17.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sql_querify-0.1.2-py3-none-any.whl (20.5 kB view details)

Uploaded Python 3

File details

Details for the file sql_querify-0.1.2.tar.gz.

File metadata

  • Download URL: sql_querify-0.1.2.tar.gz
  • Upload date:
  • Size: 17.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1023-azure

File hashes

Hashes for sql_querify-0.1.2.tar.gz
Algorithm Hash digest
SHA256 dce1a875893ec36c3ac12e0404df980685eb9e4e76e6b1ea18f4232d663f6b5a
MD5 656d0214bf711c35abef481bd4c41870
BLAKE2b-256 7a770ccd164660a0f22eb0954970c3b927efbe610aa4c13afdca38c648ec0425

See more details on using hashes here.

File details

Details for the file sql_querify-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sql_querify-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 20.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Linux/6.5.0-1023-azure

File hashes

Hashes for sql_querify-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0df7e04e5c92a4c3184814c5874ae3fa1a490bef5a7b2b5e47c4a84904d7fdc2
MD5 aba4eba85d10620f08b99bb2c63e1e75
BLAKE2b-256 b9958beabe92a522f6bc9ebd83dc66bc4a0fe81faa30d10499f0e3cfc1e6309b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page