Skip to main content

A Text User Interface for DuckDB

Project description

harlequin

A Terminal-based SQL IDE for DuckDB.

harlequin TUI

(A Harlequin is also a pretty duck.)

harlequin 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 that pipx 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

harlequin-0.0.10.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

harlequin-0.0.10-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file harlequin-0.0.10.tar.gz.

File metadata

  • Download URL: harlequin-0.0.10.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.11 Linux/5.15.0-1037-azure

File hashes

Hashes for harlequin-0.0.10.tar.gz
Algorithm Hash digest
SHA256 5bdfe6a8b358cc6f2426dbfbc342f8469b1cf276c3d86d4296b35aa756b7679b
MD5 99a519797312e847e449da976014e77e
BLAKE2b-256 8c628ca251bce5f25bbe9a29f4a4aa9cd2ea97b9c3fb107eaf2e772484d83406

See more details on using hashes here.

File details

Details for the file harlequin-0.0.10-py3-none-any.whl.

File metadata

  • Download URL: harlequin-0.0.10-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.11 Linux/5.15.0-1037-azure

File hashes

Hashes for harlequin-0.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 8e2c34f08bad62bd10a36e97b95023b8dc69c3eca7d09d07e307b06a52a3d140
MD5 1f1efef07fb6dcc180f4780a908726db
BLAKE2b-256 c6ad78d9ff0c512f6238ad67ba5f12e10925f760916856b55d7ceff420384eab

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