--- id: sqlite-utils version: "4.2.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # sqlite-utils — CLI tool and Python library for manipulating SQLite databases License: permissive · Maintenance: active · Downloads: 1.4M/mo ## What it is and what it does sqlite-utils is both a command-line tool and a Python library for working with SQLite databases. It lets you pipe JSON, CSV, or TSV data directly into a new database with automatic schema inference, run SQL queries against files without creating a database first, and perform schema transformations that SQLite does not support natively. The library wraps SQLite with a Python API that handles common tasks like inserting records, extracting columns into separate tables, and managing full-text search indexes. You can use it as a standalone CLI for one-off data operations—querying CSV files with SQL, converting JSON to a database, viewing results in different formats—or import it into your Python code to automate database creation and manipulation. It includes support for database migrations via Python files, plugin installation for custom SQL functions, and a memory mode for querying data without persisting to disk. Use it for: - Convert CSV or JSON files into a queryable SQLite database with automatic schema creation in a single command. - Run ad-hoc SQL queries against CSV or JSON data files without manually creating a database. - Normalize existing database tables by extracting columns into separate tables to reduce redundancy. - Configure and run full-text search queries against database tables, ordered by relevance. - Manage schema changes and migrations across SQLite databases using Python migration files. - Automate data ingestion pipelines that transform and load data into SQLite from various sources. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. CLI tool and Python library for creating, querying, and transforming SQLite databases from JSON, CSV, or TSV data, with built-in full-text search and schema migration support. Yes. Active maintenance, low install friction, no known vulnerabilities, permissive license, and broad Python version support. Useful both as a CLI utility for data exploration and as a library for programmatic database work. ## Install pip install sqlite-utils uv add sqlite-utils poetry add sqlite-utils ## Installing sqlite-utils Before you install: Low install friction: pure Python wheel with 7 runtime dependencies. Active maintenance with a release 1 day ago and 2150 repository stars. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions. Quickstart: pip install sqlite-utils import sqlite_utils db = sqlite_utils.Database("demo.db") db["dogs"].insert_all([ {"id": 1, "age": 4, "name": "Cleo"}, {"id": 2, "age": 2, "name": "Pancakes"} ], pk="id") Requires Python 3.10 or later. Verify before relying: - Whether the full-text search feature requires sqlite-fts4 to be compiled or if it works on all platforms without additional system dependencies. - Performance characteristics when working with large datasets or complex transformations. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags sqlite database from csv json, query csv json with sql, sqlite cli tool, database schema migration, full-text search sqlite, sqlite table transformation, in-memory sql queries, cli-tool, data-pipeline, schema-migration [View on SkillFed](https://skillfed.io/packages/sqlite-utils) · [View on PyPI](https://pypi.org/project/sqlite-utils/)