html_url,id,node_id,tag_name,target_commitish,name,draft,author,prerelease,created_at,published_at,body,repo,reactions https://github.com/simonw/datasette/releases/tag/0.37.1,24154697,MDc6UmVsZWFzZTI0MTU0Njk3,0.37.1,master,Datasette 0.37.1,0,9599,0,2020-03-03T03:43:08Z,2020-03-03T03:46:17Z,"* Don’t attempt to count table rows to display on the index page for databases > 100MB. (#688) * Print exceptions if they occur in the write thread rather than silently swallowing them. * Handle the possibility of `scope[""path""]` being a string rather than bytes * Better documentation for the [extra_template_vars(template, database, table, view_name, request, datasette)](https://datasette.readthedocs.io/en/stable/plugins.html#plugin-hook-extra-template-vars) plugin hook. ",107914493, https://github.com/simonw/datasette/releases/tag/0.37,23986460,MDc6UmVsZWFzZTIzOTg2NDYw,0.37,master,Datasette 0.37,0,9599,0,2020-02-26T01:22:02Z,2020-02-26T03:44:07Z,"* Plugins now have a supported mechanism for writing to a database, using the new `.execute_write()` and `.execute_write_fn()` methods. [Documentation](https://datasette.readthedocs.io/en/stable/internals.html#database-execute-write). (#682) * Immutable databases that have had their rows counted using the `inspect` command now use the calculated count more effectively - thanks, Kevin Keogh. (#666) * `--reload` no longer restarts the server if a database file is modified, unless that database was opened immutable mode with `-i`. (#494) * New `?_searchmode=raw` option turns off escaping for FTS queries in `?_search=` allowing full use of SQLite’s [FTS5 query syntax](https://www.sqlite.org/fts5.html#full_text_query_syntax). (#676) ",107914493, https://github.com/simonw/datasette/releases/tag/0.36,23896184,MDc6UmVsZWFzZTIzODk2MTg0,0.36,master,Datasette 0.36,0,9599,0,2020-02-22T03:04:46Z,2020-02-22T03:24:50Z,"* The `datasette` object passed to plugins now has API documentation: [Datasette class](https://datasette.readthedocs.io/en/latest/datasette.html#datasette). (#576) * New methods on `datasette`: `.add_database()` and `.remove_database()` - [documentation](https://datasette.readthedocs.io/en/latest/datasette.html#datasette-add-database). (#671) * `prepare_connection()` plugin hook now takes optional `datasette` and `database` arguments - [prepare_connection(conn, database, datasette)](https://datasette.readthedocs.io/en/latest/plugins.html#plugin-hook-prepare-connection). (#678) * Added three new plugins and one new conversion tool to the [The Datasette Ecosystem](https://datasette.readthedocs.io/en/latest/ecosystem.html#ecosystem). https://datasette.readthedocs.io/en/latest/changelog.html#v0-36",107914493, https://github.com/simonw/datasette/releases/tag/0.35,23395622,MDc6UmVsZWFzZTIzMzk1NjIy,0.35,master,Datasette 0.35,0,9599,0,2020-02-05T02:17:47Z,2020-02-05T02:32:34Z,"* Added five new plugins and one new conversion tool to the [The Datasette Ecosystem](https://datasette.readthedocs.io/en/latest/ecosystem.html#ecosystem). * The `Datasette` class has a new `render_template()` method which can be used by plugins to render templates using Datasette’s pre-configured [Jinja](https://jinja.palletsprojects.com/) templating library. * You can now execute SQL queries that start with a `-- comment` - thanks, Jay Graves (#653) https://datasette.readthedocs.io/en/latest/changelog.html#v0-35",107914493, https://github.com/simonw/datasette/releases/tag/0.34,23239304,MDc6UmVsZWFzZTIzMjM5MzA0,0.34,master,Datasette 0.34,0,9599,0,2020-01-30T00:09:01Z,2020-01-30T00:29:21Z,"- `_search=` queries are now correctly escaped using a new `escape_fts()` custom SQL function. This means you can now run searches for strings like `park.` without seeing errors. (#651) - Google Cloud Run is no longer in beta, so `datasette publish cloudrun` has been updated to work even if the user has not installed the `gcloud` beta components package. Thanks, Katie McLaughlin (#660) - `datasette package` now accepts a `--port` option for specifying which port the resulting Docker container should listen on. (#661) https://datasette.readthedocs.io/en/stable/changelog.html#v0-34 ",107914493, https://github.com/simonw/datasette/releases/tag/0.33,22415542,MDc6UmVsZWFzZTIyNDE1NTQy,0.33,master,Datasette 0.33,0,9599,0,2019-12-22T16:27:04Z,2019-12-22T16:43:31Z,"* `rowid` is now included in dropdown menus for filtering tables (#636) * Columns are now only suggested for faceting if they have at least one value with more than one record (#638) * Queries with no results now display “0 results” (#637) * Improved documentation for the `--static` option (#641) * asyncio task information is now included on the `/-/threads` debug page * Bumped Uvicorn dependency 0.11 * You can now use `--port 0` to listen on an available port * New `template_debug` setting for debugging templates, e.g. https://latest.datasette.io/fixtures/roadside_attractions?_context=1 (#654) https://datasette.readthedocs.io/en/latest/changelog.html#v0-33",107914493, https://github.com/simonw/datasette/releases/tag/0.32,21492068,MDc6UmVsZWFzZTIxNDkyMDY4,0.32,master,Datasette 0.32,0,9599,0,2019-11-14T23:20:21Z,2019-11-14T23:42:14Z,"Datasette now renders templates using [Jinja async mode](https://jinja.palletsprojects.com/en/2.10.x/api/#async-support). This makes it easy for plugins to provide custom template functions that perform asynchronous actions, for example the new [datasette-template-sql](https://github.com/simonw/datasette-template-sql) plugin which allows custom templates to directly execute SQL queries and render their results. (#628) https://datasette.readthedocs.io/en/latest/changelog.html#v0-32",107914493, https://github.com/simonw/datasette/releases/tag/0.31,21426008,MDc6UmVsZWFzZTIxNDI2MDA4,0.31,master,Datasette 0.31,0,9599,0,2019-11-12T05:33:51Z,2019-11-13T02:16:15Z,"This version adds compatibility with Python 3.8 and breaks compatibility with Python 3.5. Full release notes: https://datasette.readthedocs.io/en/stable/changelog.html#v0-31",107914493, https://github.com/simonw/datasette/releases/tag/0.29,18461320,MDc6UmVsZWFzZTE4NDYxMzIw,0.29,master,Datasette 0.29,0,9599,0,2019-07-08T03:14:27Z,2019-07-08T03:43:13Z,"ASGI, new plugin hooks, facet by date and much, much more… See [the release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-29) for full details.",107914493, https://github.com/simonw/datasette/releases/tag/0.28,17450414,MDc6UmVsZWFzZTE3NDUwNDE0,0.28,master,Datasette 0.28,0,9599,0,2019-05-19T21:37:49Z,2019-05-19T21:42:28Z,"[Datasette 0.28](https://datasette.readthedocs.io/en/stable/changelog.html#v0-28) - a salmagundi of new features! * No longer immutable! Datasette now supports [databases that change](https://datasette.readthedocs.io/en/stable/changelog.html#supporting-databases-that-change). * [Faceting improvements](https://datasette.readthedocs.io/en/stable/changelog.html#faceting-improvements-and-faceting-plugins) including facet-by-JSON-array and the ability to define custom faceting using plugins. * [datasette publish cloudrun](https://datasette.readthedocs.io/en/stable/changelog.html#datasette-publish-cloudrun) lets you publish databasese to Google's new Cloud Run hosting service. * New [register_output_renderer](https://datasette.readthedocs.io/en/stable/changelog.html#register-output-renderer-plugins) plugin hook for adding custom output extensions to Datasette in addition to the default `.json` and `.csv`. * Dozens of other smaller features and tweaks - see [the release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-28) for full details.",107914493, https://github.com/simonw/datasette/releases/tag/0.27,15389392,MDc6UmVsZWFzZTE1Mzg5Mzky,0.27,master,Datasette 0.27,0,9599,0,2019-02-01T03:47:05Z,2019-02-06T05:10:20Z,https://datasette.readthedocs.io/en/stable/changelog.html#v0-27,107914493, https://github.com/simonw/datasette/releases/tag/0.26.1,15206659,MDc6UmVsZWFzZTE1MjA2NjU5,0.26.1,master,Datasette 0.26.1,0,9599,0,2019-01-11T00:51:38Z,2019-01-28T01:50:45Z,Release notes: https://datasette.readthedocs.io/en/stable/changelog.html#v0-26-1,107914493, https://github.com/simonw/datasette/releases/tag/0.26,14914779,MDc6UmVsZWFzZTE0OTE0Nzc5,0.26,master,Datasette 0.26,0,9599,0,2019-01-03T02:53:59Z,2019-01-10T21:41:00Z,[Datasette 0.26 release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-26),107914493, https://github.com/simonw/datasette/releases/tag/0.25.2,14560304,MDc6UmVsZWFzZTE0NTYwMzA0,0.25.2,master,Datasette 0.25.2,0,9599,0,2018-12-16T21:26:37Z,2018-12-16T21:45:39Z,"* `datasette publish heroku` now uses the `python-3.6.7` runtime * Added documentation on [how to build the documentation](https://datasette.readthedocs.io/en/stable/contributing.html#editing-and-building-the-documentation) * Added documentation covering [our release process](https://datasette.readthedocs.io/en/stable/contributing.html#release-process) * Upgraded to pytest 4.0.2 ",107914493, https://github.com/simonw/datasette/releases/tag/0.25.1,14560294,MDc6UmVsZWFzZTE0NTYwMjk0,0.25.1,master,Datasette 0.25.1,0,9599,0,2018-11-05T06:31:41Z,2018-12-16T21:44:27Z,"Documentation improvements plus a fix for publishing to Zeit Now. * `datasette publish now` now uses Zeit’s v1 platform, to work around the new 100MB image limit. Thanks, @slygent - closes #366. ",107914493, https://github.com/simonw/datasette/releases/tag/0.25,12986637,MDc6UmVsZWFzZTEyOTg2NjM3,0.25,master,Datasette 0.25,0,9599,0,2018-09-19T17:48:12Z,2018-09-19T18:27:21Z,"New plugin hooks, improved database view support and an easier way to use more recent versions of SQLite. See full release notes here: https://datasette.readthedocs.io/en/latest/changelog.html#v0-25",107914493, https://github.com/simonw/datasette/releases/tag/0.24,12080036,MDc6UmVsZWFzZTEyMDgwMDM2,0.24,main,Datasette 0.24,0,9599,0,2018-07-24T04:34:38Z,2018-07-24T16:51:29Z,"See full release notes here: http://datasette.readthedocs.io/en/latest/changelog.html#v0-24 ",107914493, https://github.com/simonw/datasette/releases/tag/0.23,11530498,MDc6UmVsZWFzZTExNTMwNDk4,0.23,main,"Datasette 0.23: CSV, SpatiaLite and more",0,9599,0,2018-06-18T15:11:57Z,2018-06-18T15:28:37Z,"This release features CSV export, improved options for foreign key expansions, new configuration settings and improved support for SpatiaLite. See full release notes here: http://datasette.readthedocs.io/en/latest/changelog.html#v0-23",107914493, https://github.com/simonw/datasette/releases/tag/0.23.2,11825600,MDc6UmVsZWFzZTExODI1NjAw,0.23.2,main,Datasette 0.23.2,0,9599,0,2018-07-08T05:28:45Z,2018-07-08T05:41:38Z,"Minor bugfix and documentation release. * CSV export now respects `--cors`, fixes #326 * [Installation instructions](https://datasette.readthedocs.io/en/latest/installation.html) including docker image - closes #328 * Fix for row pages for tables with / in, closes #325",107914493, https://github.com/simonw/datasette/releases/tag/0.23.1,11591352,MDc6UmVsZWFzZTExNTkxMzUy,0.23.1,main,Datasette 0.23.1,0,9599,0,2018-06-21T15:37:13Z,2018-06-21T16:02:44Z,"Minor bugfix release. * Correctly display empty strings in HTML table, closes #314 * Allow “.” in database filenames, closes #302 * 404s ending in slash redirect to remove that slash, closes #309 * Fixed incorrect display of compound primary keys with foreign key references. Closes #319 * Docs + example of canned SQL query using || concatenation. Closes #321 * Correctly display facets with value of 0 - closes #318 * Default ‘expand labels’ to checked in CSV advanced export ",107914493, https://github.com/simonw/datasette/releases/tag/0.22,11087850,MDc6UmVsZWFzZTExMDg3ODUw,0.22,main,Datasette 0.22: Datasette Facets,0,9599,0,2018-05-20T23:41:47Z,2018-05-20T23:44:19Z,"The big new feature in this release is [facets](http://datasette.readthedocs.io/en/latest/facets.html). Datasette can now apply faceted browse to any column in any table. It will also suggest possible facets. See the [Datasette Facets](https://simonwillison.net/2018/May/20/datasette-facets/) announcement post for more details. In addition to the work on facets: - Added [docs for introspection endpoints](https://datasette.readthedocs.io/en/latest/introspection.html) - New `--config` option, added `--help-config`, closes #274 Removed the `--page_size=` argument to `datasette serve` in favour of: datasette serve --config default_page_size:50 mydb.db Added new help section: $ datasette --help-config Config options: default_page_size Default page size for the table view (default=100) max_returned_rows Maximum rows that can be returned from a table or custom query (default=1000) sql_time_limit_ms Time limit for a SQL query in milliseconds (default=1000) default_facet_size Number of values to return for requested facets (default=30) facet_time_limit_ms Time limit for calculating a requested facet (default=200) facet_suggest_time_limit_ms Time limit for calculating a suggested facet (default=50) - Only apply responsive table styles to `.rows-and-column` Otherwise they interfere with tables in the description, e.g. on https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo - Refactored views into new `views/` modules, refs #256 - [Documentation for SQLite full-text search](http://datasette.readthedocs.io/en/latest/full_text_search.html) support, closes #253 - `/-/versions` now includes SQLite `fts_versions`, closes #252",107914493, https://github.com/simonw/datasette/releases/tag/0.22.1,11136605,MDc6UmVsZWFzZTExMTM2NjA1,0.22.1,main,Datasette 0.22.1,0,9599,0,2018-05-23T14:00:01Z,2018-05-23T14:04:17Z,"Bugfix release, plus we now use [versioneer](https://github.com/warner/python-versioneer) for our version numbers. - Faceting no longer breaks pagination, fixes #282 - Add ``__version_info__`` derived from `__version__` [Robert Gieseke] This might be tuple of more than two values (major and minor version) if commits have been made after a release. - Add version number support with Versioneer. [Robert Gieseke] Versioneer Licence: Public Domain (CC0-1.0) Closes #273 - Refactor inspect logic [Russ Garrett]",107914493, https://github.com/simonw/datasette/releases/tag/0.21,10868113,MDc6UmVsZWFzZTEwODY4MTEz,0.21,main,"Datasette 0.21: New _shape=, new _size=, search within columns",0,9599,0,2018-05-05T23:15:38Z,2018-05-05T23:21:33Z,"New JSON `_shape=` options, the ability to set table `_size=` and a mechanism for searching within specific columns. - Default tests to using a longer timelimit Every now and then a test will fail in Travis CI on Python 3.5 because it hit the default 20ms SQL time limit. Test fixtures now default to a 200ms time limit, and we only use the 20ms time limit for the specific test that tests query interruption. This should make our tests on Python 3.5 in Travis much more stable. - Support `_search_COLUMN=text` searches, closes [\#237](https://github.com/simonw/datasette/issues/237) - Show version on `/-/plugins` page, closes [\#248](https://github.com/simonw/datasette/issues/248) - `?_size=max` option, closes [\#249](https://github.com/simonw/datasette/issues/249) - Added `/-/versions` and `/-/versions.json`, closes [\#244](https://github.com/simonw/datasette/issues/244) Sample output: { ""python"": { ""version"": ""3.6.3"", ""full"": ""3.6.3 (default, Oct 4 2017, 06:09:38) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]"" }, ""datasette"": { ""version"": ""0.20"" }, ""sqlite"": { ""version"": ""3.23.1"", ""extensions"": { ""json1"": null, ""spatialite"": ""4.3.0a"" } } } - Renamed `?_sql_time_limit_ms=` to `?_timelimit`, closes [\#242](https://github.com/simonw/datasette/issues/242) - New `?_shape=array` option + tweaks to `_shape`, closes [\#245](https://github.com/simonw/datasette/issues/245) - Default is now `?_shape=arrays` (renamed from `lists`) - New `?_shape=array` returns an array of objects as the root object - Changed `?_shape=object` to return the object as the root - Updated docs - FTS tables now detected by `inspect()`, closes [\#240](https://github.com/simonw/datasette/issues/240) - New `?_size=XXX` querystring parameter for table view, closes [\#229](https://github.com/simonw/datasette/issues/229) Also added documentation for all of the `_special` arguments. Plus deleted some duplicate logic implementing `_group_count`. - If `max_returned_rows==page_size`, increment `max_returned_rows` - fixes [\#230](https://github.com/simonw/datasette/issues/230) - New `hidden: True` option for table metadata, closes [\#239](https://github.com/simonw/datasette/issues/239) - Hide `idx_*` tables if spatialite detected, closes [\#228](https://github.com/simonw/datasette/issues/228) - Added `class=rows-and-columns` to custom query results table - Added CSS class `rows-and-columns` to main table - `label_column` option in `metadata.json` - closes [\#234](https://github.com/simonw/datasette/issues/234)",107914493, https://github.com/simonw/datasette/releases/tag/0.20,10645022,MDc6UmVsZWFzZTEwNjQ1MDIy,0.20,main,Datasette 0.20: static assets and templates for plugins,0,9599,0,2018-04-20T14:36:29Z,2018-04-20T14:41:14Z,"Mostly new work on the [Plugins](http://datasette.readthedocs.io/en/latest/plugins.html) mechanism: plugins can now bundle static assets and custom templates, and ``datasette publish`` has a new ``--install=name-of-plugin`` option. - Add col-X classes to HTML table on custom query page - Fixed out-dated template in documentation - Plugins can now bundle custom templates, #224 - Added /-/metadata /-/plugins /-/inspect, #225 - Documentation for --install option, refs #223 - Datasette publish/package --install option, #223 - Fix for plugins in Python 3.5, #222 - New plugin hooks: extra_css_urls() and extra_js_urls(), #214 - /-/static-plugins/PLUGIN_NAME/ now serves static/ from plugins - now gets class=""col-X"" - plus added col-X documentation - Use to_css_class for table cell column classes This ensures that columns with spaces in the name will still generate usable CSS class names. Refs #209 - Add column name classes to s, make PK bold [Russ Garrett] - Don't duplicate simple primary keys in the link column [Russ Garrett] When there's a simple (single-column) primary key, it looks weird to duplicate it in the link column. This change removes the second PK column and treats the link column as if it were the PK column from a header/sorting perspective. - Correct escaping for HTML display of row links [Russ Garrett] - Longer time limit for test_paginate_compound_keys It was failing intermittently in Travis - see #209 - Use application/octet-stream for downloadable databses - Updated PyPI classifiers - Updated PyPI link to pypi.org",107914493, https://github.com/simonw/datasette/releases/tag/0.19,10575542,MDc6UmVsZWFzZTEwNTc1NTQy,0.19,main,Datasette 0.19: plugins preview,0,9599,0,2018-04-17T02:12:21Z,2018-04-17T02:21:51Z,"This is the first preview of the new Datasette plugins mechanism. Only two plugin hooks are available so far - for custom SQL functions and custom template filters. There's plenty more to come - read [the documentation](https://datasette.readthedocs.io/en/latest/plugins.html) and get involved in [the tracking ticket](https://github.com/simonw/datasette/issues/14) if you have feedback on the direction so far. - Fix for `_sort_desc=sortable_with_nulls` test, refs [#216](https://github.com/simonw/datasette/issues/216) - Fixed [#216](https://github.com/simonw/datasette/issues/216) - paginate correctly when sorting by nullable column - Initial documentation for plugins, closes [#213](https://github.com/simonw/datasette/issues/213) https://datasette.readthedocs.io/en/latest/plugins.html - New `--plugins-dir=plugins/` option ([#212](https://github.com/simonw/datasette/issues/212)) New option causing Datasette to load and evaluate all of the Python files in the specified directory and register any plugins that are defined in those files. This new option is available for the following commands: datasette serve mydb.db --plugins-dir=plugins/ datasette publish now/heroku mydb.db --plugins-dir=plugins/ datasette package mydb.db --plugins-dir=plugins/ - Start of the plugin system, based on pluggy ([#210](https://github.com/simonw/datasette/issues/14)) Uses https://pluggy.readthedocs.io/ originally created for the py.test project We're starting with two plugin hooks: `prepare_connection(conn)` This is called when a new SQLite connection is created. It can be used to register custom SQL functions. `prepare_jinja2_environment(env)` This is called with the Jinja2 environment. It can be used to register custom template tags and filters. An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using `pip install datasette-plugin-demos` Refs [#14](https://github.com/simonw/datasette/issues/14) - Return HTTP 405 on InvalidUsage rather than 500. [Russ Garrett] This also stops it filling up the logs. This happens for HEAD requests at the moment - which perhaps should be handled better, but that's a different issue.",107914493, https://github.com/simonw/datasette/releases/tag/0.18,10547491,MDc6UmVsZWFzZTEwNTQ3NDkx,0.18,main,Datasette 0.18: units,0,9599,0,2018-04-14T15:36:10Z,2018-04-14T15:45:11Z,"This release introduces [support for units](http://datasette.readthedocs.io/en/latest/metadata.html#specifying-units-for-a-column), contributed by Russ Garrett ([\#203](https://github.com/simonw/datasette/issues/203)). You can now optionally specify the units for specific columns using `metadata.json`. Once specified, units will be displayed in the HTML view of your table. They also become available for use in filters - if a column is configured with a unit of distance, you can request all rows where that column is less than 50 meters or more than 20 feet [for example](https://wtr-api.herokuapp.com/wtr-663ea99/license_frequency?frequency__gt=50GHz&height__lt=50ft). - Link foreign keys which don't have labels. \[Russ Garrett\] This renders unlabeled FKs as simple links. Also includes bonus fixes for two minor issues: - In foreign key link hrefs the primary key was escaped using HTML escaping rather than URL escaping. This broke some non-integer PKs. - Print tracebacks to console when handling 500 errors. - Fix SQLite error when loading rows with no incoming FKs. \[Russ Garrett\] This fixes `ERROR: conn=, sql = 'select ', params = {'id': '1'}` caused by an invalid query when loading incoming FKs. The error was ignored due to async but it still got printed to the console. - Allow custom units to be registered with Pint. \[Russ Garrett\] - Support units in filters. \[Russ Garrett\] - Tidy up units support. \[Russ Garrett\] - Add units to exported JSON - Units key in metadata skeleton - Docs - Initial units support. \[Russ Garrett\] Add support for specifying units for a column in `metadata.json` and rendering them on display using [pint](https://pint.readthedocs.io/en/latest/)",107914493, https://github.com/simonw/datasette/releases/tag/0.16,10542772,MDc6UmVsZWFzZTEwNTQyNzcy,0.16,main,"Datasette 0.16: sort on mobile, better error handling",0,9599,0,2018-04-13T18:28:55Z,2018-04-13T21:10:53Z," - Better mechanism for handling errors; 404s for missing table/database New error mechanism closes [#193](https://github.com/simonw/datasette/issues/193) 404s for missing tables/databases closes [#184](https://github.com/simonw/datasette/issues/184) - long\_description in markdown for the new PyPI - Hide Spatialite system tables. \[Russ Garrett\] - Allow `explain select` / `explain query plan select` [#201](https://github.com/simonw/datasette/issues/201) - Datasette inspect now finds primary\_keys [#195](https://github.com/simonw/datasette/issues/195) - Ability to sort using form fields (for mobile portrait mode) [#199](https://github.com/simonw/datasette/issues/199) We now display sort options as a select box plus a descending checkbox, which means you can apply sort orders even in portrait mode on a mobile phone where the column headers are hidden.",107914493, https://github.com/simonw/datasette/releases/tag/0.15,10458641,MDc6UmVsZWFzZTEwNDU4NjQx,0.15,main,Datasette 0.15: sort by column,0,9599,0,2018-04-09T15:48:24Z,2018-04-09T15:55:29Z,"The biggest new feature in this release is the ability to sort by column. On the table page the column headers can now be clicked to apply sort (or descending sort), or you can specify `?_sort=column` or `?_sort_desc=column` directly in the URL. You can try this feature out on [this fivethirtyeight data](https://fivethirtyeight.datasettes.com/fivethirtyeight/congress-age%2Fcongress-terms) about the ages of different US politicians. - `table_rows` =\> `table_rows_count`, `filtered_table_rows` =\> `filtered_table_rows_count` Renamed properties. Closes [\#194](https://github.com/simonw/datasette/issues/194) - New `sortable_columns` option in `metadata.json` to control sort options. You can now explicitly set which columns in a table can be used for sorting using the `_sort` and `_sort_desc` arguments using `metadata.json`: { ""databases"": { ""database1"": { ""tables"": { ""example_table"": { ""sortable_columns"": [ ""height"", ""weight"" ] } } } } } Refs [\#189](https://github.com/simonw/datasette/issues/189) - Column headers now link to sort/desc sort - refs [\#189](https://github.com/simonw/datasette/issues/189) - `_sort` and `_sort_desc` parameters for table views Allows for paginated sorted results based on a specified column. Refs [\#189](https://github.com/simonw/datasette/issues/189) - Total row count now correct even if `_next` applied - Use .custom\_sql() for \_group\_count implementation (refs [\#150](https://github.com/simonw/datasette/issues/150)) - Make HTML title more readable in query template ([\#180](https://github.com/simonw/datasette/issues/180)) \[Ryan Pitts\] - New `?_shape=objects/object/lists` param for JSON API ([\#192](https://github.com/simonw/datasette/issues/192)) New `_shape=` parameter replacing old `.jsono` extension Now instead of this: /database/table.jsono We use the `_shape` parameter like this: /database/table.json?_shape=objects Also introduced a new `_shape` called `object` which looks like this: /database/table.json?_shape=object Returning an object for the rows key: ... ""rows"": { ""pk1"": { ... }, ""pk2"": { ... } } Refs [\#122](https://github.com/simonw/datasette/issues/122) - Utility for writing test database fixtures to a .db file `python tests/fixtures.py /tmp/hello.db` This is useful for making a SQLite database of the test fixtures for interactive exploration. - Compound primary key `_next=` now plays well with extra filters Closes [\#190](https://github.com/simonw/datasette/issues/190) - Fixed bug with keyset pagination over compound primary keys Refs [\#190](https://github.com/simonw/datasette/issues/190) - Database/Table views inherit `source/license/source_url/license_url` metadata If you set the `source_url/license_url/source/license` fields in your root metadata those values will now be inherited all the way down to the database and table templates. The `title/description` are NOT inherited. Also added unit tests for the HTML generated by the metadata. Refs [\#185](https://github.com/simonw/datasette/issues/185) - Add metadata, if it exists, to heroku temp dir ([\#178](https://github.com/simonw/datasette/issues/178)) \[Tony Hirst\] - Initial documentation for pagination - Broke up test\_app into test\_api and test\_html - Fixed bug with .json path regular expression I had a table called `geojson` and it caused an exception because the regex was matching `.json` and not `\.json` - Deploy to Heroku with Python 3.6.3",107914493, https://github.com/simonw/datasette/releases/tag/0.14,8841695,MDc6UmVsZWFzZTg4NDE2OTU=,0.14,main,Datasette 0.14: customization edition,0,9599,0,2017-12-10T01:33:24Z,2017-12-10T01:41:14Z,"The theme of this release is customization: Datasette now allows every aspect of its presentation [to be customized](http://datasette.readthedocs.io/en/latest/custom_templates.html) either using additional CSS or by providing entirely new templates. Datasette's [metadata.json format](http://datasette.readthedocs.io/en/latest/metadata.html) has also been expanded, to allow per-database and per-table metadata. A new `datasette skeleton` command can be used to generate a skeleton JSON file ready to be filled in with per-database and per-table details. The `metadata.json` file can also be used to define [canned queries](http://datasette.readthedocs.io/en/latest/sql_queries.html#canned-queries), as a more powerful alternative to SQL views. - `extra_css_urls`/`extra_js_urls` in metadata A mechanism in the `metadata.json` format for adding custom CSS and JS urls. Create a `metadata.json` file that looks like this: { ""extra_css_urls"": [ ""https://simonwillison.net/static/css/all.bf8cd891642c.css"" ], ""extra_js_urls"": [ ""https://code.jquery.com/jquery-3.2.1.slim.min.js"" ] } Then start datasette like this: datasette mydb.db --metadata=metadata.json The CSS and JavaScript files will be linked in the `` of every page. You can also specify a SRI (subresource integrity hash) for these assets: { ""extra_css_urls"": [ { ""url"": ""https://simonwillison.net/static/css/all.bf8cd891642c.css"", ""sri"": ""sha384-9qIZekWUyjCyDIf2YK1FRoKiPJq4PHt6tp/ulnuuyRBvazd0hG7pWbE99zvwSznI"" } ], ""extra_js_urls"": [ { ""url"": ""https://code.jquery.com/jquery-3.2.1.slim.min.js"", ""sri"": ""sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="" } ] } Modern browsers will only execute the stylesheet or JavaScript if the SRI hash matches the content served. You can generate hashes using - Auto-link column values that look like URLs ([\#153](https://github.com/simonw/datasette/issues/153)) - CSS styling hooks as classes on the body ([\#153](https://github.com/simonw/datasette/issues/153)) Every template now gets CSS classes in the body designed to support custom styling. The index template (the top level page at `/`) gets this: The database template (`/dbname/`) gets this: The table template (`/dbname/tablename`) gets: The row template (`/dbname/tablename/rowid`) gets: The `db-x` and `table-x` classes use the database or table names themselves IF they are valid CSS identifiers. If they aren't, we strip any invalid characters out and append a 6 character md5 digest of the original name, in order to ensure that multiple tables which resolve to the same stripped character version still have different CSS classes. Some examples (extracted from the unit tests): ""simple"" => ""simple"" ""MixedCase"" => ""MixedCase"" ""-no-leading-hyphens"" => ""no-leading-hyphens-65bea6"" ""_no-leading-underscores"" => ""no-leading-underscores-b921bc"" ""no spaces"" => ""no-spaces-7088d7"" ""-"" => ""336d5e"" ""no $ characters"" => ""no--characters-59e024"" - `datasette --template-dir=mytemplates/` argument You can now pass an additional argument specifying a directory to look for custom templates in. Datasette will fall back on the default templates if a template is not found in that directory. - Ability to over-ride templates for individual tables/databases. It is now possible to over-ride templates on a per-database / per-row or per-table basis. When you access e.g. `/mydatabase/mytable` Datasette will look for the following: - table-mydatabase-mytable.html - table.html If you provided a `--template-dir` argument to datasette serve it will look in that directory first. The lookup rules are as follows: Index page (/): index.html Database page (/mydatabase): database-mydatabase.html database.html Table page (/mydatabase/mytable): table-mydatabase-mytable.html table.html Row page (/mydatabase/mytable/id): row-mydatabase-mytable.html row.html If a table name has spaces or other unexpected characters in it, the template filename will follow the same rules as our custom `` CSS classes - for example, a table called ""Food Trucks"" will attempt to load the following templates: table-mydatabase-Food-Trucks-399138.html table.html It is possible to extend the default templates using Jinja template inheritance. If you want to customize EVERY row template with some additional content you can do so by creating a row.html template like this: {% extends ""default:row.html"" %} {% block content %}

