Python CLI utility and library for manipulating SQLite databases https://sqlite-utils.datasette.io
  • Python 99.7%
  • C 0.2%
Find a file
Simon Willison f2ca48c0da Default command now executes queries, --csv or --json
I replaced the following commands:

    sqlite-utils json db.db "select * from table"
    sqlite-utils csv db.db "select * from table"

With a unified 'query' command, which is now set as the default:

    sqlite-utils db.db "select * from table"
    sqlite-utils db.db "select * from table" --csv
2019-02-22 17:40:21 -08:00
docs Default command now executes queries, --csv or --json 2019-02-22 17:40:21 -08:00
sqlite_utils Default command now executes queries, --csv or --json 2019-02-22 17:40:21 -08:00
tests Default command now executes queries, --csv or --json 2019-02-22 17:40:21 -08:00
.gitignore Initial project layout + database table creation tools 2018-07-28 06:46:17 -07:00
.travis.yml Run Travis tests against Python 3.8-dev (#5) 2019-01-25 18:37:54 -08:00
README.md More detailed README 2019-01-25 18:21:55 -08:00
setup.py Default command now executes queries, --csv or --json 2019-02-22 17:40:21 -08:00

sqlite-utils

PyPI Travis CI Documentation Status License

Python CLI utility and library for manipulating SQLite databases.

Install it like this:

pip3 install sqlite-utils

Now you can do things like this:

$ sqlite-utils tables dogs.db
dogs

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

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

Full documentation: https://sqlite-utils.readthedocs.io/

Related projects: