Skip to main content

duckboard

File-first local SQL workspace for CSV, Parquet, PSV, and JSON — powered by DuckDB.

Load files once, query by name with plain SQL, export results. Terminal-native alternative to spinning up a notebook for quick file questions.

Status: Alpha — core functionality complete, PyPI release coming soon.

Install

pip install duckboard

Development install:

git clone https://github.com/OmUniyal/duckboard
cd duckboard
python -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e ".[dev]"

Quickstart

duckboard
duckboard> :load examples/sample.csv as sample
duckboard> SELECT color, COUNT(*) AS n FROM sample GROUP BY 1;
┌────────┬───┐
│ color  │ n │
├────────┼───┤
│ blue   │ 1 │
│ green  │ 1 │
│ red    │ 2 │
└────────┴───┘
(3 rows)
duckboard> :save results.csv
Saved 3 rows to results.csv
duckboard> :quit
Bye.

Supported file formats

Extension Format
.csv, .tsv CSV
.psv PSV (pipe-separated)
.parquet Parquet
.json, .jsonl, .ndjson JSON

REPL commands

Command Description
:load "path/to/file.ext" [as name] Load a file as a queryable table. Name defaults to filename stem.
:tables List all loaded tables with format and path.
:schema <table> Show column names, types, and nullability for a table.
:save "path/to/output.ext" [--csv|--parquet|--json] Save last query result to a file. Format auto-detected from extension; use flag to override.
:unload <table> Remove a loaded table from the session.
:pwd Show current working directory.
:quit / :q / exit / quit / Ctrl+D Exit duckboard.

Notes

  • Queries display a maximum of 50 rows in the terminal. Full results are always exported via :save.
  • Large exports (2,000+ rows) prompt for confirmation before writing.
  • On Windows, use forward slashes in paths: :load data/sales.csv not :load data\sales.csv.
  • Multi-line SQL is supported — statements execute on semicolon.

Project layout

src/duckboard/
├── session.py      # DuckboardSession — owns DuckDB connection + state
├── catalog.py      # Registered file → view mappings
├── repl.py         # Interactive REPL loop
├── commands.py     # :load, :tables, :schema, :save, :unload, :pwd
├── formatter.py    # Box-drawing table output for query results
├── cli.py          # CLI entry point
└── exceptions.py   # DuckboardError hierarchy

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

duckboard-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

duckboard-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file duckboard-0.1.0.tar.gz.

File metadata

  • Download URL: duckboard-0.1.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.9

File hashes

Hashes for duckboard-0.1.0.tar.gz
Algorithm Hash digest
SHA256 75f21765ca14126d7e4c64398db0b48f6f2093d366fea209e26fab711c765c39
MD5 f20bee18b17b7dd221a8a9cb5c71917f
BLAKE2b-256 bef368856ca02ebced88f0e576315206167b370258af57cda6823f139cd3f017

See more details on using hashes here.

File details

Details for the file duckboard-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: duckboard-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.9

File hashes

Hashes for duckboard-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2c126a911a561c4fe9fa511166e6c9d7a18e5c30165735855687aa418fced20c
MD5 449719739380c2dcac470e4d4ea27d65
BLAKE2b-256 ed19abcc575834ecf598cdedd820c84df3bdbfc4ed2de9ccc5db9f21165b53ce

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.0

2 files

This release

0.1.0 This release

2 files

Supported by

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