EXTRA HTML AT THE TOP OF THE CONTENT BLOCK

This line renders the original block:

{{ super() }} {% endblock %} - `--static` option for datasette serve ([\#160](https://github.com/simonw/datasette/issues/160)) You can now tell Datasette to serve static files from a specific location at a specific mountpoint. For example: datasette serve mydb.db --static extra-css:/tmp/static/css Now if you visit this URL: http://localhost:8001/extra-css/blah.css The following file will be served: /tmp/static/css/blah.css - Canned query support. Named canned queries can now be defined in `metadata.json` like this: { ""databases"": { ""timezones"": { ""queries"": { ""timezone_for_point"": ""select tzid from timezones ..."" } } } } These will be shown in a new ""Queries"" section beneath ""Views"" on the database page. - New `datasette skeleton` command for generating `metadata.json` ([\#164](https://github.com/simonw/datasette/issues/164)) - `metadata.json` support for per-table/per-database metadata ([\#165](https://github.com/simonw/datasette/issues/165)) Also added support for descriptions and HTML descriptions. Here's an example metadata.json file illustrating custom per-database and per-table metadata: { ""title"": ""Overall datasette title"", ""description_html"": ""This is a description with HTML."", ""databases"": { ""db1"": { ""title"": ""First database"", ""description"": ""This is a string description & has no HTML"", ""license_url"": ""http://example.com/"", ""license"": ""The example license"", ""queries"": { ""canned_query"": ""select * from table1 limit 3;"" }, ""tables"": { ""table1"": { ""title"": ""Custom title for table1"", ""description"": ""Tables can have descriptions too"", ""source"": ""This has a custom source"", ""source_url"": ""http://example.com/"" } } } } } - Renamed `datasette build` command to `datasette inspect` ([\#130](https://github.com/simonw/datasette/issues/130)) - Upgrade to Sanic 0.7.0 ([\#168](https://github.com/simonw/datasette/issues/168)) - Package and publish commands now accept `--static` and `--template-dir` Example usage: datasette package --static css:extra-css/ --static js:extra-js/ \ sf-trees.db --template-dir templates/ --tag sf-trees --branch master This creates a local Docker image that includes copies of the templates/, extra-css/ and extra-js/ directories. You can then run it like this: docker run -p 8001:8001 sf-trees For publishing to Zeit now: datasette publish now --static css:extra-css/ --static js:extra-js/ \ sf-trees.db --template-dir templates/ --name sf-trees --branch master - HTML comment showing which templates were considered for a page ([\#171](https://github.com/simonw/datasette/issues/171)) ",107914493, https://github.com/simonw/datasette/releases/tag/0.13,8652546,MDc6UmVsZWFzZTg2NTI1NDY=,0.13,main,"Datasette 0.13: foreign key, search and filters",0,9599,0,2017-11-25T03:33:39Z,2017-11-25T03:44:46Z,"# 0.13 (2017-11-24) - Search now applies to current filters. Combined search into the same form as filters. Closes [\#133](https://github.com/simonw/datasette/issues/133) - Much tidier design for table view header. Closes [\#147](https://github.com/simonw/datasette/issues/147) - Added `?column__not=blah` filter. Closes [\#148](https://github.c) - Row page now resolves foreign keys. Closes [\#132]() - Further tweaks to select/input filter styling. Refs [\#86]() - thanks for the help, @natbat\! - Show linked foreign key in table cells. - Added UI for editing table filters. Refs [\#86]() - Hide FTS-created tables on index pages. Closes [\#129]() - Add publish to heroku support \[Jacob Kaplan-Moss\] `datasette publish heroku mydb.db` Pull request [\#104]() - Initial implementation of `?_group_count=column`. URL shortcut for counting rows grouped by one or more columns. `?_group_count=column1&_group_count=column2` works as well. SQL generated looks like this: select ""qSpecies"", count(*) as ""count"" from Street_Tree_List group by ""qSpecies"" order by ""count"" desc limit 100 Or for two columns like this: select ""qSpecies"", ""qSiteInfo"", count(*) as ""count"" from Street_Tree_List group by ""qSpecies"", ""qSiteInfo"" order by ""count"" desc limit 100 Refs [\#44]() - Added `--build=master` option to datasette publish and package. The `datasette publish` and `datasette package` commands both now accept an optional `--build` argument. If provided, this can be used to specify a branch published to GitHub that should be built into the container. This makes it easier to test code that has not yet been officially released to PyPI, e.g.: datasette publish now mydb.db --branch=master - Implemented `?_search=XXX` + UI if a FTS table is detected. Closes [\#131]() - Added `datasette --version` support. - Table views now show expanded foreign key references, if possible. If a table has foreign key columns, and those foreign key tables have `label_columns`, the TableView will now query those other tables for the corresponding values and display those values as links in the corresponding table cells. label\_columns are currently detected by the `inspect()` function, which looks for any table that has just two columns - an ID column and one other - and sets the `label_column` to be that second non-ID column. - Don't prevent tabbing to ""Run SQL"" button ([\#117]()) \[Robert Gieseke\] See comment in [\#115]() - Add keyboard shortcut to execute SQL query ([\#115]()) \[Robert Gieseke\] - Allow `--load-extension` to be set via environment variable. - Add support for `?field__isnull=1` ([\#107]()) \[Ray N\] - Add spatialite, switch to debian and local build ([\#114]()) \[Ariel Núñez\] - Added `--load-extension` argument to datasette serve. Allows loading of SQLite extensions. Refs [\#110](). ",107914493, https://github.com/simonw/datasette/releases/tag/0.12,8546575,MDc6UmVsZWFzZTg1NDY1NzU=,0.12,main,Datasette 0.12,0,9599,0,2017-11-16T15:37:46Z,2017-11-16T16:01:35Z,"- Added `__version__`, now displayed as tooltip in page footer (#108). - Added initial docs, including a changelog (#99). - Turned on auto-escaping in Jinja. - Added a UI for editing named parameters (#96). You can now construct a custom SQL statement using SQLite named parameters (e.g. `:name`) and datasette will display form fields for editing those parameters. [Here's an example](https://australian-dogs.now.sh/australian-dogs-3ba9628?sql=select+name%2C+count%28*%29+as+n+from+%28%0D%0A%0D%0Aselect+upper%28%22Animal+name%22%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2013%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2014%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2015%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22AnimalName%22%29+as+name+from+%5BCity-of-Port-Adelaide-Enfield-Dog_Registrations_2016%5D+where+AnimalBreed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5BMitcham-dog-registrations-2015%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22DOG_NAME%22%29+as+name+from+%5Bburnside-dog-registrations-2015%5D+where+DOG_BREED+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28%22Animal_Name%22%29+as+name+from+%5Bcity-of-playford-2015-dog-registration%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5Bcity-of-prospect-dog-registration-details-2016%5D+where%22Breed+Description%22+like+%3Abreed%0D%0A%0D%0A%29+group+by+name+order+by+n+desc%3B&breed=pug) which lets you see the most popular names for dogs of different species registered through various dog registration schemes in Australia. - Pin to specific Jinja version. (#100). - Default to 127.0.0.1 not 0.0.0.0. (#98). - Added extra metadata options to publish and package commands. (#92). You can now run these commands like so: datasette now publish mydb.db \ --title=""My Title"" \ --source=""Source"" \ --source_url=""http://www.example.com/"" \ --license=""CC0"" \ --license_url=""https://creativecommons.org/publicdomain/zero/1.0/"" This will write those values into the metadata.json that is packaged with the app. If you also pass `--metadata=metadata.json` that file will be updated with the extra values before being written into the Docker image. - Added simple production-ready Dockerfile (#94) \[Andrew Cutler\] - New `?_sql_time_limit_ms=10` argument to database and table page (#95) - SQL syntax highlighting with Codemirror (#89) \[Tom Dyson\]",107914493, https://github.com/simonw/datasette/releases/tag/1.0a7,122124154,RE_kwDOBm6k_c4HR3d6,1.0a7,1.0a.x,1.0a7,0,9599,1,2023-09-21T22:06:19Z,2023-09-21T22:13:27Z,- Fix for a crashing bug caused by viewing the table page for a named in-memory database. [#2189](https://github.com/simonw/datasette/issues/2189),107914493, https://github.com/simonw/datasette/releases/tag/1.0a6,120375181,RE_kwDOBm6k_c4HLMeN,1.0a6,main,1.0a6,0,9599,1,2023-09-08T04:44:08Z,2023-09-08T04:45:12Z,"- New plugin hook: [actors_from_ids(datasette, actor_ids)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-hook-actors-from-ids) and an internal method to accompany it, [await .actors_from_ids(actor_ids)](https://docs.datasette.io/en/latest/internals.html#datasette-actors-from-ids). This mechanism is intended to be used by plugins that may need to display the actor who was responsible for something managed by that plugin: they can now resolve the recorded IDs of actors into the full actor objects. ([#2181](https://github.com/simonw/datasette/issues/2181)) - `DATASETTE_LOAD_PLUGINS` environment variable for [controlling which plugins](https://docs.datasette.io/en/latest/plugins.html#plugins-datasette-load-plugins) are loaded by Datasette. ([#2164](https://github.com/simonw/datasette/issues/2164)) - Datasette now checks if the user has permission to view a table linked to by a foreign key before turning that foreign key into a clickable link. ([#2178](https://github.com/simonw/datasette/issues/2178)) - The `execute-sql` permission now implies that the actor can also view the database and instance. ([#2169](https://github.com/simonw/datasette/issues/2169)) - Documentation describing a pattern for building plugins that themselves [define further hooks](https://docs.datasette.io/en/latest/writing_plugins.html#writing-plugins-extra-hooks) for other plugins. ([#1765](https://github.com/simonw/datasette/issues/1765)) - Datasette is now tested against the Python 3.12 preview. ([#2175](https://github.com/simonw/datasette/pull/2175))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a5,119112633,RE_kwDOBm6k_c4HGYO5,1.0a5,main,1.0a5,0,9599,1,2023-08-29T17:17:54Z,2023-08-29T17:19:35Z,"- When restrictions are applied to [API tokens](https://docs.datasette.io/en/1.0a5/authentication.html#createtokenview), those restrictions now behave slightly differently: applying the `view-table` restriction will imply the ability to `view-database` for the database containing that table, and both `view-table` and `view-database` will imply `view-instance`. Previously you needed to create a token with restrictions that explicitly listed `view-instance` and `view-database` and `view-table` in order to view a table without getting a permission denied error. ([#2102](https://github.com/simonw/datasette/issues/2102)) - New `datasette.yaml` (or `.json`) configuration file, which can be specified using `datasette -c path-to-file`. The goal here to consolidate settings, plugin configuration, permissions, canned queries, and other Datasette configuration into a single single file, separate from `metadata.yaml`. The legacy `settings.json` config file used for [Configuration directory mode](https://docs.datasette.io/en/1.0a5/settings.html#config-dir) has been removed, and `datasette.yaml` has a `""settings""` section where the same settings key/value pairs can be included. In the next future alpha release, more configuration such as plugins/permissions/canned queries will be moved to the `datasette.yaml` file. See [#2093](https://github.com/simonw/datasette/issues/2093) for more details. Thanks, Alex Garcia. - The `-s/--setting` option can now take dotted paths to nested settings. These will then be used to set or over-ride the same options as are present in the new configuration file. ([#2156](https://github.com/simonw/datasette/issues/2156)) - New `--actor '{""id"": ""json-goes-here""}'` option for use with `datasette --get` to treat the simulated request as being made by a specific actor, see [datasette --get](https://docs.datasette.io/en/1.0a5/cli-reference.html#cli-datasette-get). ([#2153](https://github.com/simonw/datasette/issues/2153)) - The Datasette `_internal` database has had some changes. It no longer shows up in the `datasette.databases` list by default, and is now instead available to plugins using the `datasette.get_internal_database()`. Plugins are invited to use this as a private database to store configuration and settings and secrets that should not be made visible through the default Datasette interface. Users can pass the new `--internal internal.db` option to persist that internal database to disk. Thanks, Alex Garcia. ([#2157](https://github.com/simonw/datasette/issues/2157)).",107914493, https://github.com/simonw/datasette/releases/tag/1.0a4,118245443,RE_kwDOBm6k_c4HDEhD,1.0a4,main,1.0a4,0,9599,1,2023-08-22T17:10:01Z,2023-08-22T17:13:26Z,"This alpha fixes a security issue with the `/-/api` API explorer. On authenticated Datasette instances (instances protected using plugins such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords)) the API explorer interface could reveal the names of databases and tables within the protected instance. The data stored in those tables was not revealed. For more information and workarounds, read [the security advisory](https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq). The issue has been present in every previous alpha version of Datasette 1.0: versions 1.0a0, 1.0a1, 1.0a2 and 1.0a3. Also in this alpha: - The new `datasette plugins --requirements` option outputs a list of currently installed plugins in Python `requirements.txt` format, useful for duplicating that installation elsewhere. ([#2133](https://github.com/simonw/datasette/issues/2133)) - [Writable canned queries](https://docs.datasette.io/en/latest/sql_queries.html#canned-queries-writable) can now define a `on_success_message_sql` field in their configuration, containing a SQL query that should be executed upon successful completion of the write operation in order to generate a message to be shown to the user. ([#2138](https://github.com/simonw/datasette/issues/2138)) - The automatically generated border color for a database is now shown in more places around the application. ([#2119](https://github.com/simonw/datasette/issues/2119)) - Every instance of example shell script code in the documentation should now include a working copy button, free from additional syntax. ([#2140](https://github.com/simonw/datasette/issues/2140))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/118245443/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/1.0a3,115813784,RE_kwDOBm6k_c4G5y2Y,1.0a3,main,1.0a3,0,9599,1,2023-08-09T19:13:11Z,2023-08-09T19:17:26Z,"This alpha release previews the updated design for Datasette's default JSON API. ([#782](https://github.com/simonw/datasette/issues/782)) The new [default JSON representation](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-default) for both table pages (`/dbname/table.json`) and arbitrary SQL queries (`/dbname.json?sql=...`) is now shaped like this: ```json { ""ok"": true, ""rows"": [ { ""id"": 3, ""name"": ""Detroit"" }, { ""id"": 2, ""name"": ""Los Angeles"" }, { ""id"": 4, ""name"": ""Memnonia"" }, { ""id"": 1, ""name"": ""San Francisco"" } ], ""truncated"": false } ``` Tables will include an additional `""next""` key for pagination, which can be passed to `?_next=` to fetch the next page of results. The various `?_shape=` options continue to work as before - see [Different shapes](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-shapes) for details. A new `?_extra=` mechanism is available for tables, but has not yet been stabilized or documented. Details on that are available in [#262](https://github.com/simonw/datasette/issues/262). ### Smaller changes - Datasette documentation now shows YAML examples for [Metadata](https://docs.datasette.io/en/1.0a3/metadata.html#metadata) by default, with a tab interface for switching to JSON. ([#1153](https://github.com/simonw/datasette/issues/1153)) - [register_output_renderer(datasette)](https://docs.datasette.io/en/1.0a3/plugin_hooks.html#plugin-register-output-renderer) plugins now have access to `error` and `truncated` arguments, allowing them to display error messages and take into account truncated results. ([#2130](https://github.com/simonw/datasette/issues/2130)) - `render_cell()` plugin hook now also supports an optional `request` argument. ([#2007](https://github.com/simonw/datasette/issues/2007)) - New `Justfile` to support development workflows for Datasette using [Just](https://github.com/casey/just). - `datasette.render_template()` can now accepts a `datasette.views.Context` subclass as an alternative to a dictionary. ([#2127](https://github.com/simonw/datasette/issues/2127)) - `datasette install -e path` option for editable installations, useful while developing plugins. ([#2106](https://github.com/simonw/datasette/issues/2106)) - When started with the `--cors` option Datasette now serves an `Access-Control-Max-Age: 3600` header, ensuring CORS OPTIONS requests are repeated no more than once an hour. ([#2079](https://github.com/simonw/datasette/issues/2079)) - Fixed a bug where the `_internal` database could display `None` instead of `null` for in-memory databases. ([#1970](https://github.com/simonw/datasette/issues/1970))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/115813784/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 3, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/1.0a2,86103928,RE_kwDOBm6k_c4FIdd4,1.0a2,main,1.0a2,0,9599,1,2022-12-15T02:02:42Z,2022-12-15T02:03:59Z,"The third Datasette 1.0 alpha release adds upsert support to the JSON API, plus the ability to specify finely grained permissions when creating an API token. See [Datasette 1.0a2: Upserts and finely grained permissions](https://simonwillison.net/2022/Dec/15/datasette-1a2/) for an extended, annotated version of these release notes. - New `/db/table/-/upsert` API, [documented here](https://docs.datasette.io/en/latest/json_api.html#tableupsertview). upsert is an update-or-insert: existing rows will have specified keys updated, but if no row matches the incoming primary key a brand new row will be inserted instead. ([#1878](https://github.com/simonw/datasette/issues/1878)) - New [register_permissions(datasette)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-register-permissions) plugin hook. Plugins can now register named permissions, which will then be listed in various interfaces that show available permissions. ([#1940](https://github.com/simonw/datasette/issues/1940)) - The `/db/-/create` API for [creating a table](https://docs.datasette.io/en/latest/json_api.html#tablecreateview) now accepts `""ignore"": true` and `""replace"": true` options when called with the `""rows""` property that creates a new table based on an example set of rows. This means the API can be called multiple times with different rows, setting rules for what should happen if a primary key collides with an existing row. ([#1927](https://github.com/simonw/datasette/issues/1927)) - Arbitrary permissions can now be configured at the instance, database and resource (table, SQL view or canned query) level in Datasette's [Metadata](https://docs.datasette.io/en/latest/metadata.html#metadata) JSON and YAML files. The new `""permissions""` key can be used to specify which actors should have which permissions. See [Other permissions in metadata](https://docs.datasette.io/en/latest/authentication.html#authentication-permissions-other) for details. ([#1636](https://github.com/simonw/datasette/issues/1636)) - The `/-/create-token` page can now be used to create API tokens which are restricted to just a subset of actions, including against specific databases or resources. See [API Tokens](https://docs.datasette.io/en/latest/authentication.html#createtokenview) for details. ([#1947](https://github.com/simonw/datasette/issues/1947)) - Likewise, the [datasette create-token](https://docs.datasette.io/en/latest/internals.html#create-token-actor-id-expires-after-none-restrict-all-none-restrict-database-none-restrict-resource-none) CLI command can now create tokens with [a subset of permissions](https://docs.datasette.io/en/latest/authentication.html#authentication-cli-create-token-restrict). ([#1855](https://github.com/simonw/datasette/issues/1855)) - New datasette.create_token() API method ` for programmatically creating signed API tokens. ([#1951](https://github.com/simonw/datasette/issues/1951)) - `/db/-/create` API now requires actor to have `insert-row` permission in order to use the `""row""` or `""rows""` properties. ([#1937](https://github.com/simonw/datasette/issues/1937))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a1,84755750,RE_kwDOBm6k_c4FDUUm,1.0a1,main,1.0a1,0,9599,1,2022-12-01T21:30:39Z,2022-12-01T21:42:45Z,"- Write APIs now serve correct CORS headers if Datasette is started in `--cors` mode. See the full list of [CORS headers](https://docs.datasette.io/en/latest/json_api.html#json-api) in the documentation. ([#1922](https://github.com/simonw/datasette/issues/1922)) - Fixed a bug where the `_memory` database could be written to even though writes were not persisted. ([#1917](https://github.com/simonw/datasette/issues/1917)) - The demo instance now includes an `ephemeral` database which can be used to test Datasette's write APIs, using the new [datasette-ephemeral-tables](https://datasette.io/plugins/datasette-ephemeral-tables) plugin to drop any created tables after five minutes. This database is only available if you sign in as the root user using the link on the homepage. ([#1915](https://github.com/simonw/datasette/issues/1915)) - Fixed a bug where hitting the write endpoints with a `GET` request returned a 500 error. It now returns a 405 (method not allowed) error instead. ([#1916](https://github.com/simonw/datasette/issues/1916)) - The list of endpoints in the API explorer now lists mutable databases first. ([#1918](https://github.com/simonw/datasette/issues/1918)) - The `""ignore"": true` and `""replace"": true` options for the insert API are [now documented](https://docs.datasette.io/en/latest/json_api.html#tableinsertview). ([#1924](https://github.com/simonw/datasette/issues/1924))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a0,84496148,RE_kwDOBm6k_c4FCU8U,1.0a0,main,1.0a0,0,9599,1,2022-11-29T19:57:54Z,2022-11-29T19:58:55Z,"This first alpha release of Datasette 1.0 introduces a brand new collection of APIs for writing to the database ([#1850](https://github.com/simonw/datasette/issues/1850)), as well as a new API token mechanism baked into Datasette core. Previously, API tokens have only been supported by installing additional plugins. This is very much a preview: expect many more backwards incompatible API changes prior to the full 1.0 release. Feedback enthusiastically welcomed, either through [issue comments](https://github.com/simonw/datasette/issues/1850) or via the [Datasette Discord](https://datasette.io/discord) community. ### Signed API tokens - New `/-/create-token` page allowing authenticated users to create signed API tokens that can act on their behalf, see [API Tokens](https://docs.datasette.io/en/1.0-dev/authentication.html#createtokenview). ([#1852](https://github.com/simonw/datasette/issues/1852)) - New `datasette create-token` command for creating tokens from the command line: [datasette create-token](https://docs.datasette.io/en/1.0-dev/authentication.html#authentication-cli-create-token). - New [allow_signed_tokens](https://docs.datasette.io/en/1.0-dev/settings.html#setting-allow-signed-tokens) setting which can be used to turn off signed token support. ([#1856](https://github.com/simonw/datasette/issues/1856)) - New [max_signed_tokens_ttl](https://docs.datasette.io/en/1.0-dev/settings.html#setting-max-signed-tokens-ttl) setting for restricting the maximum allowed duration of a signed token. ([#1858](https://github.com/simonw/datasette/issues/1858)) ### Write API - New API explorer at `/-/api` for trying out the API. ([#1871](https://github.com/simonw/datasette/issues/1871)) - `/db/-/create` API for [Creating a table](https://docs.datasette.io/en/1.0-dev/json_api.html#tablecreateview). ([#1882](https://github.com/simonw/datasette/issues/1882)) - `/db/table/-/insert` API for [Inserting rows](https://docs.datasette.io/en/1.0-dev/json_api.html#tableinsertview). ([#1851](https://github.com/simonw/datasette/issues/1851)) - `/db/table/-/drop` API for [Dropping tables](https://docs.datasette.io/en/1.0-dev/json_api.html#tabledropview). ([#1874](https://github.com/simonw/datasette/issues/1874)) - `/db/table/pk/-/update` API for [Updating a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowupdateview). ([#1863](https://github.com/simonw/datasette/issues/1863)) - `/db/table/pk/-/delete` API for [Deleting a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowdeleteview). ([#1864](https://github.com/simonw/datasette/issues/1864))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/84496148/reactions"", ""total_count"": 2, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/0.64.5,124182616,RE_kwDOBm6k_c4HZuBY,0.64.5,0.64.x,0.64.5,0,9599,0,2023-10-08T16:03:37Z,2023-10-08T16:05:20Z,"- Dropped dependency on `click-default-group-wheel`, which could cause a dependency conflict. ([#2197](https://github.com/simonw/datasette/issues/2197))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/124182616/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/0.64.4,122109244,RE_kwDOBm6k_c4HRz08,0.64.4,0.64.x,0.64.4,0,9599,0,2023-09-21T19:28:45Z,2023-09-21T19:43:54Z,- Fix for a crashing bug caused by viewing the table page for a named in-memory database. [#2189](https://github.com/simonw/datasette/issues/2189),107914493, https://github.com/simonw/datasette/releases/tag/0.64.3,101136455,RE_kwDOBm6k_c4GBzhH,0.64.3,0.64.x,0.64.3,0,9599,0,2023-04-27T14:55:25Z,2023-04-27T15:00:27Z,- Added `pip` and `setuptools` as explicit dependencies. This fixes a bug where Datasette could not be installed using [Rye](https://github.com/mitsuhiko/rye). ([#2065](https://github.com/simonw/datasette/issues/2065)),107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/101136455/reactions"", ""total_count"": 3, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/0.64.2,94985654,RE_kwDOBm6k_c4FqV22,0.64.2,0.64.x,0.64.2,0,9599,0,2023-03-08T20:41:13Z,2023-03-08T20:46:27Z,"- Fixed a bug with `datasette publish cloudrun` where deploys all used the same Docker image tag. This was mostly inconsequential as the service is deployed as soon as the image has been pushed to the registry, but could result in the incorrect image being deployed if two different deploys for two separate services ran at exactly the same time. [#2036](https://github.com/simonw/datasette/issues/2036) ",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/94985654/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/0.64.1,88623648,RE_kwDOBm6k_c4FSEog,0.64.1,0.64.x,0.64.1,0,9599,0,2023-01-11T18:21:37Z,2023-01-11T18:27:56Z,"- Documentation now links to a current source of information for installing Python 3. ([#1987](https://github.com/simonw/datasette/issues/1987)) - Incorrectly calling the Datasette constructor using `Datasette(""path/to/data.db"")` instead of `Datasette([""path/to/data.db""])` now returns a useful error message. ([#1985](https://github.com/simonw/datasette/issues/1985))",107914493, https://github.com/simonw/datasette/releases/tag/0.64,88331580,RE_kwDOBm6k_c4FQ9U8,0.64,0.63.x,0.64,0,9599,0,2023-01-09T16:37:21Z,2023-01-09T16:49:04Z,"- Datasette now **strongly recommends against allowing arbitrary SQL queries if you are using SpatiaLite**. SpatiaLite includes SQL functions that could cause the Datasette server to crash. See [SpatiaLite](https://docs.datasette.io/en/stable/spatialite.html#spatialite) for more details. - New [default_allow_sql](https://docs.datasette.io/en/stable/settings.html#setting-default-allow-sql) setting, providing an easier way to disable all arbitrary SQL execution by end users: `datasette --setting default_allow_sql off`. See also [Controlling the ability to execute arbitrary SQL](https://docs.datasette.io/en/stable/authentication.html#authentication-permissions-execute-sql). ([#1409](https://github.com/simonw/datasette/issues/1409)) - [Building a location to time zone API with SpatiaLite](https://datasette.io/tutorials/spatialite) is a new Datasette tutorial showing how to safely use SpatiaLite to create a location to time zone API. - New documentation about [how to debug problems loading SQLite extensions](https://docs.datasette.io/en/stable/installation.html#installation-extensions). The error message shown when an extension cannot be loaded has also been improved. ([#1979](https://github.com/simonw/datasette/issues/1979)) - Fixed an accessibility issue: the `