Skip to main content

Minimalist SQLite-based CLI tool for working with tabular data.

Project description

sqtab

sqtab is a minimal command-line toolkit for working with tabular data (CSV / JSON) using SQLite as a lightweight local database layer.

It is designed for developers, data analysts, and engineers who need a fast, clean way to explore or transform structured data without setting up a full database environment.

sqtab provides:

  • importing CSV or JSON into SQLite tables
  • schema inspection
  • running ad-hoc SQL queries
  • exporting tables back to CSV or JSON
  • AI-assisted table analysis (customizable with tasks and rules)

Installation

pip install sqtab

Requires Python 3.10+.


Quick Start

Import CSV or JSON

sqtab import data.csv users

Inspect table schema

sqtab tables --schema

Run SQL queries

sqtab sql "SELECT * FROM users;"

Export a table

sqtab export users users.csv

Reset the local SQLite database

sqtab reset

For all commands:

sqtab --help

AI-Assisted Analysis

sqtab can analyze table structure and data using an AI model (OpenAI API).

Basic usage

sqtab analyze users --ai

Custom tasks and rules

You can define exactly what the AI should do:

sqtab analyze users --ai \
    --task "Identify data issues" \
    --task "Suggest useful SQL queries" \
    --rule "Be concise"

Load tasks and rules from files

sqtab analyze users --ai --tasks-file tasks.txt --rules-file rules.txt

Requires environment variable or .env file:

OPENAI_API_KEY=your-key-here

Project Status

sqtab is in early active development (0.x releases).
The CLI is stable; features may expand based on feedback.

Contributions, issues, and suggestions are welcome.

GitHub repository:
https://github.com/gojankovic/sqtab


License

MIT License © 2025 Goran Janković

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

sqtab-0.1.6.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

sqtab-0.1.6-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file sqtab-0.1.6.tar.gz.

File metadata

  • Download URL: sqtab-0.1.6.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sqtab-0.1.6.tar.gz
Algorithm Hash digest
SHA256 fd09717e669a9f5e3768d611bd9d5a9d2654dc310faefbb76041ab93d1e216f8
MD5 0f68d448c3cbb9e7ba5e7b8bf41ea89e
BLAKE2b-256 200806aecff9b2adfdf9ec8bb0e6d4054e1b0fd5919355b9ec90c74ce87e6670

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqtab-0.1.6.tar.gz:

Publisher: publish.yml on gojankovic/sqtab

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

File details

Details for the file sqtab-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: sqtab-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sqtab-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f7135bd8398b754dddddfe90cfa521dac33565f3c417f66c08ed16c881597ec5
MD5 ae88b2b27d1f85e502c20f32d8cf78af
BLAKE2b-256 35cbfdb405b4d6c72e943085352f2de3f2e306bdf73b836331f097035f881df1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqtab-0.1.6-py3-none-any.whl:

Publisher: publish.yml on gojankovic/sqtab

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