Skip to main content

LocalQL

CI PyPI Python License: MIT

LocalQL is a DuckDB-powered tool for querying local CSV files with SQL. Install the localql package to use the csvql command, organize repeatable work in a .csvql.yml project catalog, export results, and optionally work in a terminal menu.

LocalQL: Query local CSVs with SQL

Contents

Install and first query

Install the core command in your selected Python environment:

python -m pip install localql
csvql --version

To try a query, create a small CSV in the directory where you are working:

python -c "from pathlib import Path; Path('orders.csv').write_text('order_id,status\nORD-1,paid\nORD-2,pending\nORD-3,paid\n', encoding='utf-8')"
csvql query orders.csv "SELECT * FROM orders LIMIT 5"

The file name becomes the SQL table name, so orders.csv is available as orders. A successful command prints a table with the CSV rows. See Getting started for project catalogs, saved SQL, and exports.

Terminal screenshot of a LocalQL query over a CSV file

Result behavior

LocalQL keeps interactive output responsive without changing complete-result contracts. csvql query and csvql run table output retains up to 1,000 rows by default; --limit changes that table-preview bound. Query/run JSON output, Python API results, and csvql export remain complete.

The terminal menu follows the same split: Results shows a bounded preview while export and save use the preserved complete result when session capacity is available.

Optional terminal menu

The core CLI needs only localql. Install the optional Textual-based terminal menu when you want a source list, SQL editor, results, and history in one terminal application:

python -m pip install "localql[tui]"
csvql menu orders.csv

You can also start with csvql menu and run source-free SQL such as SELECT 1 before loading any CSVs.

All core commands remain available without the extra. See the Terminal menu guide for keys and source-management actions.

Terminal screenshot of the LocalQL TUI workbench with CSV sources, SQL, History, and a complete preserved result

Compatibility and safety

LocalQL supports Python 3.11 through 3.14 on macOS, Linux, and Windows.

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

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

DuckDB executes SQL; LocalQL manages local CSV table aliases, project configuration, output, and explicit exports.

Get help and stay current

Metadata

Release files for localql 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for localql 1.1.1
File Size Uploaded Provenance Actions
localql-1.1.1.tar.gz 1.9 MB With provenance Details for localql-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for localql 1.1.1
File Interpreter ABI Platform Actions
localql-1.1.1-py3-none-any.whl Python 3 none any Details for localql-1.1.1-py3-none-any.whl

Total release size: 2.0 MB

Release files / localql-1.1.1.tar.gz

Download URL localql-1.1.1.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
b65ee38255525a474be52489bc145cb23ff158fde91913f025c36140325935c4
BLAKE2b-256 checksum
How to use checksums
c33f58045f0596e2971979b43add0eb0752a0986b961221a60b4ca960a87d650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Release files / localql-1.1.1-py3-none-any.whl

Download URL localql-1.1.1-py3-none-any.whl
Size 156.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
461e0060ed327adcd8d5c168690f39179cdc9f78031a8565a4b68b2a8e4e15a1
BLAKE2b-256 checksum
How to use checksums
e9d2e42e1886249ba6d842483931d7924a9f1ffdb719d44a4a394c72255899f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

Security for localql 1.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for localql-1.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page