An open source multi-tool for exploring and publishing data
APACHE-2.0 License
Bot releases are hidden (Show)
Published by simonw over 3 years ago
Documentation improvements, bug fixes and support for SpatiaLite 5.
__arraycontains
filter caused by tables with spaces in their names. (#1239)httpx
dependency. (#1005)no such table: pragma_database_list
bug when running Datasette against SQLite versions prior to SQLite 3.16.0. (#1276)inspect-data.json
. Thanks Campbell Allen and Frankie Robertson. (#1031, #1229)Published by simonw over 3 years ago
Support for cross-database SQL queries and built-in support for serving via HTTPS.
--crossdb
command-line option causes Datasette to attach up to ten database files to the same /_memory
database connection. This enables cross-database SQL queries, including the ability to use joins and unions to combine data from tables that exist in different database files. See Cross-database queries for details. (#283)--ssl-keyfile
and --ssl-certfile
options can be used to specify a TLS certificate, allowing Datasette to serve traffic over https://
without needing to run it behind a separate proxy. (#1221)/:memory:
page has been renamed (and redirected) to /_memory
for consistency with the new /_internal
database introduced in Datasette 0.54. (#1205)Published by simonw over 3 years ago
The two big new features in this release are the _internal
SQLite in-memory database storing details of all connected databases and tables, and support for JavaScript modules in plugins and additional scripts.
For additional commentary on this release, see Datasette 0.54, the annotated release notes.
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.
You can explore an example of this database by signing in as root to the latest.datasette.io
demo instance and then navigating to latest.datasette.io/_internal.
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.
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)
The new memory_name=
parameter to the Database class can be used to create named, shared in-memory databases.
JavaScript modules were introduced in ECMAScript 2015 and provide native browser support for the import
and export
keywords.
To use modules, JavaScript needs to be included in <script>
tags with a type="module"
attribute.
Datasette now has the ability to output <script type="module">
in places where you may wish to take advantage of modules. The extra_js_urls
option described in Custom CSS and JavaScript can now be used with modules, and module support is also available for the extra_body_script() plugin hook. (#1186, #1187)
datasette-leaflet-freedraw is the first example of a Datasette plugin that takes advantage of the new support for JavaScript modules. See Drawing shapes on a map to query a SpatiaLite database for more on this plugin.
Datasette adopted Black for opinionated Python code formatting in June 2019. Datasette now also embraces Prettier for JavaScript formatting, which like Black is enforced by tests in continuous integration. Instructions for using these two tools can be found in the new section on Code formatting in the contributors documentation. (#1167)
datasette path/to/one.db path/to/other/one.db
. (#509)datasette publish cloudrun
now sets force_https_urls
for every deployment, fixing some incorrect http://
links. (#1178)datasette.io
tools and plugins directories. (#1182)request.full_path
property, which returns the path including any query string. (#1184)PRAGMA
clauses in SQL queries. (#1185)datasette publish heroku
now deploys using python-3.8.7
.?_*
query string parameters passed to the table page are now persisted in hidden form fields, so parameters such as ?_size=10
will be correctly passed to the next page when query filters are changed. (#1194)test-database (1).sqlite
. (#1181)Published by simonw almost 4 years ago
Datasette has an official project website now, at https://datasette.io/. This release mainly updates the documentation to reflect the new site.
?column__arraynotcontains=
table filter. (#1132)datasette serve
has a new --create
option, which will create blank database files if they do not already exist rather than exiting with an error. (#1135)?_header=off
option for CSV export which omits the CSV header row, documented here. (#1133)Published by simonw almost 4 years ago
Published by simonw almost 4 years ago
--load-extension=spatialite
if it detects that the extension is available in a common location. (#1115)OPTIONS
requests against the /database
page no longer raise a 500 error. (#1100)Published by simonw almost 4 years ago
datasette --load-module=spatialite
now also checks for /usr/local/lib/mod_spatialite.so
. Thanks, Dan Peterson. (#1114)Published by simonw almost 4 years ago
This release includes a number of changes relating to an internal rebranding effort: Datasette's configuration mechanism (things like datasette --config default_page_size:10
) has been renamed to settings.
--setting default_page_size 10
option as a replacement for --config default_page_size:10
(note the lack of a colon). The --config
option is deprecated but will continue working until Datasette 1.0. (#992)/-/config
introspection page is now /-/settings
, and the previous page redirects to the new one. (#1103)config.json
file in Configuration directory mode is now called settings.json
. (#1104)datasette.config()
internal method has been replaced by a documented .setting(key) method. (#1107)Also in this release:
datasette publish cloudrun
has a new --apt-get-install
option that can be used to install additional Ubuntu packages as part of the deployment. This is useful for deploying the new datasette-ripgrep plugin. (#1110)And some bug fixes:
Published by simonw almost 4 years ago
Published by simonw almost 4 years ago
A new visual design, plugin hooks for adding navigation options, better handling of binary data, URL building utility methods and better support for running Datasette behind a proxy.
Datasette is no longer white and grey with blue and purple links! Natalie Downe has been working on a visual refresh, the first iteration of which is included in this release. (#1056)
A number of existing Datasette plugins add new pages to the Datasette interface, providig tools for things like uploading CSVs, editing table schemas or configuring full-text search.
Plugins like this can now link to themselves from other parts of Datasette interface. The menu_links(datasette, actor) hook (#1064) lets plugins add links to Datasette's new top-right application menu, and the table_actions(datasette, actor, database, table) hook (#1066) adds links to a new "table actions" menu on the table page.
The demo at latest.datasette.io now includes some example plugins. To see the new table actions menu first sign into that demo as root and then visit the facetable table to see the new cog icon menu at the top of the page.
SQLite tables can contain binary data in BLOB
columns. Datasette now provides links for users to download this data directly from Datasette, and uses those links to make binary data available from CSV exports. See Binary data for more details. (#1036 and #1034).
The new datasette.urls family of methods can be used to generate URLs to key pages within the Datasette interface, both within custom templates and Datasette plugins. See Building URLs within plugins for more details. (#904)
The base_url configuration option is designed to help run Datasette on a specific path behind a proxy - for example if you want to run an instance of Datasette at /my-datasette/
within your existing site's URL hierarchy, proxied behind nginx or Apache.
Support for this configuration option has been greatly improved (#1023), and guidelines for using it are now available in a new documentation section on Running Datasette behind a proxy. (#1027)
<div class="table-wrapper">
element which may impact the implementation of some plugins (for example this change to datasette-cluster-map).--debug
option, which didn't do anything. (#814)Link:
HTTP header pagination. (#1014)x
button for clearing filters. (#1016)--load-extension=spatialite
shortcut. (#1028).render_template()
is now documented. (#1045)datasette.urls.static_plugins()
method. (#1033)datasette -o
option now opens the most relevant page. (#976)datasette --cors
option now enables access to /database.db
downloads. (#1057)view-database-download
permission even if you do not have permission to access the Datasette instance. (#1058)Published by simonw almost 4 years ago
Published by simonw almost 4 years ago
.render_template()
is now documented. (#1045)datasette.urls.static_plugins()
method. (#1033)BLOB
column values can now be downloaded directly from the Datasette UI. (#1036).csv
exports now link to direct BLOB
downloads. (#1034)datasette -o
option now opens the most relevant page. (#976)datasette --cors
option now enables access to /database.db
downloads. (#1057)view-database-download
permission even if you do not have permission to access the Datasette instance. (#1058)Published by simonw about 4 years ago
datasette.urls
URL builder for plugins, see Building URLs within plugins. (#904)--debug
option, which didn't do anything. (#814)Link:
HTTP header pagination. (#1014)x
button for clearing filters. (#1016)--load-extension=spatialite
shortcut. (#1028)Published by simonw about 4 years ago
Published by simonw about 4 years ago
Published by simonw about 4 years ago
The key new feature in this release is the column actions menu on the table page (#891). This can be used to sort a column in ascending or descending order, facet data by that column or filter the table to just rows that have a value for that column.
Plugin authors can use the new datasette.client object to make internal HTTP requests from their plugins, allowing them to make use of Datasette's JSON API. (#943)
New Deploying Datasette documentation with guides for deploying Datasette on a Linux server using systemd or to hosting providers that support buildpacks. (#514, #997)
Other improvements in this release:
datasette -o
option which opens your browser as soon as Datasette starts up. (#970)sqlite3.enable_callback_tracebacks(True)
so that errors in custom SQL functions will display tracebacks. (#891)db.table_column_details(table)
introspection method for retrieving full details of the columns in a specific table, see Database introspection.datasette publish heroku
now deploys using Python 3.8.6.datasette publish heroku --tar=
option. (#969)OPTIONS
requests against HTML pages no longer return a 500 error. (#1001)