simonw / Sqlite Utils
Licence: apache-2.0
Python CLI utility and library for manipulating SQLite databases
Stars: ✭ 368
Programming Languages
python
139335 projects - #7 most used programming language
Projects that are alternatives of or similar to Sqlite Utils
Manage Fastapi
🚀 CLI tool for FastAPI. Generating new FastAPI projects & boilerplates made easy.
Stars: ✭ 163 (-55.71%)
Mutual labels: cli, sqlite
Click
Python composable command line interface toolkit
Stars: ✭ 11,741 (+3090.49%)
Mutual labels: cli, click
Typer
Typer, build great CLIs. Easy to code. Based on Python type hints.
Stars: ✭ 6,793 (+1745.92%)
Mutual labels: cli, click
Ionic-2-sqlite-demo
Simple demo to show how to work with Sqlite Storage in Ionic 2
Stars: ✭ 20 (-94.57%)
Mutual labels: sqlite, sqlite-database
Pyintelowl
Robust Python SDK and Command Line Client for interacting with IntelOwl's API.
Stars: ✭ 26 (-92.93%)
Mutual labels: cli, click
Cachew
Transparent and persistent cache/serialization powered by type hints
Stars: ✭ 155 (-57.88%)
Mutual labels: sqlite, sqlite-database
nim-gatabase
Connection-Pooling Compile-Time ORM for Nim
Stars: ✭ 103 (-72.01%)
Mutual labels: sqlite, sqlite-database
Sequelize Auto Migrations
Migration generator && runner for sequelize
Stars: ✭ 233 (-36.68%)
Mutual labels: cli, sqlite
Visidata
A terminal spreadsheet multitool for discovering and arranging data
Stars: ✭ 4,606 (+1151.63%)
Mutual labels: cli, sqlite
Iosdebugdatabase
make it easy to debug databases in iOS applications iOS debug database
Stars: ✭ 219 (-40.49%)
Mutual labels: sqlite, sqlite-database
Sqlite Global Tool
SQLite .NET Core CLI tool that allows the user to manually enter and execute SQL statements with or without showing query result.
Stars: ✭ 37 (-89.95%)
Mutual labels: cli, sqlite
Pssqlite
PowerShell module to query SQLite databases
Stars: ✭ 184 (-50%)
Mutual labels: sqlite, sqlite-database
Sphinx Click
A Sphinx plugin to automatically document click-based applications
Stars: ✭ 134 (-63.59%)
Mutual labels: cli, click
Sqlitemanager
Sqlite Manager is a Dev Debug tool that helps to view/add/remove/edit data your android Sqlite Database in-app with ease. (supports Custom queries aswell)
Stars: ✭ 37 (-89.95%)
Mutual labels: sqlite, sqlite-database
Kirby3 Autoid
Automatic unique ID for Pages, Files and Structures including performant helpers to retrieve them. Bonus: Tiny-URL.
Stars: ✭ 58 (-84.24%)
Mutual labels: sqlite, sqlite-database
Askgit
Query git repositories with SQL. Generate reports, perform status checks, analyze codebases. 🔍 📊
Stars: ✭ 2,707 (+635.6%)
Mutual labels: cli, sqlite
mdb2sqlite
Conversion tool used to convert microsoft access database to sqlite.
Stars: ✭ 79 (-78.53%)
Mutual labels: sqlite, sqlite-database
sqlite-utils
Python CLI utility and library for manipulating SQLite databases.
Some feature highlights
- Pipe JSON (or CSV or TSV) directly into a new SQLite database file, automatically creating a table with the appropriate schema
- Configure SQLite full-text search against your database tables and run search queries against them, ordered by relevance
- Run transformations against your tables to make schema changes that SQLite
ALTER TABLE
does not directly support, such as dropping columns - Extract columns into separate tables to better normalize your existing data
Read more on my blog: sqlite-utils: a Python library and CLI tool for building SQLite databases and other entries tagged sqliteutils.
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 tables dogs.db --counts
[{"table": "dogs", "count": 2}]
$ sqlite-utils dogs.db "select * from dogs"
[{"id": 1, "age": 4, "name": "Cleo"},
{"id": 2, "age": 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 docs.csv --csv
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.
Related projects
- 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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].