Datasette (previously) is my open source tool for exploring and publishing structured data. There are a lot of ideas embedded in Datasette. I realized

Simon Willison’s Weblog

submited by
Style Pass
2021-07-27 12:00:11

Datasette (previously) is my open source tool for exploring and publishing structured data. There are a lot of ideas embedded in Datasette. I realized that I haven’t put many of them into writing.

Publishing read-only data Bundling the data with the code SQLite as the underlying data engine Far-future cache expiration Publishing as a core feature License and source metadata Facet everything Respect for CSV SQL as an API language Optimistic query execution with time limits Keyset pagination Interactive demos based on the unit tests Documentation unit tests

Datasette provides a read-only API to your data. It makes no attempt to deal with writes. Avoiding writes entirely is fundamental to a plethora of interesting properties, many of which are expanded on further below. In brief:

Any time your data changes, you need to publish a brand new copy of the whole database. With the right hosting this is easy: deploy a brand new copy of your data and application in parallel to your existing live deployment, then switch over incoming HTTP traffic to your API at the load balancer level. Heroku and Zeit Now both support this strategy out of the box.

Leave a Comment