Terminal based SQL client for local data
Project description
LoQL
LoQL is a command line sql client for individual data files, allowing these to be queried (even joined) and viewed. It natively supports CSV, parquet and other formats.
Data Formats
The following file types can be opened as views in LoQL:
- csv
- parquet(.gz)
- json(l)
- xls(x)
- clipboard
- ...
Usage
This package can be installed with:
pipx install loql
and executed via:
loql
Arguments
If a filename is supplied as an argument to LoQL then it will open the data file as a view.
If a directory is supplied then the open file view will start in that location.
For example:
loql data/iris.csv
The contents of the clipboard can be converted into a view (e.g. after copying from Google Sheets), using the --clipboard
argument:
loql --clipboard
Advanced Usage
New views can be created from an opened file. For example if iris.csv
was opened as the view iris
, then we could create a new view:
create view iris_variety as (
select
variety,
avg("petal.length") as avg_petal_length
from iris
group by variety
)
Views can be joined together, for example:
select * from iris natural join iris_variety
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
Built Distribution
File details
Details for the file loql-1.0.0.tar.gz
.
File metadata
- Download URL: loql-1.0.0.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf239ec868e42e32a8cf115eba2b8886321df8f8b74de0acfe1db2bd9a5533f4 |
|
MD5 | f0609b1f4a12bb4c7cb8ca5e1cb873c0 |
|
BLAKE2b-256 | 611b572161c1cb51b38f7d37e9a8c3dde0d7906fda32b30e75f81652b957cae6 |
File details
Details for the file loql-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: loql-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b6f6414f41e889f76f94e265a49747636f0ea09ece06fb9f3561927cbbafb1f |
|
MD5 | 62382b47d82f038afaa4ff42dcbb4a02 |
|
BLAKE2b-256 | 0539d5ae0103cdbf86f74655847dfc2cc2adb171a32776389fdb0553284f67b2 |