The two big new features in this release are the
For additional commentary on this release, see Datasette 0.54, the annotated release notes.
The _internal database
As part of ongoing work to help Datasette handle much larger numbers of connected databases and tables (see Datasette Library) Datasette now maintains an in-memory SQLite database with details of all of the attached databases, tables, columns, indexes and foreign keys. (#1150)
This will support future improvements such as a searchable, paginated homepage of all available tables.
Plugins can use these tables to introspect attached data in an efficient way. Plugin authors should note that this is not yet considered a stable interface, so any plugins that use this may need to make changes prior to Datasette 1.0 if the
_internal table schemas change.
Named in-memory database support
As part of the work building the
_internal database, Datasette now supports named in-memory databases that can be shared across multiple connections. This allows plugins to create in-memory databases which will persist data for the lifetime of the Datasette server process. (#1151)
memory_name= parameter to the Database class can be used to create named, shared in-memory databases.
<script> tags with a
Datasette now has the ability to output
<script type="module"> in places where you may wish to take advantage of modules. The
Code formatting with Black and Prettier
- Datasette can now open multiple database files with the same name, e.g. if you run
datasette path/to/one.db path/to/other/one.db. (#509)
datasette publish cloudrunnow sets
force_https_urlsfor every deployment, fixing some incorrect
- Fixed a bug in the example nginx configuration in Running Datasette behind a proxy. (#1091)
- The Datasette Ecosystem documentation page has been reduced in size in favour of the
datasette.iotools and plugins directories. (#1182)
- The request object now provides a
request.full_pathproperty, which returns the path including any query string. (#1184)
- Better error message for disallowed
PRAGMAclauses in SQL queries. (#1185)
datasette publish herokunow deploys using
- New plugin testing documentation on Testing outbound HTTP calls with pytest-httpx. (#1198)
?_*query string parameters passed to the table page are now persisted in hidden form fields, so parameters such as
?_size=10will be correctly passed to the next page when query filters are changed. (#1194)
- Fixed a bug loading a database file called
test-database (1).sqlite. (#1181)