Skip to main content

LocalQL packages csvql, a DuckDB-powered CLI for querying local CSV files like SQL tables.

Project description

LocalQL

CI PyPI Python License: MIT

LocalQL is a lightweight DuckDB-powered tool for querying local CSV files with SQL. It installs the csvql command and provides named tables, saved SQL, readable output, exports, and an optional terminal menu.

LocalQL: Query local CSVs with SQL

Contents

Quickstart

Install LocalQL:

pip install localql

The query below uses the example data in this repository. From another directory, replace the path with one of your own CSV files.

Query the example CSV:

csvql query examples/saas_revenue/data/revenue_movements.csv \
  "SELECT movement_type, SUM(mrr_delta) AS net_mrr_change
   FROM revenue_movements
   GROUP BY movement_type
   ORDER BY movement_type"

Terminal screenshot of a LocalQL query over the SaaS revenue example

For a complete copy-and-paste walkthrough, see Getting started.

Core workflows

When you want to… Start here
Query a CSV or join named tables CLI reference
Reuse a project catalog and saved SQL Project catalogs
Inspect, sample, or profile a source Inspect, sample, and profile
Export a result or reuse it as a CSV source Save and reuse results
Check configured data-quality rules Data-quality checks

CSVQL does not implement a SQL engine. DuckDB executes SQL; CSVQL manages the local workflow around table aliases, project configuration, output, and exports.

Terminal menu

The optional csvql menu workbench provides sources, a SQL editor, results, history, and explicit export actions in the terminal:

pip install "localql[tui]"
csvql menu
csvql menu /path/to/orders.csv

Terminal screenshot of the LocalQL TUI workbench with sources, SQL, history, and results

The terminal menu is optional; all core commands also work without it. See the Terminal menu guide for keys, source actions, history, and result handling.

Safety

LocalQL treats user-authored SQL as trusted local DuckDB SQL. It does not sandbox DuckDB or restrict filesystem access. Run only SQL you trust.

Documentation

Use LocalQL

Reference

Project and support

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

localql-1.0.1.tar.gz (1.9 MB view details)

Uploaded Source

Built Distribution

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

localql-1.0.1-py3-none-any.whl (86.0 kB view details)

Uploaded Python 3

File details

Details for the file localql-1.0.1.tar.gz.

File metadata

  • Download URL: localql-1.0.1.tar.gz
  • Upload date:
  • Size: 1.9 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for localql-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bd6b93ea88326a798e57012d65b090873e208546197bdcddad6d97a864037439
MD5 cf969a6cdd4c8b9b1c8159581a972a84
BLAKE2b-256 4d80bed117336f0d8b7699947a5e37b85c809af0dded2fb2e8335731f1f2d147

See more details on using hashes here.

Provenance

The following attestation bundles were made for localql-1.0.1.tar.gz:

Publisher: publish.yml on highlordleonas/csvql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file localql-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: localql-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 86.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for localql-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fbdc19fdd520b070520522f71297124c61a4838f005631806ff3217165ee8f52
MD5 8e7ead1ad083b98ef6dc0fc0ba7cfc3b
BLAKE2b-256 9476c1f1be41b50b6d038db6cb5ab47cea09ee21ee1d5536734830e34df81e52

See more details on using hashes here.

Provenance

The following attestation bundles were made for localql-1.0.1-py3-none-any.whl:

Publisher: publish.yml on highlordleonas/csvql

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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