home / github

Menu
  • Search all tables
  • GraphQL API

releases

Table actions
  • GraphQL API for releases

125 rows where repo = 107914493 sorted by created_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: target_commitish, prerelease, created_at (date), published_at (date)

id html_url node_id tag_name target_commitish name draft author prerelease created_at ▲ published_at body repo reactions
94985654 https://github.com/simonw/datasette/releases/tag/0.64.2 RE_kwDOBm6k_c4FqV22 0.64.2 0.64.x 0.64.2 0 simonw 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
datasette 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
}
88623648 https://github.com/simonw/datasette/releases/tag/0.64.1 RE_kwDOBm6k_c4FSEog 0.64.1 0.64.x 0.64.1 0 simonw 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)
  • 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)
datasette 107914493  
88331580 https://github.com/simonw/datasette/releases/tag/0.64 RE_kwDOBm6k_c4FQ9U8 0.64 0.63.x 0.64 0 simonw 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 for more details.
  • New 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. (#1409)
  • Building a location to time zone API with 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. The error message shown when an extension cannot be loaded has also been improved. (#1979)
  • Fixed an accessibility issue: the <select> elements in the table filter form now show an outline when they are currently focused. (#1771)
datasette 107914493  
86425242 https://github.com/simonw/datasette/releases/tag/0.63.3 RE_kwDOBm6k_c4FJr6a 0.63.3 0.63.x 0.63.3 0 simonw 9599 0 2022-12-18T03:08:01Z 2022-12-18T03:10:52Z
  • Fixed a bug where datasette --root, when running in Docker, would only output the URL to sign in as root when the server shut down, not when it started up. (#1958)
  • You no longer need to ensure await datasette.invoke_startup() has been called in order for Datasette to start correctly serving requests - this is now handled automatically the first time the server receives a request. This fixes a bug experienced when Datasette is served directly by an ASGI application server such as Uvicorn or Gunicorn. It also fixes a bug with the datasette-gunicorn plugin. (#1955)
datasette 107914493  
86103928 https://github.com/simonw/datasette/releases/tag/1.0a2 RE_kwDOBm6k_c4FIdd4 1.0a2 main 1.0a2 0 simonw 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 for an extended, annotated version of these release notes.

  • New /db/table/-/upsert API, documented here. 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)
  • New register_permissions(datasette) plugin hook. Plugins can now register named permissions, which will then be listed in various interfaces that show available permissions. (#1940)
  • The /db/-/create API for creating a table 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)
  • Arbitrary permissions can now be configured at the instance, database and resource (table, SQL view or canned query) level in Datasette's 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 for details. (#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 for details. (#1947)
  • Likewise, the datasette create-token CLI command can now create tokens with a subset of permissions. (#1855)
  • New datasette.create_token() API method <datasette_create_token>` for programmatically creating signed API tokens. (#1951)
  • /db/-/create API now requires actor to have insert-row permission in order to use the "row" or "rows" properties. (#1937)
datasette 107914493  
84755750 https://github.com/simonw/datasette/releases/tag/1.0a1 RE_kwDOBm6k_c4FDUUm 1.0a1 main 1.0a1 0 simonw 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 in the documentation. (#1922)
  • Fixed a bug where the _memory database could be written to even though writes were not persisted. (#1917)
  • The https://latest.datasette.io/ demo instance now includes an ephemeral database which can be used to test Datasette's write APIs, using the new 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)
  • 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)
  • The list of endpoints in the API explorer now lists mutable databases first. (#1918)
  • The "ignore": true and "replace": true options for the insert API are now documented. (#1924)
datasette 107914493  
84496148 https://github.com/simonw/datasette/releases/tag/1.0a0 RE_kwDOBm6k_c4FCU8U 1.0a0 main 1.0a0 0 simonw 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), 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 or via the Datasette 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. (#1852)
  • New datasette create-token command for creating tokens from the command line: datasette create-token.
  • New allow_signed_tokens setting which can be used to turn off signed token support. (#1856)
  • New max_signed_tokens_ttl setting for restricting the maximum allowed duration of a signed token. (#1858)

Write API

  • New API explorer at /-/api for trying out the API. (#1871)
  • /db/-/create API for Creating a table. (#1882)
  • /db/table/-/insert API for Inserting rows. (#1851)
  • /db/table/-/drop API for Dropping tables. (#1874)
  • /db/table/pk/-/update API for Updating a row. (#1863)
  • /db/table/pk/-/delete API for Deleting a row. (#1864)
datasette 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
}
83624627 https://github.com/simonw/datasette/releases/tag/0.63.2 RE_kwDOBm6k_c4E_AKz 0.63.2 0.63.x 0.63.2 0 simonw 9599 0 2022-11-19T00:53:05Z 2022-11-19T00:58:27Z
  • Fixed a bug in datasette publish heroku where deployments failed due to an older version of Python being requested. (#1905)
  • New datasette publish heroku --generate-dir <dir> option for generating a Heroku deployment directory without deploying it.
datasette 107914493  
82765509 https://github.com/simonw/datasette/releases/tag/0.63.1 RE_kwDOBm6k_c4E7ubF 0.63.1 main 0.63.1 0 simonw 9599 0 2022-11-11T07:01:20Z 2022-11-11T07:02:36Z
  • Fixed a bug where Datasette's table filter form would not redirect correctly when run behind a proxy using the base_url setting. (#1883)
  • SQL query is now shown wrapped in a <textarea> if a query exceeds a time limit. (#1876)
  • Fixed an intermittent "Too many open files" error while running the test suite. (#1843)
  • New db.close() internal method.
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/82765509/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
81262417 https://github.com/simonw/datasette/releases/tag/0.63 RE_kwDOBm6k_c4E1_dR 0.63 main 0.63 0 simonw 9599 0 2022-10-27T22:11:26Z 2022-10-27T22:13:32Z

See Datasette 0.63: The annotated release notes for more background on the changes in this release.

Features

  • Now tested against Python 3.11. Docker containers used by datasette publish and datasette package both now use that version of Python. (#1853)
  • --load-extension option now supports entrypoints. Thanks, Alex Garcia. (#1789)
  • Facet size can now be set per-table with the new facet_size table metadata option. (#1804)
  • The truncate_cells_html setting now also affects long URLs in columns. (#1805)
  • The non-JavaScript SQL editor textarea now increases height to fit the SQL query. (#1786)
  • Facets are now displayed with better line-breaks in long values. Thanks, Daniel Rech. (#1794)
  • The settings.json file used in Configuration directory mode is now validated on startup. (#1816)
  • SQL queries can now include leading SQL comments, using /* ... */ or -- ... syntax. Thanks, Charles Nepote. (#1860)
  • SQL query is now re-displayed when terminated with a time limit error. (#1819)
  • The inspect data mechanism is now used to speed up server startup - thanks, Forest Gregg. (#1834)
  • In Configuration directory mode databases with filenames ending in .sqlite or .sqlite3 are now automatically added to the Datasette instance. (#1646)
  • Breadcrumb navigation display now respects the current user's permissions. (#1831)

Plugin hooks and internals

  • The prepare_jinja2_environment(env, datasette) plugin hook now accepts an optional datasette argument. Hook implementations can also now return an async function which will be awaited automatically. (#1809)
  • Database(is_mutable=) now defaults to True. (#1808)
  • The datasette.check_visibility() method now accepts an optional permissions= list, allowing it to take multiple permissions into account at once when deciding if something should be shown as public or private. This has been used to correctly display padlock icons in more places in the Datasette interface. (#1829)
  • Datasette no longer enforces upper bounds on its dependencies. (#1800)

Documentation

  • New tutorial: Cleaning data with sqlite-utils and Datasette.
  • Screenshots in the documentation are now maintained using shot-scraper, as described in Automating screenshots for the Datasette documentation using shot-scraper. (#1844)
  • More detailed command descriptions on the CLI reference page. (#1787)
  • New documentation on Running Datasette using OpenRC - thanks, Adam Simpson. (#1825)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/81262417/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
80750406 https://github.com/simonw/datasette/releases/tag/0.63a1 RE_kwDOBm6k_c4E0CdG 0.63a1 main 0.63a1 0 simonw 9599 1 2022-10-24T03:07:09Z 2022-10-24T03:11:47Z
  • SQL query is now re-displayed when terminated with a time limit error. (#1819)
  • New documentation on Running Datasette using OpenRC - thanks, Adam Simpson. (#1825)
  • The inspect data mechanism is now used to speed up server startup - thanks, Forest Gregg. (#1834)
  • In Configuration directory mode databases with filenames ending in .sqlite or .sqlite3 are now automatically added to the Datasette instance. (#1646)
  • Breadcrumb navigation display now respects the current user's permissions. (#1831)
  • Screenshots in the documentation are now maintained using shot-scraper, as described in Automating screenshots for the Datasette documentation using shot-scraper. (#1844)
  • The datasette.check_visibility() method now accepts an optional permissions= list, allowing it to take multiple permissions into account at once when deciding if something should be shown as public or private. This has been used to correctly display padlock icons in more places in the Datasette interface. (#1829)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/80750406/reactions",
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
78197386 https://github.com/simonw/datasette/releases/tag/0.63a0 RE_kwDOBm6k_c4EqTKK 0.63a0 main 0.63a0 0 simonw 9599 1 2022-09-26T21:14:25Z 2022-09-26T21:56:30Z
  • The prepare_jinja2_environment(env, datasette) plugin hook now accepts an optional datasette argument. Hook implementations can also now return an async function which will be awaited automatically. (#1809)
  • --load-extension option now supports entrypoints. Thanks, Alex Garcia. (#1789)
  • New tutorial: Cleaning data with sqlite-utils and Datasette.
  • Facet size can now be set per-table with the new facet_size table metadata option. (#1804)
  • truncate_cells_html setting now also affects long URLs in columns. (#1805)
  • Database(is_mutable=) now defaults to True. (#1808)
  • Non-JavaScript textarea now increases height to fit the SQL query. (#1786)
  • More detailed command descriptions on the CLI reference page. (#1787)
  • Datasette no longer enforces upper bounds on its depenedencies. (#1800)
  • Facets are now displayed with better line-breaks in long values. Thanks, Daniel Rech. (#1794)
  • The settings.json file used in Configuration directory mode is now validated on startup. (#1816)
datasette 107914493  
74385093 https://github.com/simonw/datasette/releases/tag/0.62 RE_kwDOBm6k_c4EbwbF 0.62 main 0.62 0 simonw 9599 0 2022-08-14T17:32:42Z 2022-08-14T17:43:05Z

Datasette can now run entirely in your browser using WebAssembly. Try out Datasette Lite, take a look at the code or read more about it in Datasette Lite: a server-side Python web application running in a browser.

Datasette now has a Discord community for questions and discussions about Datasette and its ecosystem of projects.

Features

  • Datasette is now compatible with Pyodide. This is the enabling technology behind Datasette Lite. (#1733)
  • Database file downloads now implement conditional GET using ETags. (#1739)
  • HTML for facet results and suggested results has been extracted out into new templates _facet_results.html and _suggested_facets.html. Thanks, M. Nasimul Haque. (#1759)
  • Datasette now runs some SQL queries in parallel. This has limited impact on performance, see this research issue for details.
  • New --nolock option for ignoring file locks when opening read-only databases. (#1744)
  • Spaces in the database names in URLs are now encoded as + rather than ~20. (#1701)
  • <Binary: 2427344 bytes> is now displayed as <Binary: 2,427,344 bytes> and is accompanied by tooltip showing "2.3MB". (#1712)
  • The base Docker image used by datasette publish cloudrun, datasette package and the official Datasette image has been upgraded to 3.10.6-slim-bullseye. (#1768)
  • Canned writable queries against immutable databases now show a warning message. (#1728)
  • datasette publish cloudrun has a new --timeout option which can be used to increase the time limit applied by the Google Cloud build environment. Thanks, Tim Sherratt. (#1717)
  • datasette publish cloudrun has new --min-instances and --max-instances options. (#1779)

Plugin hooks

  • New plugin hook: handle_exception(), for custom handling of exceptions caught by Datasette. (#1770)
  • The render_cell() plugin hook is now also passed a row argument, representing the sqlite3.Row object that is being rendered. (#1300)
  • The configuration directory is now stored in datasette.config_dir, making it available to plugins. Thanks, Chris Amico. (#1766)

Bug fixes

  • Don't show the facet option in the cog menu if faceting is not allowed. (#1683)
  • ?_sort and ?_sort_desc now work if the column that is being sorted has been excluded from the query using ?_col= or ?_nocol=. (#1773)
  • Fixed bug where ?_sort_desc was duplicated in the URL every time the Apply button was clicked. (#1738)

Documentation

  • Examples in the documentation now include a copy-to-clipboard button. (#1748)
  • Documentation now uses the Furo Sphinx theme. (#1746)
  • Code examples in the documentation are now all formatted using Black. (#1718)
  • Request.fake() method is now documented, see Request object.
  • New documentation for plugin authors: Registering a plugin for the duration of a test. (#903)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/74385093/reactions",
    "total_count": 2,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 2,
    "rocket": 0,
    "eyes": 0
}
72184309 https://github.com/simonw/datasette/releases/tag/0.62a1 RE_kwDOBm6k_c4ETXH1 0.62a1 main 0.62a1 0 simonw 9599 1 2022-07-18T01:06:37Z 2022-07-18T01:09:05Z
  • New plugin hook: handle_exception(), for custom handling of exceptions caught by Datasette. (#1770)
  • The render_cell() plugin hook is now also passed a row argument, representing the sqlite3.Row object that is being rendered. (#1300)
  • New --nolock option for ignoring file locks when opening read-only databases. (#1744)
  • Documentation now uses the Furo Sphinx theme. (#1746)
  • Datasette now has a Discord community.
  • Database file downloads now implement conditional GET using ETags. (#1739)
  • Examples in the documentation now include a copy-to-clipboard button. (#1748)
  • HTML for facet results and suggested results has been extracted out into new templates _facet_results.html and _suggested_facets.html. Thanks, M. Nasimul Haque. (#1759)
datasette 107914493  
65847605 https://github.com/simonw/datasette/releases/tag/0.62a0 RE_kwDOBm6k_c4D7ME1 0.62a0 main 0.62a0 0 simonw 9599 1 2022-05-02T21:38:34Z 2022-05-02T21:39:52Z
  • Datasette now runs some SQL queries in parallel. This has limited impact on performance, see this research issue for details.
  • Datasette should now be compatible with Pyodide. (#1733)
  • datasette publish cloudrun has a new --timeout option which can be used to increase the time limit applied by the Google Cloud build environment. Thanks, Tim Sherratt. (#1717)
  • Spaces in database names are now encoded as + rather than ~20. (#1701)
  • <Binary: 2427344 bytes> is now displayed as <Binary: 2,427,344 bytes> and is accompanied by tooltip showing "2.3MB". (#1712)
  • Don't show the facet option in the cog menu if faceting is not allowed. (#1683)
  • Code examples in the documentation are now all formatted using Black. (#1718)
  • Request.fake() method is now documented, see Request object.
datasette 107914493  
62620866 https://github.com/simonw/datasette/releases/tag/0.61.1 RE_kwDOBm6k_c4Du4TC 0.61.1 main 0.61.1 0 simonw 9599 0 2022-03-23T18:54:10Z 2022-03-23T20:31:09Z
  • Fixed a bug where databases with a different route from their name (as used by the datasette-hashed-urls plugin) returned errors when executing custom SQL queries. (#1682)
datasette 107914493  
62608891 https://github.com/simonw/datasette/releases/tag/0.61 RE_kwDOBm6k_c4Du1X7 0.61 main 0.61 0 simonw 9599 0 2022-03-23T18:12:26Z 2022-03-23T18:14:36Z

In preparation for Datasette 1.0, this release includes two potentially backwards-incompatible changes. Hashed URL mode has been moved to a separate plugin, and the way Datasette generates URLs to databases and tables with special characters in their name such as / and . has changed.

Datasette also now requires Python 3.7 or higher.

See also the annotated release notes.

  • URLs within Datasette now use a different encoding scheme for tables or databases that include "special" characters outside of the range of a-zA-Z0-9_-. This scheme is explained here: Tilde encoding. (#1657)
  • Removed hashed URL mode from Datasette. The new datasette-hashed-urls plugin can be used to achieve the same result, see datasette-hashed-urls for details. (#1661)
  • Databases can now have a custom path within the Datasette instance that is independent of the database name, using the db.route property. (#1668)
  • Datasette is now covered by a Code of Conduct. (#1654)
  • Python 3.6 is no longer supported. (#1577)
  • Tests now run against Python 3.11-dev. (#1621)
  • New datasette.ensure_permissions(actor, permissions) internal method for checking multiple permissions at once. (#1675)
  • New datasette.check_visibility(actor, action, resource=None) internal method for checking if a user can see a resource that would otherwise be invisible to unauthenticated users. (#1678)
  • Table and row HTML pages now include a <link rel="alternate" type="application/json+datasette" href="..."> element and return a Link: URL; rel="alternate"; type="application/json+datasette" HTTP header pointing to the JSON version of those pages. (#1533)
  • Access-Control-Expose-Headers: Link is now added to the CORS headers, allowing remote JavaScript to access that header.
  • Canned queries are now shown at the top of the database page, directly below the SQL editor. Previously they were shown at the bottom, below the list of tables. (#1612)
  • Datasette now has a default favicon. (#1603)
  • sqlite_stat tables are now hidden by default. (#1587)
  • SpatiaLite tables data_licenses, KNN and KNN2 are now hidden by default. (#1601)
  • SQL query tracing mechanism now works for queries executed in asyncio sub-tasks, such as those created by asyncio.gather(). (#1576)
  • datasette.tracer mechanism is now documented.
  • Common Datasette symbols can now be imported directly from the top-level datasette package, see Import shortcuts. Those symbols are Response, Forbidden, NotFound, hookimpl, actor_matches_allow. (#957)
  • /-/versions page now returns additional details for libraries used by SpatiaLite. (#1607)
  • Documentation now links to the Datasette Tutorials.
  • Datasette will now also look for SpatiaLite in /opt/homebrew - thanks, Dan Peterson. (#1649)
  • Fixed bug where custom pages did not work on Windows. Thanks, Robert Christie. (#1545)
  • Fixed error caused when a table had a column named n. (#1228)
datasette 107914493  
62259800 https://github.com/simonw/datasette/releases/tag/0.61a0 RE_kwDOBm6k_c4DtgJY 0.61a0 main 0.61a0 0 simonw 9599 1 2022-03-20T01:14:40Z 2022-03-20T01:16:41Z
  • Removed hashed URL mode from Datasette. The new datasette-hashed-urls plugin can be used to achieve the same result, see datasette-hashed-urls for details. (#1661)
  • Databases can now have a custom path within the Datasette instance that is indpendent of the database name, using the db.route property. (#1668)
  • URLs within Datasette now use a different encoding scheme for tables or databases that include "special" characters outside of the range of a-zA-Z0-9_-. This scheme is explained here: Tilde encoding. (#1657)
  • Table and row HTML pages now include a <link rel="alternate" type="application/json+datasette" href="..."> element and return a Link: URL; rel="alternate"; type="application/json+datasette" HTTP header pointing to the JSON version of those pages. (#1533)
  • Access-Control-Expose-Headers: Link is now added to the CORS headers, allowing remote JavaScript to access that header.
  • Canned queries are now shown at the top of the database page, directly below the SQL editor. Previously they were shown at the bottom, below the list of tables. (#1612)
  • Datasette now has a default favicon. (#1603)
  • sqlite_stat tables are now hidden by default. (#1587)
  • SpatiaLite tables data_licenses, KNN and KNN2 are now hidden by default. (#1601)
  • Python 3.6 is no longer supported. (#1577)
  • Tests now run against Python 3.11-dev. (#1621)
  • Fixed bug where custom pages did not work on Windows. Thanks, Robert Christie. (#1545)
  • SQL query tracing mechanism now works for queries executed in asyncio sub-tasks, such as those created by asyncio.gather(). (#1576)
  • datasette.tracer mechanism is now documented.
  • Common Datasette symbols can now be imported directly from the top-level datasette package, see Import shortcuts. Those symbols are Response, Forbidden, NotFound, hookimpl, actor_matches_allow. (#957)
  • /-/versions page now returns additional details for libraries used by SpatiaLite. (#1607)
  • Documentation now links to the Datasette Tutorials.
  • Datasette will now also look for SpatiaLite in /opt/homebrew - thanks, Dan Peterson. (#1649)
  • Datasette is now covered by a Code of Conduct. (#1654)
datasette 107914493  
58950482 https://github.com/simonw/datasette/releases/tag/0.60.2 RE_kwDOBm6k_c4Dg4NS 0.60.2 0.60.x 0.60.2 0 simonw 9599 0 2022-02-07T23:42:59Z 2022-02-07T23:49:38Z
  • Fixed a bug where Datasette would open the same file twice with two different database names if you ran datasette file.db file.db. (#1632)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/58950482/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
57629048 https://github.com/simonw/datasette/releases/tag/0.60.1 RE_kwDOBm6k_c4Db1l4 0.60.1 0.60.x 0.60.1 0 simonw 9599 0 2022-01-21T02:08:20Z 2022-01-21T02:12:54Z
  • Fixed a bug where installation on Python 3.6 stopped working due to a change to an underlying dependency. This release can now be installed on Python 3.6, but is the last release of Datasette that will support anything less than Python 3.7. (#1609)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/57629048/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
57068381 https://github.com/simonw/datasette/releases/tag/0.60 RE_kwDOBm6k_c4DZstd 0.60 main 0.60 0 simonw 9599 0 2022-01-14T01:36:51Z 2022-01-14T01:41:28Z

Plugins and internals

  • New plugin hook: filters_from_request(request, database, table, datasette), which runs on the table page and can be used to support new custom query string parameters that modify the SQL query. (#473)
  • Added two additional methods for writing to the database: await db.execute_write_script(sql, block=True) and await db.execute_write_many(sql, params_seq, block=True). (#1570)
  • The db.execute_write() internal method now defaults to blocking until the write operation has completed. Previously it defaulted to queuing the write and then continuing to run code while the write was in the queue. (#1579)
  • Database write connections now execute the prepare_connection(conn, database, datasette) plugin hook. (#1564)
  • The Datasette() constructor no longer requires the files= argument, and is now documented at Datasette class. (#1563)
  • The tracing feature now traces write queries, not just read queries. (#1568)
  • The query string variables exposed by request.args will now include blank strings for arguments such as foo in ?foo=&bar=1 rather than ignoring those parameters entirely. (#1551)

Faceting

  • The number of unique values in a facet is now always displayed. Previously it was only displayed if the user specified ?_facet_size=max. (#1556)
  • Facets of type date or array can now be configured in metadata.json, see Facets in metadata.json. Thanks, David Larlet. (#1552)
  • New ?_nosuggest=1 parameter for table views, which disables facet suggestion. (#1557)
  • Fixed bug where ?_facet_array=tags&_facet=tags would only display one of the two selected facets. (#625)

Other small fixes

  • Made several performance improvements to the database schema introspection code that runs when Datasette first starts up. (#1555)
  • Label columns detected for foreign keys are now case-insensitive, so Name or TITLE will be detected in the same way as name or title. (#1544)
  • Upgraded Pluggy dependency to 1.0. (#1575)
  • Now using Plausible analytics for the Datasette documentation.
  • explain query plan is now allowed with varying amounts of whitespace in the query. (#1588)
  • New CLI reference page showing the output of --help for each of the datasette sub-commands. This lead to several small improvements to the help copy. (#1594)
  • Fixed bug where writable canned queries could not be used with custom templates. (#1547)
  • Improved fix for a bug where columns with a underscore prefix could result in unnecessary hidden form fields. (#1527)
datasette 107914493  
55633923 https://github.com/simonw/datasette/releases/tag/0.60a1 RE_kwDOBm6k_c4DUOgD 0.60a1 main 0.60a1 0 simonw 9599 1 2021-12-19T22:08:10Z 2021-12-19T22:11:16Z
  • Database write connections now execute the prepare_connection(conn, database, datasette) plugin hook. (#1564)
  • The Datasette() constructor no longer requires the files= argument, and is now documented at Datasette class. (#1563)
  • The tracing feature now traces write queries, not just read queries. (#1568)
  • Added two methods for writing to the database: await db.execute_write_script(sql, block=False) and await db.execute_write_many(sql, params_seq, block=False). (#1570)
  • Made several performance improvements to the database schema introspection code that runs when Datasette first starts up. (#1555)
  • Fixed bug where writable canned queries could not be used with custom templates. (#1547)
datasette 107914493  
55569404 https://github.com/simonw/datasette/releases/tag/0.60a0 RE_kwDOBm6k_c4DT-v8 0.60a0 main 0.60a0 0 simonw 9599 1 2021-12-17T19:13:51Z 2021-12-17T19:15:38Z
  • New plugin hook: filters_from_request(request, database, table, datasette), which runs on the table page and can be used to support new custom query string parameters that modify the SQL query. (#473)
  • The number of unique values in a facet is now always displayed. Previously it was only displayed if the user specified ?_facet_size=max. (#1556)
  • Fixed bug where ?_facet_array=tags&_facet=tags would only display one of the two selected facets. (#625)
  • Facets of type date or array can now be configured in metadata.json, see Facets in metadata.json. Thanks, David Larlet. (#1552)
  • New ?_nosuggest=1 parameter for table views, which disables facet suggestion. (#1557)
  • Label columns detected for foreign keys are now case-insensitive, so Name or TITLE will be detected in the same way as name or title. (#1544)
  • The query string variables exposed by request.args will now include blank strings for arguments such as foo in ?foo=&bar=1 rather than ignoring those parameters entirely. (#1551)
datasette 107914493  
54295399 https://github.com/simonw/datasette/releases/tag/0.59.4 RE_kwDOBm6k_c4DPHtn 0.59.4 main 0.59.4 0 simonw 9599 0 2021-11-30T06:45:37Z 2021-11-30T06:50:48Z
  • Fixed bug where columns with a leading underscore could not be removed from the interactive filters list. (#1527)
  • Fixed bug where columns with a leading underscore were not correctly linked to by the "Links from other tables" interface on the row page. (#1525)
  • Upgraded dependencies aiofiles, black and janus.
datasette 107914493  
53781549 https://github.com/simonw/datasette/releases/tag/0.59.3 RE_kwDOBm6k_c4DNKQt 0.59.3 main 0.59.3 0 simonw 9599 0 2021-11-20T23:40:21Z 2021-11-20T23:41:33Z
  • Fixed numerous bugs when running Datasette behind a proxy with a prefix URL path using the base_url setting. A live demo of this mode is now available at datasette-apache-proxy-demo.datasette.io/prefix/. (#1519, #838)
  • ?column__arraycontains= and ?column__arraynotcontains= table parameters now also work against SQL views. (#448)
  • ?_facet_array=column no longer returns incorrect counts if columns contain the same value more than once.
datasette 107914493  
53323406 https://github.com/simonw/datasette/releases/tag/0.59.2 RE_kwDOBm6k_c4DLaaO 0.59.2 main 0.59.2 0 simonw 9599 0 2021-11-14T05:37:40Z 2021-11-14T05:43:09Z
  • Column names with a leading underscore now work correctly when used as a facet. (#1506)
  • Applying ?_nocol= to a column no longer removes that column from the filtering interface. (#1503)
  • Official Datasette Docker container now uses Debian Bullseye as the base image. (#1497)
  • Datasette is four years old today! Here's the original release announcement from 2017.
datasette 107914493  
51940513 https://github.com/simonw/datasette/releases/tag/0.59.1 RE_kwDOBm6k_c4DGIyh 0.59.1 main 0.59.1 0 simonw 9599 0 2021-10-24T22:29:56Z 2021-10-24T22:32:25Z
  • Fix compatibility with Python 3.10. (#1482)
  • Documentation on how to use Named parameters with integer and floating point values. (#1496)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/51940513/reactions",
    "total_count": 2,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
51387349 https://github.com/simonw/datasette/releases/tag/0.59 RE_kwDOBm6k_c4DEBvV 0.59 main 0.59 0 simonw 9599 0 2021-10-14T19:23:43Z 2021-10-14T19:31:56Z
  • Columns can now have associated metadata descriptions in metadata.json, see Column descriptions. (#942)
  • New register_commands() plugin hook allows plugins to register additional Datasette CLI commands, e.g. datasette mycommand file.db. (#1449)
  • Adding ?_facet_size=max to a table page now shows the number of unique values in each facet. (#1423)
  • Upgraded dependency httpx 0.20 - the undocumented allow_redirects= parameter to datasette.client is now follow_redirects=, and defaults to False where it previously defaulted to True. (#1488)
  • The --cors option now causes Datasette to return the Access-Control-Allow-Headers: Authorization header, in addition to Access-Control-Allow-Origin: *. (#1467)
  • Code that figures out which named parameters a SQL query takes in order to display form fields for them is no longer confused by strings that contain colon characters. (#1421)
  • Renamed --help-config option to --help-settings. (#1431)
  • datasette.databases property is now a documented API. (#1443)
  • The base.html template now wraps everything other than the <footer> in a <div class="not-footer"> element, to help with advanced CSS customization. (#1446)
  • The render_cell() plugin hook can now return an awaitable function. This means the hook can execute SQL queries. (#1425)
  • register_routes(datasette) plugin hook now accepts an optional datasette argument. (#1404)
  • New hide_sql canned query option for defaulting to hiding the SQL quey used by a canned query, see Additional canned query options. (#1422)
  • New --cpu option for datasette publish cloudrun. (#1420)
  • If Rich is installed in the same virtual environment as Datasette, it will be used to provide enhanced display of error tracebacks on the console. (#1416)
  • datasette.utils parse_metadata(content) function, used by the new datasette-remote-metadata plugin, is now a documented API. (#1405)
  • Fixed bug where ?_next=x&_sort=rowid could throw an error. (#1470)
  • Column cog menu no longer shows the option to facet by a column that is already selected by the default facets in metadata. (#1469)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/51387349/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
48604143 https://github.com/simonw/datasette/releases/tag/0.59a2 MDc6UmVsZWFzZTQ4NjA0MTQz 0.59a2 main 0.59a2 0 simonw 9599 1 2021-08-28T01:55:54Z 2021-08-28T01:57:38Z
  • Columns can now have associated metadata descriptions in metadata.json, see Column descriptions. (#942)
  • New register_commands() plugin hook allows plugins to register additional Datasette CLI commands, e.g. datasette mycommand file.db. (#1449)
  • Adding ?_facet_size=max to a table page now shows the number of unique values in each facet. (#1423)
  • Code that figures out which named parameters a SQL query takes in order to display form fields for them is no longer confused by strings that contain colon characters. (#1421)
  • Renamed --help-config option to --help-settings. (#1431)
  • datasette.databases property is now a documented API. (#1443)
  • Datasette base template now wraps everything other than the <footer> in a <div class="not-footer"> element, to help with advanced CSS customization. (#1446)
datasette 107914493  
47507174 https://github.com/simonw/datasette/releases/tag/0.59a1 MDc6UmVsZWFzZTQ3NTA3MTc0 0.59a1 main 0.59a1 0 simonw 9599 1 2021-08-09T01:13:03Z 2021-08-09T01:14:06Z
  • The render_cell() plugin hook can now return an awaitable function. This means the hook can execute SQL queries. (#1425)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/47507174/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
47461737 https://github.com/simonw/datasette/releases/tag/0.59a0 MDc6UmVsZWFzZTQ3NDYxNzM3 0.59a0 main 0.59a0 0 simonw 9599 1 2021-08-07T05:40:07Z 2021-08-07T05:42:25Z
  • register_routes(datasette) plugin hook now accepts an optional datasette argument. (#1404)
  • New hide_sql canned query option for defaulting to hiding the SQL quey used by a canned query, see Additional canned query options. (#1422)
  • New --cpu option for datasette publish cloudrun. (#1420)
  • If Rich is installed in the same virtual environment as Datasette, it will be used to provide enhanced display of error tracebacks on the console. (#1416)
  • datasette.utils parse_metadata(content) function, used by the new datasette-remote-metadata plugin, is now a documented API. (#1405)
datasette 107914493  
46341814 https://github.com/simonw/datasette/releases/tag/0.58.1 MDc6UmVsZWFzZTQ2MzQxODE0 0.58.1 main 0.58.1 0 simonw 9599 0 2021-07-16T19:50:06Z 2021-07-16T19:51:15Z
  • Fix for an intermittent race condition caused by the refresh_schemas() internal function. (#1231)
datasette 107914493  
46222036 https://github.com/simonw/datasette/releases/tag/0.58 MDc6UmVsZWFzZTQ2MjIyMDM2 0.58 main 0.58 0 simonw 9599 0 2021-07-15T00:33:04Z 2021-07-15T00:37:57Z
  • New datasette --uds /tmp/datasette.sock option for binding Datasette to a Unix domain socket, see proxy documentation. (#1388)
  • "searchmode": "raw" table metadata option for defaulting a table to executing SQLite full-text search syntax without first escaping it, see Advanced SQLite search queries. (#1389)
  • New plugin hook: get_metadata(datasette, key, database, table), for returning custom metadata for an instance, database or table. Thanks, Brandon Roberts! (#1384)
  • New plugin hook: skip_csrf(datasette, scope), for opting out of CSRF protection based on the incoming request. (#1377)
  • The menu_links(), table_actions() and database_actions() plugin hooks all gained a new optional request argument providing access to the current request. (#1371)
  • Major performance improvement for Datasette faceting. (#1394)
  • Improved documentation for Running Datasette behind a proxy to recommend using ProxyPreservehost On with Apache. (#1387)
  • POST requests to endpoints that do not support that HTTP verb now return a 405 error.
  • db.path can now be provided as a pathlib.Path object, useful when writing unit tests for plugins. Thanks, Chris Amico. (#1365)
datasette 107914493  
45182156 https://github.com/simonw/datasette/releases/tag/0.58a1 MDc6UmVsZWFzZTQ1MTgyMTU2 0.58a1 main 0.58a1 0 simonw 9599 1 2021-06-24T16:24:59Z 2021-06-24T16:29:09Z
  • New plugin hook: skip_csrf(datasette, scope), for opting out of CSRF protection based on the incoming request. (#1377)
  • POST requests to endpoints that do not support that HTTP verb now return a 405 error.
  • db.path can now be provided as a pathlib.Path object, useful when writing unit tests for plugins. Thanks, Chris Amico. (#1365)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/45182156/reactions",
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
44388485 https://github.com/simonw/datasette/releases/tag/0.58a0 MDc6UmVsZWFzZTQ0Mzg4NDg1 0.58a0 main 0.58a0 0 simonw 9599 1 2021-06-10T04:51:14Z 2021-06-10T04:52:45Z
  • The menu_links(), table_actions() and database_actions() plugin hooks all gained a new optional request argument providing access to the current request. (#1371)
datasette 107914493  
44292523 https://github.com/simonw/datasette/releases/tag/0.57.1 MDc6UmVsZWFzZTQ0MjkyNTIz 0.57.1 main 0.57.1 0 simonw 9599 0 2021-06-08T16:26:45Z 2021-06-08T16:28:31Z
  • Fixed visual display glitch with global navigation menu. (#1367)
  • No longer truncates the list of table columns displayed on the /database page. (#1364)
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/44292523/reactions",
    "total_count": 4,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 4,
    "rocket": 0,
    "eyes": 0
}
44155601 https://github.com/simonw/datasette/releases/tag/0.57 MDc6UmVsZWFzZTQ0MTU1NjAx 0.57 main 0.57 0 simonw 9599 0 2021-06-05T22:06:55Z 2021-06-05T22:11:18Z

Warning: This release fixes a reflected cross-site scripting security hole with the ?_trace=1 feature. You should upgrade to this version, or to Datasette 0.56.1, as soon as possible. (#1360)

In addition to the security fix, this release includes ?_col= and ?_nocol= options for controlling which columns are displayed for a table, ?_facet_size= for increasing the number of facet results returned, re-display of your SQL query should an error occur and numerous bug fixes.

New features

  • If an error occurs while executing a user-provided SQL query, that query is now re-displayed in an editable form along with the error message. (#619)
  • New ?_col= and ?_nocol= parameters to show and hide columns in a table, plus an interface for hiding and showing columns in the column cog menu. (#615)
  • A new ?_facet_size= parameter for customizing the number of facet results returned on a table or view page. (#1332)
  • ?_facet_size=max sets that to the maximum, which defaults to 1,000 and is controlled by the the max_returned_rows setting. If facet results are truncated the ... at the bottom of the facet list now links to this parameter. (#1337)
  • ?_nofacet=1 option to disable all facet calculations on a page, used as a performance optimization for CSV exports and ?_shape=array/object. (#1349, #263)
  • ?_nocount=1 option to disable full query result counts. (#1353)
  • ?_trace=1 debugging option is now controlled by the new trace_debug setting, which is turned off by default. (#1359)

Bug fixes and other improvements

  • Custom pages now work correctly when combined with the base_url setting. (#1238)
  • Fixed intermittent error displaying the index page when the user did not have permission to access one of the tables. Thanks, Guy Freeman. (#1305)
  • Columns with the name "Link" are no longer incorrectly displayed in bold. (#1308)
  • Fixed error caused by tables with a single quote in their names. (#1257)
  • Updated dependencies: pytest-asyncio, Black, jinja2, aiofiles, click, and itsdangerous.
  • The official Datasette Docker image now supports apt-get install. (#1320)
  • The Heroku runtime used by datasette publish heroku is now python-3.8.10.
datasette 107914493
{
    "url": "https://api.github.com/repos/simonw/datasette/releases/44155601/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
44155459 https://github.com/simonw/datasette/releases/tag/0.56.1 MDc6UmVsZWFzZTQ0MTU1NDU5 0.56.1 0.56.x 0.56.1 0 simonw 9599 0 2021-06-05T21:54:47Z 2021-06-05T22:00:01Z
  • Fix for a security hole: reflected cross-site scripting in the ?_trace=1 feature. #1360
datasette 107914493  
43713686 https://github.com/simonw/datasette/releases/tag/0.57a1 MDc6UmVsZWFzZTQzNzEzNjg2 0.57a1 main 0.57a1 0 simonw 9599 1 2021-05-27T16:54:21Z 2021-05-27T16:58:41Z
  • Docker image now allows apt-get install. #1320
  • ?_col= and ?_nocol= options to show and hide columns in a table, plus UI for doing this in the column cog menu. #615
  • New ?_facet_size=max option, linked to from the … on truncated facets. #1337
  • Heroku runtime used by datasette publish heroku is now python-3.8.10.
  • Multi-arch support for built Docker images using Buildx - thanks, Blair Drummand. #1319
datasette 107914493  
43419091 https://github.com/simonw/datasette/releases/tag/0.57a0 MDc6UmVsZWFzZTQzNDE5MDkx 0.57a0 main 0.57a0 0 simonw 9599 1 2021-05-23T00:45:54Z 2021-05-23T00:46:44Z

Mainly dependency bumps, plus a new ?_facet_size= argument.

  • Updated dependencies: pytest-asyncio, Black, jinja2, aiofiles, itsdangerous
  • Fixed bug where columns called "Link" were incorrectly displayed in bold. (#1308)
  • New ?_facet_size= argument for customizing the number of facet results returned on a page. (#1332)
datasette 107914493  
40608711 https://github.com/simonw/datasette/releases/tag/0.56 MDc6UmVsZWFzZTQwNjA4NzEx 0.56 main 0.56 0 simonw 9599 0 2021-03-29T00:41:12Z 2021-03-29T00:43:36Z

Documentation improvements, bug fixes and support for SpatiaLite 5.

  • The SQL editor can now be resized by dragging a handle. (#1236)
  • Fixed a bug with JSON faceting and the __arraycontains filter caused by tables with spaces in their names. (#1239)
  • Upgraded httpx dependency. (#1005)
  • JSON faceting is now suggested even if a column contains blank strings. (#1246)
  • New datasette.add_memory_database() method. (#1247)
  • The Response.asgi_send() method is now documented. (#1266)
  • The official Datasette Docker image now bundles SpatiaLite version 5. (#1278)
  • Fixed a no such table: pragma_database_list bug when running Datasette against SQLite versions prior to SQLite 3.16.0. (#1276)
  • HTML lists displayed in table cells are now styled correctly. Thanks, Bob Whitelock. (#1141, #1252)
  • Configuration directory mode now correctly serves immutable databases that are listed in inspect-data.json. Thanks Campbell Allen and Frankie Robertson. (#1031, #1229)
datasette 107914493  
38264801 https://github.com/simonw/datasette/releases/tag/0.55 MDc6UmVsZWFzZTM4MjY0ODAx 0.55 main 0.55 0 simonw 9599 0 2021-02-19T02:01:06Z 2021-02-19T02:02:29Z

Support for cross-database SQL queries and built-in support for serving via HTTPS.

  • The new --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)
  • The /:memory: page has been renamed (and redirected) to /_memory for consistency with the new /_internal database introduced in Datasette 0.54. (#1205)
  • Added plugin testing documentation on Using pdb for errors thrown inside Datasette. (#1207)
  • The official Datasette Docker image now uses Python 3.7.10, applying the latest security fix for that Python version. (#1235)
datasette 107914493  
37262719 https://github.com/simonw/datasette/releases/tag/0.54.1 MDc6UmVsZWFzZTM3MjYyNzE5 0.54.1 0.54.x 0.54.1 0 simonw 9599 0 2021-02-02T21:23:39Z 2021-02-02T21:30:12Z
  • Fixed a bug where ?_search= and ?_sort= parameters were incorrectly duplicated when the filter form on the table page was re-submitted. (#1214)
datasette 107914493  
36871901 https://github.com/simonw/datasette/releases/tag/0.54 MDc6UmVsZWFzZTM2ODcxOTAx 0.54 main 0.54 0 simonw 9599 0 2021-01-25T17:35:06Z 2021-01-25T17:36:30Z

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.

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.

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.

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)

The new memory_name= parameter to the Database class can be used to create named, shared in-memory databases.

JavaScript modules

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.

Code formatting with Black and Prettier

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)

Other changes

  • 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 cloudrun now sets force_https_urls for every deployment, fixing some incorrect http:// links. (#1178)
  • 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.io tools and plugins directories. (#1182)
  • The request object now provides a request.full_path property, which returns the path including any query string. (#1184)
  • Better error message for disallowed PRAGMA clauses in SQL queries. (#1185)
  • datasette publish heroku now deploys using python-3.8.7.
  • New plugin testing documentation on Testing outbound HTTP calls with pytest-httpx. (#1198)
  • All ?_* 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)
  • Fixed a bug loading a database file called test-database (1).sqlite. (#1181)
datasette 107914493  
36623336 https://github.com/simonw/datasette/releases/tag/0.54a0 MDc6UmVsZWFzZTM2NjIzMzM2 0.54a0 main 0.54a0 0 simonw 9599 1 2021-01-19T20:50:12Z 2021-01-19T20:51:13Z

Alpha release. Release notes in progress.

  • Improved support for named in-memory databases. (#1151)
  • New _internal in-memory database tracking attached databases, tables and columns. (#1150)
  • Support for JavaScript modules. (#1186, #1187)
datasette 107914493  
35131848 https://github.com/simonw/datasette/releases/tag/0.53 MDc6UmVsZWFzZTM1MTMxODQ4 0.53 main 0.53 0 simonw 9599 0 2020-12-11T01:44:36Z 2020-12-11T01:46:44Z

Datasette has an official project website now, at https://datasette.io/. This release mainly updates the documentation to reflect the new site.

  • New ?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)
  • New ?_header=off option for CSV export which omits the CSV header row, documented here. (#1133)
  • "Powered by Datasette" link in the footer now links to https://datasette.io/. (#1138)
  • Project news no longer lives in the README - it can now be found at https://datasette.io/news. (#1137)
datasette 107914493  
35063580 https://github.com/simonw/datasette/releases/tag/0.52.5 MDc6UmVsZWFzZTM1MDYzNTgw 0.52.5 0.52.x 0.52.5 0 simonw 9599 0 2020-12-09T20:03:44Z 2020-12-09T20:10:23Z
  • Fix for error caused by combining the _searchmode=raw and ?_search_COLUMN parameters. (#1134)
datasette 107914493  
34882011 https://github.com/simonw/datasette/releases/tag/0.52.4 MDc6UmVsZWFzZTM0ODgyMDEx 0.52.4 main 0.52.4 0 simonw 9599 0 2020-12-05T19:42:42Z 2020-12-05T19:42:57Z
  • Show pysqlite3 version on /-/versions, if installed. (#1125)
  • Errors output by Datasette (e.g. for invalid SQL queries) now go to stderr, not stdout. (#1131)
  • Fix for a startup error on windows caused by unnecessary from os import EX_CANTCREAT - thanks, Abdussamet Koçak. (#1094)
datasette 107914493  
34782337 https://github.com/simonw/datasette/releases/tag/0.52.3 MDc6UmVsZWFzZTM0NzgyMzM3 0.52.3 main 0.52.3 0 simonw 9599 0 2020-12-03T19:07:05Z 2020-12-03T19:08:29Z
  • Fixed bug where static assets would 404 for Datasette installed on ARM Amazon Linux. (#1124)
datasette 107914493  
34725716 https://github.com/simonw/datasette/releases/tag/0.52.2 MDc6UmVsZWFzZTM0NzI1NzE2 0.52.2 main 0.52.2 0 simonw 9599 0 2020-12-03T00:57:40Z 2020-12-03T00:58:43Z
  • Generated columns from SQLite 3.31.0 or higher are now correctly displayed. (#1116)
  • Error message if you attempt to open a SpatiaLite database now suggests using --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)
  • Databases larger than 32MB that are published to Cloud Run can now be downloaded. (#749)
  • Fix for misaligned cog icon on table and database pages. Thanks, Abdussamet Koçak. (#1121)
datasette 107914493  
34551688 https://github.com/simonw/datasette/releases/tag/0.52.1 MDc6UmVsZWFzZTM0NTUxNjg4 0.52.1 main 0.52.1 0 simonw 9599 0 2020-11-29T19:38:29Z 2020-11-29T19:39:52Z
  • Documentation on Testing plugins now recommends using datasette.client. (#1102)
  • Fix bug where compound foreign keys produced broken links. (#1098)
  • datasette --load-module=spatialite now also checks for /usr/local/lib/mod_spatialite.so. Thanks, Dan Peterson. (#1114)
datasette 107914493  
34539374 https://github.com/simonw/datasette/releases/tag/0.52 MDc6UmVsZWFzZTM0NTM5Mzc0 0.52 main 0.52 0 simonw 9599 0 2020-11-28T23:54:35Z 2020-11-28T23:57:12Z

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.

  • New --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)
  • The /-/config introspection page is now /-/settings, and the previous page redirects to the new one. (#1103)
  • The config.json file in Configuration directory mode is now called settings.json. (#1104)
  • The undocumented datasette.config() internal method has been replaced by a documented .setting(key) method. (#1107)

Also in this release:

  • New plugin hook: database_actions(datasette, actor, database), which adds menu items to a new cog menu shown at the top of the database page. (#1077)
  • 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)
  • Swept the documentation to remove words that minimize involved difficulty. (#1089)

And some bug fixes:

  • Foreign keys linking to rows with blank label columns now display as a hyphen, allowing those links to be clicked. (#1086)
  • Fixed bug where row pages could sometimes 500 if the underlying queries exceeded a time limit. (#1088)
  • Fixed a bug where the table action menu could appear partially obscured by the edge of the page. (#1084)
datasette 107914493  
33314301 https://github.com/simonw/datasette/releases/tag/0.51.1 MDc6UmVsZWFzZTMzMzE0MzAx 0.51.1 main 0.51.1 0 simonw 9599 0 2020-11-01T03:33:47Z 2020-11-01T03:34:36Z
  • Improvements to the new Binary data documentation page.
datasette 107914493  
33311677 https://github.com/simonw/datasette/releases/tag/0.51 MDc6UmVsZWFzZTMzMzExNjc3 0.51 main 0.51 0 simonw 9599 0 2020-10-31T22:24:54Z 2020-10-31T22:29:33Z

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.

New visual design

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)

Plugins can now add links within Datasette

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.

Binary data

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).

URL building

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)

Running Datasette behind a proxy

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)

Smaller changes

  • Wide tables shown within Datasette now scroll horizontally (#998). This is achieved using a new <div class="table-wrapper"> element which may impact the implementation of some plugins (for example this change to datasette-cluster-map).
  • New debug-menu permission. (#1068)
  • Removed --debug option, which didn't do anything. (#814)
  • Link: HTTP header pagination. (#1014)
  • x button for clearing filters. (#1016)
  • Edit SQL button on canned queries, (#1019)
  • --load-extension=spatialite shortcut. (#1028)
  • scale-in animation for column action menu. (#1039)
  • Option to pass a list of templates to .render_template() is now documented. (#1045)
  • New 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)
  • Database file downloads now implement cascading permissions, so you can download a database if you have view-database-download permission even if you do not have permission to access the Datasette instance. (#1058)
  • New documentation on Designing URLs for your plugin. (#1053)
datasette 107914493  
33284522 https://github.com/simonw/datasette/releases/tag/0.51a2 MDc6UmVsZWFzZTMzMjg0NTIy 0.51a2 main 0.51a2 0 simonw 9599 1 2020-10-30T17:56:02Z 2020-10-30T17:57:53Z
  • New load_template(template, request, datasette) plugin hook. (#1042)
  • New debug-menu permission. (#1068)
datasette 107914493  
33253780 https://github.com/simonw/datasette/releases/tag/0.51a1 MDc6UmVsZWFzZTMzMjUzNzgw 0.51a1 main 0.51a1 0 simonw 9599 1 2020-10-30T05:35:23Z 2020-10-30T05:37:34Z
  • New colour scheme and improved visual design, courtesy of Natalie Downe. (#1056)
  • scale-in animation for column action menu. (#1039)
  • Wide tables now scroll horizontally. (#998)
  • Option to pass a list of templates to .render_template() is now documented. (#1045)
  • New 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)
  • Database file downloads now implement cascading permissions, so you can download a database if you have view-database-download permission even if you do not have permission to access the Datasette instance. (#1058)
  • New documentation on Designing URLs for your plugin. (#1053)
  • New navigation menu plus a menu_links(datasette, actor) plugin hook to customize it. (#1064)
  • table_actions(datasette, actor, database, table) plugin hook for the new table actions menu. (#1066)
datasette 107914493  
32791115 https://github.com/simonw/datasette/releases/tag/0.51a0 MDc6UmVsZWFzZTMyNzkxMTE1 0.51a0 main 0.51a0 0 simonw 9599 1 2020-10-20T05:31:14Z 2020-10-20T05:33:01Z
  • Fixed a bunch of issues relating to the base_url setting. (#1023)
  • New datasette.urls URL builder for plugins, see Building URLs within plugins. (#904)
  • Removed --debug option, which didn't do anything. (#814)
  • Link: HTTP header pagination. (#1014)
  • x button for clearing filters. (#1016)
  • Edit SQL button on canned queries, (#1019)
  • --load-extension=spatialite shortcut. (#1028)
datasette 107914493  
32397338 https://github.com/simonw/datasette/releases/tag/0.50.2 MDc6UmVsZWFzZTMyMzk3MzM4 0.50.2 main 0.50.2 0 simonw 9599 0 2020-10-10T03:53:47Z 2020-10-10T03:59:18Z
  • Fixed another bug introduced in 0.50 where column header links on the table page were broken. (#1011)
datasette 107914493  
32395303 https://github.com/simonw/datasette/releases/tag/0.50.1 MDc6UmVsZWFzZTMyMzk1MzAz 0.50.1 main 0.50.1 0 simonw 9599 0 2020-10-10T00:41:35Z 2020-10-10T00:44:23Z
  • Fixed a bug introduced in 0.50 where the export as JSON/CSV links on the table, row and query pages were broken. (#1010)
datasette 107914493  
32384200 https://github.com/simonw/datasette/releases/tag/0.50 MDc6UmVsZWFzZTMyMzg0MjAw 0.50 main 0.50 0 simonw 9599 0 2020-10-09T17:57:55Z 2020-10-09T17:58:27Z

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:

  • Publishing to Google Cloud Run documentation now covers Google Cloud SDK options. Thanks, Geoffrey Hing. (#995)
  • New datasette -o option which opens your browser as soon as Datasette starts up. (#970)
  • Datasette now sets sqlite3.enable_callback_tracebacks(True) so that errors in custom SQL functions will display tracebacks. (#891)
  • Fixed two rendering bugs with column headers in portrait mobile view. (#978, #980)
  • New db.table_column_details(table) introspection method for retrieving full details of the columns in a specific table, see Database introspection.
  • Fixed a routing bug with custom page wildcard templates. (#996)
  • datasette publish heroku now deploys using Python 3.8.6.
  • New datasette publish heroku --tar= option. (#969)
  • OPTIONS requests against HTML pages no longer return a 500 error. (#1001)
  • Datasette now supports Python 3.9.
datasette 107914493  
32238807 https://github.com/simonw/datasette/releases/tag/0.50a1 MDc6UmVsZWFzZTMyMjM4ODA3 0.50a1 main 0.50a1 0 simonw 9599 1 2020-10-06T20:50:54Z 2020-10-06T20:52:49Z
  • Column action menu now shows the column type. (#993)
  • Column action sort links now correctly link to the first page of sorted results. (#989)
  • Publishing to Google Cloud Run documentation now covers Google Cloud SDK options. Thanks, Geoffrey Hing. (#995)
datasette 107914493  
32072114 https://github.com/simonw/datasette/releases/tag/0.50a0 MDc6UmVsZWFzZTMyMDcyMTE0 0.50a0 main 0.50a0 0 simonw 9599 1 2020-10-01T23:35:04Z 2020-10-01T23:35:54Z
  • New column action menu - table columns now show a cog icon which provides a contextual menu for that column. (#981)
  • New datasette -o option which opens your browser as soon as Datasette starts up. (#970
  • sqlite3.enable_callback_tracebacks(True) so errors in custom SQL functions will now display tracebacks. (#891)
  • Fixed two rendering bugs with column headers in portrait mobile view. (#978, #980)
datasette 107914493  
31354944 https://github.com/simonw/datasette/releases/tag/0.49.1 MDc6UmVsZWFzZTMxMzU0OTQ0 0.49.1 main 0.49.1 0 simonw 9599 0 2020-09-15T20:20:15Z 2020-09-15T20:21:16Z
  • Fixed a bug with writable canned queries that use magic parameters but accept no non-magic arguments. (#967)
datasette 107914493  
31288240 https://github.com/simonw/datasette/releases/tag/0.49 MDc6UmVsZWFzZTMxMjg4MjQw 0.49 main 0.49 0 simonw 9599 0 2020-09-14T21:38:24Z 2020-09-14T21:40:11Z
  • Writable canned queries now expose a JSON API, see JSON API for writable canned queries. (#880)
  • New mechanism for defining page templates with custom path parameters - a template file called pages/about/{slug}.html will be used to render any requests to /about/something. See Path parameters for pages. (#944)
  • register_output_renderer() render functions can now return a Response. (#953)
  • New --upgrade option for datasette install. (#945)
  • New datasette --pdb option. (#962)
  • datasette --get exit code now reflects the internal HTTP status code. (#947)
  • New raise_404() template function for returning 404 errors. (#964)
  • datasette publish heroku now deploys using Python 3.8.5
  • Upgraded CodeMirror to 5.57.0. (#948)
  • Upgraded code style to Black 20.8b1. (#958)
  • Fixed bug where selected facets were not correctly persisted in hidden form fields on the table page. (#963)
  • Renamed the default error template from 500.html to error.html.
  • Custom error pages are now documented, see Custom error pages. (#965)
datasette 107914493  
31227999 https://github.com/simonw/datasette/releases/tag/0.49a1 MDc6UmVsZWFzZTMxMjI3OTk5 0.49a1 main 0.49a1 0 simonw 9599 1 2020-09-14T02:47:21Z 2020-09-14T02:48:19Z
  • Upgraded CodeMirror to 5.57.0. (#948)
  • Upgraded code style to Black 20.8b1. (#958)
  • New datasette --pdb option. (#962)
  • datasette --get exit code now reflects the internal HTTP status code. (#947)
  • Fixed bug where selected facets were not correctly persisted in hidden form fields on the table page. (#963)
  • New mechanism for defining page templates with custom path parameters. (#944)
datasette 107914493  
30353073 https://github.com/simonw/datasette/releases/tag/0.49a0 MDc6UmVsZWFzZTMwMzUzMDcz 0.49a0 main 0.49a0 0 simonw 9599 1 2020-08-28T23:12:47Z 2020-08-28T23:18:09Z
  • register_output_renderer() render functions can now return a Response. (#953)
  • New --upgrade option for datasette install. (#945)
  • datasette publish heroku now deploys using Python 3.8.5
datasette 107914493  
29749566 https://github.com/simonw/datasette/releases/tag/0.48 MDc6UmVsZWFzZTI5NzQ5NTY2 0.48 main 0.48 0 simonw 9599 0 2020-08-16T18:56:31Z 2020-08-16T18:58:34Z
  • Datasette documentation now lives at docs.datasette.io.
  • db.is_mutable property is now documented and tested, see Database introspection.
  • The extra_template_vars, extra_css_urls, extra_js_urls and extra_body_script plugin hooks now all accept the same arguments. See extra_template_vars(template, database, table, columns, view_name, request, datasette) for details. (#939)
  • Those hooks now accept a new columns argument detailing the table columns that will be rendered on that page. (#938)
  • Fixed bug where plugins calling db.execute_write_fn() could hang Datasette if the connection failed. (#935)
  • Fixed bug with the ?_nl=on output option and binary data. (#914)
datasette 107914493  
29738457 https://github.com/simonw/datasette/releases/tag/0.47.3 MDc6UmVsZWFzZTI5NzM4NDU3 0.47.3 main 0.47.3 0 simonw 9599 0 2020-08-15T20:56:08Z 2020-08-15T21:03:58Z
  • The datasette --get command-line mechanism now ensures any plugins using the startup() hook are correctly executed. (#934)
datasette 107914493  
29625082 https://github.com/simonw/datasette/releases/tag/0.47.2 MDc6UmVsZWFzZTI5NjI1MDgy 0.47.2 main 0.47.2 0 simonw 9599 0 2020-08-12T20:54:33Z 2020-08-12T20:55:28Z
  • Fixed an issue with the Docker image published to Docker Hub. (#931)
datasette 107914493  
29587652 https://github.com/simonw/datasette/releases/tag/0.47.1 MDc6UmVsZWFzZTI5NTg3NjUy 0.47.1 main 0.47.1 0 simonw 9599 0 2020-08-12T02:37:24Z 2020-08-12T02:38:00Z
  • Fixed a bug where the sdist distribution of Datasette was not correctly including the template files. (#930)
datasette 107914493  
29585154 https://github.com/simonw/datasette/releases/tag/0.47 MDc6UmVsZWFzZTI5NTg1MTU0 0.47 main 0.47 0 simonw 9599 0 2020-08-12T00:42:47Z 2020-08-12T00:44:52Z
  • Datasette now has a GitHub discussions forum for conversations about the project that go beyond just bug reports and issues.
  • Datasette can now be installed on macOS using Homebrew! Run brew install simonw/datasette/datasette. See Using Homebrew. (#335)
  • Two new commands: datasette install name-of-plugin and datasette uninstall name-of-plugin. These are equivalent to pip install and pip uninstall but automatically run in the same virtual environment as Datasette, so users don't have to figure out where that virtual environment is - useful for installations created using Homebrew or pipx. See Installing plugins. (#925)
  • A new command-line option, datasette --get, accepts a path to a URL within the Datasette instance. It will run that request through Datasette (without starting a web server) and print out the repsonse. See datasette --get for an example. (#926)
datasette 107914493  
29489364 https://github.com/simonw/datasette/releases/tag/0.46 MDc6UmVsZWFzZTI5NDg5MzY0 0.46 main 0.46 0 simonw 9599 0 2020-08-09T16:09:07Z 2020-08-09T16:10:47Z

Warning: This release contains a security fix related to authenticated writable canned queries. If you are using this feature you should upgrade as soon as possible.

  • Security fix: CSRF tokens were incorrectly included in read-only canned query forms, which could allow them to be leaked to a sophisticated attacker. See issue 918 for details.
  • Datasette now supports GraphQL via the new datasette-graphql plugin - see GraphQL in Datasette with the new datasette-graphql plugin.
  • Principle git branch has been renamed from master to main. (#849)
  • New debugging tool: /-/allow-debug tool (demo here) helps test allow blocks against actors, as described in Defining permissions with "allow" blocks. (#908)
  • New logo for the documentation, and a new project tagline: "An open source multi-tool for exploring and publishing data".
  • Whitespace in column values is now respected on display, using white-space: pre-wrap. (#896)
  • New await request.post_body() method for accessing the raw POST body, see Request object. (#897)
  • Database file downloads now include a content-length HTTP header, enabling download progress bars. (#905)
  • File downloads now also correctly set the suggested file name using a content-disposition HTTP header. (#909)
  • tests are now excluded from the Datasette package properly - thanks, abeyerpath. (#456)
  • The Datasette package published to PyPI now includes sdist as well as bdist_wheel.
  • Better titles for canned query pages. (#887)
  • Now only loads Python files from a directory passed using the --plugins-dir option - thanks, Amjith Ramanujam. (#890)
  • New documentation section on Publishing to Vercel.
datasette 107914493  
28134124 https://github.com/simonw/datasette/releases/tag/0.45 MDc6UmVsZWFzZTI4MTM0MTI0 0.45 master 0.45 0 simonw 9599 0 2020-07-01T21:43:07Z 2020-07-01T21:46:07Z

Magic parameters for canned queries, a log out feature, improved plugin documentation and four new plugin hooks.

Magic parameters for canned queries

Canned queries now support Magic parameters, which can be used to insert or select automatically generated values. For example: sql insert into logs (user_id, timestamp) values (:_actor_id, :_now_datetime_utc) This inserts the currently authenticated actor ID and the current datetime. (#842)

Log out

The ds_actor cookie can be used by plugins (or by Datasette's --root mechanism) to authenticate users. The new /-/logout page provides a way to clear that cookie.

A "Log out" button now shows in the global navigation provided the user is authenticated using the ds_actor cookie. (#840)

Better plugin documentation

The plugin documentation has been re-arranged into four sections, including a brand new section on testing plugins. (#687)

  • Plugins introduces Datasette's plugin system and describes how to install and configure plugins.
  • Writing plugins describes how to author plugins, from simple one-off plugins to packaged plugins that can be published to PyPI. It also describes how to start a plugin using the new datasette-plugin cookiecutter template.
  • Plugin hooks is a full list of detailed documentation for every Datasette plugin hook.
  • Testing plugins describes how to write tests for Datasette plugins, using pytest and HTTPX.

New plugin hooks

  • register_magic_parameters(datasette) can be used to define new types of magic canned query parameters.
  • startup(datasette) can run custom code when Datasette first starts up. datasette-init is a new plugin that uses this hook to create database tables and views on startup if they have not yet been created. (#834)
  • canned_queries(datasette, database, actor) lets plugins provide additional canned queries beyond those defined in Datasette's metadata. See datasette-saved-queries for an example of this hook in action. (#852)
  • forbidden(datasette, request, message) is a hook for customizing how Datasette responds to 403 forbidden errors. (#812)

Smaller changes

  • Cascading view permissons - so if a user has view-table they can view the table page even if they do not have view-database or view-instance. (#832)
  • CSRF protection no longer applies to Authentication: Bearer token requests or requests without cookies. (#835)
  • datasette.add_message() now works inside plugins. (#864)
  • Workaround for "Too many open files" error in test runs. (#846)
  • Respect existing scope["actor"] if already set by ASGI middleware. (#854)
  • New process for shipping Alpha and beta releases. (#807)
  • {{ csrftoken() }} now works when plugins render a template using datasette.render_template(..., request=request). (#863)
  • Datasette now creates a single Request object and uses it throughout the lifetime of the current HTTP request. (#870)
datasette 107914493  
28097766 https://github.com/simonw/datasette/releases/tag/0.45a5 MDc6UmVsZWFzZTI4MDk3NzY2 0.45a5 master 0.45a5 0 simonw 9599 1 2020-07-01T04:25:35Z 2020-07-01T04:27:08Z
datasette 107914493  
28008549 https://github.com/simonw/datasette/releases/tag/0.45a4 MDc6UmVsZWFzZTI4MDA4NTQ5 0.45a4 master 0.45a4 0 simonw 9599 1 2020-06-29T02:31:16Z 2020-06-29T02:33:02Z
datasette 107914493  
27994774 https://github.com/simonw/datasette/releases/tag/0.45a3 MDc6UmVsZWFzZTI3OTk0Nzc0 0.45a3 master 0.45a3 0 simonw 9599 1 2020-06-28T03:22:49Z 2020-06-28T03:27:12Z
datasette 107914493  
27856779 https://github.com/simonw/datasette/releases/tag/0.45a2 MDc6UmVsZWFzZTI3ODU2Nzc5 0.45a2 master 0.45a2 0 simonw 9599 1 2020-06-24T04:17:30Z 2020-06-24T04:32:12Z
datasette 107914493  
27707079 https://github.com/simonw/datasette/releases/tag/0.45a1 MDc6UmVsZWFzZTI3NzA3MDc5 0.45a1 master 0.45a1 0 simonw 9599 1 2020-06-18T23:52:16Z 2020-06-19T00:02:29Z
datasette 107914493  
27703093 https://github.com/simonw/datasette/releases/tag/0.45a0 MDc6UmVsZWFzZTI3NzAzMDkz 0.45a0 master 0.45a0 0 simonw 9599 1 2020-06-18T20:58:09Z 2020-06-18T21:14:00Z
datasette 107914493  
27483276 https://github.com/simonw/datasette/releases/tag/0.44 MDc6UmVsZWFzZTI3NDgzMjc2 0.44 master 0.44 0 simonw 9599 0 2020-06-12T01:19:30Z 2020-06-12T07:10:38Z

Authentication and permissions, writable canned queries, flash messages, new plugin hooks and more. Full release notes. See also Datasette 0.44: the annotated release notes.

datasette 107914493  
26994005 https://github.com/simonw/datasette/releases/tag/0.43 MDc6UmVsZWFzZTI2OTk0MDA1 0.43 master 0.43 0 simonw 9599 0 2020-05-28T14:11:06Z 2020-05-28T14:39:18Z

The main focus of this release is a major upgrade to the register_output_renderer(datasette) plugin hook, which allows plugins to provide new output formats for Datasette such as datasette-atom and datasette-ics.

  • Redesign of register_output_renderer(datasette) to provide more context to the render callback and support an optional "can_render" callback that controls if a suggested link to the output format is provided. (#581, #770)
  • Visually distinguish float and integer columns - useful for figuring out why order-by-column might be returning unexpected results. (#729)
  • The Request object, which is passed to several plugin hooks, is now documented. (#706)
  • New metadata.json option for setting a custom default page size for specific tables and views, see Setting a custom page size. (#751)
  • Canned queries can now be configured with a default URL fragment hash, useful when working with plugins such as datasette-vega, see Setting a default fragment. (#706)
  • Fixed a bug in datasette publish when running on operating systems where the /tmp directory lives in a different volume, using a backport of the Python 3.8 shutil.copytree() function. (#744)
  • Every plugin hook is now covered by the unit tests, and a new unit test checks that each plugin hook has at least one corresponding test. (#771, #773)
datasette 107914493  
26320774 https://github.com/simonw/datasette/releases/tag/0.42 MDc6UmVsZWFzZTI2MzIwNzc0 0.42 master 0.42 0 simonw 9599 0 2020-05-08T17:38:27Z 2020-05-08T17:56:36Z

A small release which provides improved internal methods for use in plugins, along with documentation. See #685.

  • Added documentation for db.execute(), see await db.execute(sql, ...).
  • Renamed db.execute_against_connection_in_thread() to db.execute_fn() and made it a documented method, see await db.execute_fn(fn).
  • New results.first() and results.single_value() methods, plus documentation for the Results class - see Results.
datasette 107914493  
26240662 https://github.com/simonw/datasette/releases/tag/0.41 MDc6UmVsZWFzZTI2MjQwNjYy 0.41 master 0.41 0 simonw 9599 0 2020-05-06T18:20:58Z 2020-05-06T18:30:03Z

You can now create custom pages within your Datasette instance using a custom template file. For example, adding a template file called templates/pages/about.html will result in a new page being served at /about on your instance. See the custom pages documentation for full details, including how to return custom HTTP headers, redirects and status codes. (#648)

Configuration directory mode (#731) allows you to define a custom Datasette instance as a directory. So instead of running the following:

$ datasette one.db two.db \
  --metadata.json \
  --template-dir=templates/ \
  --plugins-dir=plugins \
  --static css:css

You can instead arrange your files in a single directory called my-project and run this:

$ datasette my-project/

Also in this release:

  • New NOT LIKE table filter: ?colname__notlike=expression. (#750)
  • Datasette now has a pattern portfolio at /-/patterns - e.g. https://latest.datasette.io/-/patterns. This is a page that shows every Datasette user interface component in one place, to aid core development and people building custom CSS themes. (#151)
  • SQLite PRAGMA functions such as pragma_table_info(tablename) are now allowed in Datasette SQL queries. (#761)
  • Datasette pages now consistently return a content-type of text/html; charset=utf-8". (#752)
  • Datasette now handles an ASGI raw_path value of None, which should allow compatibilty with the Mangum adapter for running ASGI apps on AWS Lambda. Thanks, Colin Dellow. (#719)
  • Installation documentation now covers how to Install using pipx. (#756)
  • Improved the documentation for Full-text search.
datasette 107914493  
25748264 https://github.com/simonw/datasette/releases/tag/0.40 MDc6UmVsZWFzZTI1NzQ4MjY0 0.40 master 0.40 0 simonw 9599 0 2020-04-22T04:06:39Z 2020-04-22T04:06:51Z
  • Datasette Metadata can now be provided as a YAML file as an optional alternative to JSON. See Using YAML for metadata. (#713)
  • Removed support for datasette publish now, which used the the now-retired Zeit Now v1 hosting platform. A new plugin, datasette-publish-now, can be installed to publish data to Zeit (now Vercel) Now v2. (#710)
  • Fixed a bug where the extra_template_vars(request, view_name) plugin hook was not receiving the correct view_name. (#716)
  • Variables added to the template context by the extra_template_vars() plugin hook are now shown in the ?_context=1 debugging mode (see template_debug). (#693)
  • Fixed a bug where the “templates considered” HTML comment was no longer being displayed. (#689)
  • Fixed a datasette publish bug where --plugin-secret would over-ride plugin configuration in the provided metadata.json file. (#724)
  • Added a new CSS class for customizing the canned query page. (#727)
datasette 107914493  
24836140 https://github.com/simonw/datasette/releases/tag/0.39 MDc6UmVsZWFzZTI0ODM2MTQw 0.39 master 0.39 0 simonw 9599 0 2020-03-25T04:02:37Z 2020-03-25T04:11:35Z
  • New base_url configuration setting for serving up the correct links while running Datasette under a different URL prefix. (#394)
  • New metadata settings "sort" and "sort_desc" for setting the default sort order for a table. See Setting a default sort order. (#702)
  • Sort direction arrow now displays by default on the primary key. This means you only have to click once (not twice) to sort in reverse order. (#677)
  • New await Request(scope, receive).post_vars() method for accessing POST form variables. (#700)
  • Plugin hooks documentation now links to example uses of each plugin. (#709)
datasette 107914493  
24330942 https://github.com/simonw/datasette/releases/tag/0.38 MDc6UmVsZWFzZTI0MzMwOTQy 0.38 master 0.38 0 simonw 9599 0 2020-03-08T23:26:50Z 2020-03-08T23:42:36Z
  • The Docker build of Datasette now uses SQLite 3.31.1, upgraded from 3.26. (#695)
  • datasette publish cloudrun now accepts an optional --memory=2Gi flag for setting the Cloud Run allocated memory to a value other than the default (256Mi). (#694)
  • Fixed bug where templates that shipped with plugins were sometimes not being correctly loaded. (#697)
datasette 107914493  
24154697 https://github.com/simonw/datasette/releases/tag/0.37.1 MDc6UmVsZWFzZTI0MTU0Njk3 0.37.1 master Datasette 0.37.1 0 simonw 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) plugin hook.
datasette 107914493  
23986460 https://github.com/simonw/datasette/releases/tag/0.37 MDc6UmVsZWFzZTIzOTg2NDYw 0.37 master Datasette 0.37 0 simonw 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. (#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. (#676)
datasette 107914493  
23896184 https://github.com/simonw/datasette/releases/tag/0.36 MDc6UmVsZWFzZTIzODk2MTg0 0.36 master Datasette 0.36 0 simonw 9599 0 2020-02-22T03:04:46Z 2020-02-22T03:24:50Z
  • The datasette object passed to plugins now has API documentation: Datasette class. (#576)
  • New methods on datasette: .add_database() and .remove_database() - documentation. (#671)
  • prepare_connection() plugin hook now takes optional datasette and database arguments - prepare_connection(conn, database, datasette). (#678)
  • Added three new plugins and one new conversion tool to the The Datasette Ecosystem.

https://datasette.readthedocs.io/en/latest/changelog.html#v0-36

datasette 107914493  
23395622 https://github.com/simonw/datasette/releases/tag/0.35 MDc6UmVsZWFzZTIzMzk1NjIy 0.35 master Datasette 0.35 0 simonw 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.
  • The Datasette class has a new render_template() method which can be used by plugins to render templates using Datasette’s pre-configured Jinja 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

datasette 107914493  
23239304 https://github.com/simonw/datasette/releases/tag/0.34 MDc6UmVsZWFzZTIzMjM5MzA0 0.34 master Datasette 0.34 0 simonw 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

datasette 107914493  
22415542 https://github.com/simonw/datasette/releases/tag/0.33 MDc6UmVsZWFzZTIyNDE1NTQy 0.33 master Datasette 0.33 0 simonw 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

datasette 107914493  
21492068 https://github.com/simonw/datasette/releases/tag/0.32 MDc6UmVsZWFzZTIxNDkyMDY4 0.32 master Datasette 0.32 0 simonw 9599 0 2019-11-14T23:20:21Z 2019-11-14T23:42:14Z

Datasette now renders templates using Jinja async mode. This makes it easy for plugins to provide custom template functions that perform asynchronous actions, for example the new 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

datasette 107914493  
21449006 https://github.com/simonw/datasette/releases/tag/0.31.2 MDc6UmVsZWFzZTIxNDQ5MDA2 0.31.2 master 0.31.2 0 simonw 9599 0 2019-11-13T16:48:36Z 2019-11-13T17:38:59Z
  • Fixed a bug where datasette publish heroku applications failed to start (#633)
  • Fix for datasette publish with just --source_url - thanks, Stanley Zheng (#572)
  • Deployments to Heroku now use Python 3.8.0 (#632)

https://datasette.readthedocs.io/en/latest/changelog.html#v0-31-2

datasette 107914493  
21426299 https://github.com/simonw/datasette/releases/tag/0.31.1 MDc6UmVsZWFzZTIxNDI2Mjk5 0.31.1 master 0.31.1 0 simonw 9599 0 2019-11-13T02:18:39Z 2019-11-13T02:40:53Z
  • Deployments created using datasette publish now use python:3.8 base Docker image (#629)

https://datasette.readthedocs.io/en/latest/changelog.html#v0-31-1

datasette 107914493  
21426008 https://github.com/simonw/datasette/releases/tag/0.31 MDc6UmVsZWFzZTIxNDI2MDA4 0.31 master Datasette 0.31 0 simonw 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

datasette 107914493  
21169835 https://github.com/simonw/datasette/releases/tag/0.30.2 MDc6UmVsZWFzZTIxMTY5ODM1 0.30.2 master 0.30.2 0 simonw 9599 0 2019-11-02T23:12:46Z 2019-11-02T23:33:13Z

https://datasette.readthedocs.io/en/latest/changelog.html#v0-30-2

datasette 107914493  
21162064 https://github.com/simonw/datasette/releases/tag/0.30.1 MDc6UmVsZWFzZTIxMTYyMDY0 0.30.1 master 0.30.1 0 simonw 9599 0 2019-10-30T19:00:21Z 2019-11-02T00:06:02Z

https://datasette.readthedocs.io/en/stable/changelog.html#v0-30-1

datasette 107914493  
21098052 https://github.com/simonw/datasette/releases/tag/0.30 MDc6UmVsZWFzZTIxMDk4MDUy 0.30 master 0.30 0 simonw 9599 0 2019-10-19T01:08:04Z 2019-10-30T18:51:30Z

https://datasette.readthedocs.io/en/stable/changelog.html#v0-30

datasette 107914493  
20795250 https://github.com/simonw/datasette/releases/tag/0.29.3 MDc6UmVsZWFzZTIwNzk1MjUw 0.29.3 master 0.29.3 0 simonw 9599 0 2019-09-03T00:40:53Z 2019-10-18T05:24:54Z

https://datasette.readthedocs.io/en/stable/changelog.html#v0-29-3

datasette 107914493  

Next page

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [releases] (
   [html_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [tag_name] TEXT,
   [target_commitish] TEXT,
   [name] TEXT,
   [draft] INTEGER,
   [author] INTEGER REFERENCES [users]([id]),
   [prerelease] INTEGER,
   [created_at] TEXT,
   [published_at] TEXT,
   [body] TEXT,
   [repo] INTEGER REFERENCES [repos]([id])
, [reactions] TEXT);
CREATE INDEX [idx_releases_repo]
                ON [releases] ([repo]);
CREATE INDEX [idx_releases_author]
                ON [releases] ([author]);
Powered by Datasette · Queries took 1.2ms · About: github-to-sqlite