랭킹으로 돌아가기

simonw/sqlite-utils

Pythonsqlite-utils.datasette.io

Python CLI utility and library for manipulating SQLite databases

sqlitepythondatasettesqlite-databaseclickclidatasette-iodatasette-tool
스타 성장
스타
2.1k
포크
159
주간 성장
이슈
80
1k2k
2018년 7월2021년 3월2023년 11월2026년 7월
아티팩트PyPIpip install sqlite-utils
README

sqlite-utils

PyPI Changelog Python 3.x Tests Documentation Status codecov License discord

Python CLI utility and library for manipulating SQLite databases.

Some feature highlights

Upgrading from sqlite-utils 3.x? See the 4.0 upgrade guide.

Read more on my blog, in this series of posts on New features in sqlite-utils and other entries tagged sqlite-utils.

Installation

pip install sqlite-utils

Or if you use Homebrew for macOS:

brew install sqlite-utils

Using as a CLI tool

Now you can do things with the CLI utility like this:

$ sqlite-utils memory dogs.csv "select * from t"
[{"id": 1, "age": 4, "name": "Cleo"},
 {"id": 2, "age": 2, "name": "Pancakes"}]

$ sqlite-utils insert dogs.db dogs dogs.csv --csv
[####################################]  100%

$ sqlite-utils tables dogs.db --counts
[{"table": "dogs", "count": 2}]

$ sqlite-utils dogs.db "select id, name from dogs"
[{"id": 1, "name": "Cleo"},
 {"id": 2, "name": "Pancakes"}]

$ sqlite-utils dogs.db "select * from dogs" --csv
id,age,name
1,4,Cleo
2,2,Pancakes

$ sqlite-utils dogs.db "select * from dogs" --table
  id    age  name
----  -----  --------
   1      4  Cleo
   2      2  Pancakes

You can import JSON data into a new database table like this:

$ curl https://api.github.com/repos/simonw/sqlite-utils/releases \
    | sqlite-utils insert releases.db releases - --pk id

Or for data in a CSV file:

$ sqlite-utils insert dogs.db dogs dogs.csv --csv

sqlite-utils memory lets you import CSV or JSON data into an in-memory database and run SQL queries against it in a single command:

$ cat dogs.csv | sqlite-utils memory - "select name, age from stdin"

See the full CLI documentation for comprehensive coverage of many more commands.

Using as a library

You can also import sqlite_utils and use it as a Python library like this:

import sqlite_utils
db = sqlite_utils.Database("demo_database.db")
# This line creates a "dogs" table if one does not already exist:
db["dogs"].insert_all([
    {"id": 1, "age": 4, "name": "Cleo"},
    {"id": 2, "age": 2, "name": "Pancakes"}
], pk="id")

Check out the full library documentation for everything else you can do with the Python library.

  • Datasette: A tool for exploring and publishing data
  • csvs-to-sqlite: Convert CSV files into a SQLite database
  • db-to-sqlite: CLI tool for exporting a MySQL or PostgreSQL database as a SQLite file
  • dogsheep: A family of tools for personal analytics, built on top of sqlite-utils
관련 저장소
thedotmack/claude-mem

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

JavaScriptnpmApache License 2.0aiai-agents
claude-mem.ai
88.2k7.7k
nocodb/nocodb

🔥 🔥 🔥 A Free & Self-hostable Airtable Alternative

TypeScriptnpmOtherautomatic-apiairtable
nocodb.com
64.2k4.9k
usememos/memos

Open-source, self-hosted note-taking tool built for quick capture. Markdown-native, lightweight, and fully yours.

GoGo ModulesMIT Licensereactgo
usememos.com
61.7k4.6k
dbeaver/dbeaver

Free universal database tool and SQL client

JavaMavenApache License 2.0sqldatabase
dbeaver.io
51.1k4.3k
prisma/prisma

Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

TypeScriptnpmApache License 2.0prismaorm
prisma.io
47.4k2.4k
drawdb-io/drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.

JavaScriptnpmGNU Affero General Public License v3.0database-schemaeditor
drawdb.app
38.2k3.1k
directus/directus

The flexible backend for all your projects 🐰 Turn your DB into a headless CMS, admin panels, or apps with a custom UI, instant APIs, auth & more.

TypeScriptnpmOtherapicms
directus.com
36.7k4.9k
typeorm/typeorm

TypeScript & JavaScript ORM for Node.js — supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, and more.

TypeScriptnpmMIT Licenseormtypescript
typeorm.io
36.6k6.6k
drizzle-team/drizzle-orm

ORM

TypeScriptnpmApache License 2.0typescriptorm
orm.drizzle.team
35.2k1.5k
DeusData/codebase-memory-mcp

High-performance code intelligence MCP server. Indexes codebases into a persistent knowledge graph — average repo in milliseconds. 158 languages, sub-ms queries, 99% fewer tokens. Single static binary, zero dependencies.

CMIT Licenseclaude-codecode-analysis
deusdata.github.io/codebase-memory-mcp/
33.8k2.6k
sequelize/sequelize

Feature-rich ORM for modern Node.js and TypeScript, it supports PostgreSQL (with JSON and JSONB support), MySQL, MariaDB, SQLite, MS SQL Server, Snowflake, Oracle DB, DB2 and DB2 for IBM i.

TypeScriptnpmMIT Licensejavascriptsql
sequelize.org
30.4k4.3k
sqlitebrowser/sqlitebrowser

Official home of the DB Browser for SQLite (DB4S) project. Previously known as "SQLite Database Browser" and "Database Browser for SQLite". Website at:

C++Otherdatabase-browsersqlite
sqlitebrowser.org
24.4k2.4k