2018-07-13 20:56:21 -07:00
|
|
|
# sqlite-utils
|
2018-07-31 08:38:50 -07:00
|
|
|
|
|
|
|
|
[](https://pypi.org/project/sqlite-utils/)
|
|
|
|
|
[](https://travis-ci.com/simonw/sqlite-utils)
|
|
|
|
|
[](http://sqlite-utils.readthedocs.io/en/latest/?badge=latest)
|
|
|
|
|
[](https://github.com/simonw/sqlite-utils/blob/master/LICENSE)
|
|
|
|
|
|
2019-01-25 18:21:55 -08:00
|
|
|
Python CLI utility and library for manipulating SQLite databases.
|
|
|
|
|
|
|
|
|
|
Install it like this:
|
2018-07-31 08:38:50 -07:00
|
|
|
|
|
|
|
|
pip3 install sqlite-utils
|
|
|
|
|
|
2019-01-25 18:21:55 -08:00
|
|
|
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/
|
2018-07-31 08:38:50 -07:00
|
|
|
|
|
|
|
|
Related projects:
|
|
|
|
|
|
|
|
|
|
* [Datasette](https://github.com/simonw/datasette): A tool for exploring and publishing data
|
|
|
|
|
* [csvs-to-sqlite](https://github.com/simonw/csvs-to-sqlite): Convert CSV files into a SQLite database
|