Quickly explore and share a SQLite database with Datasette and Datasette Lite

code
Author

Alonso Silva

Published

November 22, 2024

I only recently learned about Datasette. My interest came from the possibility to quickly explore a SQLite database and I am not disappointed. You can explore a SQLite database database.db as follows:

Terminal
uvx datasette database.db
Terminal
uv venv
source .venv/bin/activate
uv pip install datasette
datasette database.db
Terminal
python -m venv .venv
source .venv/bin/activate
python -m pip install datasette
datasette database.db

This will pop up the following in your browser:

We get a nice indication of the title of the dataset, how many rows, and how many tables there are, as well as links to explore the tables. For example, if I click on the link for the table responses I get all the rows and columns of that table:

You can also use Datasette Lite which runs in browser using WebAssembly and Pyodide to share your SQLite database and let others to explore it. For example, by putting a SQLite database in GitHub, you can upload it in https://lite.datasette.io/, and you get a link to explore it in the following link or directly below: