It’s a thin wrapper around the normal Django SQLite database engine, but it automatically syncs the DB file with S3.
Obviously, this will cause problems for high-write applications, but for high-read applications without concurrent writes, it scales very well, it’s trivial to set up, and it’s orders of magnitudes cheaper that AWS RDS.
Datasette: instantly create and publish an API for your SQLite databases
A key feature of datasette is that the API it provides is very deliberately read-only. This provides a number of interesting benefits:
- It lets us use SQLite in production in high traffic scenarios. SQLite is an incredible piece of technology, but it is rarely used in web application contexts due to its limitations with respect to concurrent writes. Datasette opens SQLite files using the immutable option, eliminating any concurrency concerns and allowing SQLite to go even faster for reads.
- Since the database is read-only, we can accept abritrary SQL queries from our users!
How do I dump the data of some SQLite3 tables?
<span class="pln">sqlite3 </span><span class="kwd">some</span><span class="pun">.</span><span class="pln">db </span><span class="pun">.</span><span class="kwd">schema</span> <span class="pun">></span> <span class="kwd">schema</span><span class="pun">.</span><span class="pln">sql sqlite3 </span><span class="kwd">some</span><span class="pun">.</span><span class="pln">db </span><span class="pun">.</span><span class="kwd">dump</span> <span class="pun">></span> <span class="kwd">dump</span><span class="pun">.</span><span class="pln">sql grep </span><span class="pun">-</span><span class="pln">vx </span><span class="pun">-</span><span class="pln">f </span><span class="kwd">schema</span><span class="pun">.</span><span class="pln">sql </span><span class="kwd">dump</span><span class="pun">.</span><span class="pln">sql </span><span class="pun">></span><span class="pln"> data</span><span class="pun">.</span><span class="pln">sql</span>