Skip to main content

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

Project description

sqtab

PyPI version Python Versions License: MIT

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.7.tar.gz (14.4 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.7-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sqtab-0.1.7.tar.gz
  • Upload date:
  • Size: 14.4 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.7.tar.gz
Algorithm Hash digest
SHA256 787aa4d9a2371f62bb7d921d5ab5d08d9f2485bb2f10d7cc53335795e187dc5c
MD5 5dc295f53b3ec0cd526bc496e27d024e
BLAKE2b-256 0d25450cfa0774f911d9948fc65c207ff1ade5f9a22011311356b7607c8a1187

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqtab-0.1.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: sqtab-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 13.8 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 4fdc96d8f18846b82e4d874ec58144fc1e257a2e04951fa50fe9df7311759922
MD5 574bf53d2845767345f3be9ed96c1d75
BLAKE2b-256 210c3640c27d1934f21ea296f40fc76e6ad5e18504d3c76522ca54eb791fdb72

See more details on using hashes here.

Provenance

The following attestation bundles were made for sqtab-0.1.7-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