A Text User Interface for DuckDB
Project description
harlequin
A Terminal-based SQL IDE for DuckDB.
(A Harlequin is also a pretty duck.)
Installing Harlequin
After installing Python 3.8 or above, install Harlequin using pip
or pipx
with:
pipx install harlequin
Tip:
You can run invoke directly with
pipx run
anywhere thatpipx
is installed. For example:
pipx run harlequin --help
pipx run harlequin ./my.duckdb
Using Harlequin
From any shell, to open a DuckDB database file:
harlequin "path/to/duck.db"
To open an in-memory DuckDB session, run Harlequin with no arguments:
harlequin
Viewing the Schema of your Database
When Harlequin is open, you can view the schema of your DuckDB database in the left sidebar. You can use your mouse or the arrow keys + enter to navigate the tree. The tree shows schemas, tables/views and their types, and columns and their types.
Editing a Query
The main query editor is a full-featured text editor, with features including syntax highlighting, auto-formatting with ctrl + `
, text selection, copy/paste, and more.
You can save the query currently in the editor with ctrl + s
. You can open a query in any text or .sql file with ctrl + o
.
Running a Query and Viewing Results
To run a query, press ctrl + enter
. Up to 50k records will be loaded into the results pane below the query editor. When the focus is on the data pane, you can use your arrow keys or mouse to select different cells.
Exiting Harlequin
Press ctrl + q
to quit and return to your shell.
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
Hashes for harlequin-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c6583bb066b1950913e023267c4ca33a79b00624eee899271a267aec51682df |
|
MD5 | 023c8c3c0945c0459a8a4a4b6fe69090 |
|
BLAKE2b-256 | 5d4962721d147634f48d7a6ba6a316d45cbea61aa22ec94191373fa53a1f9be2 |