home / github

Menu
  • Search all tables
  • GraphQL API

releases

Table actions
  • GraphQL API for releases

332 rows sorted by created_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: target_commitish, prerelease, repo, 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
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.

  • 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
}
80981028 https://github.com/simonw/sqlite-utils/releases/tag/3.30 RE_kwDOCGYnMM4E06wk 3.30 main 3.30 0 simonw 9599 0 2022-10-25T22:34:30Z 2022-10-25T22:34:48Z
  • Now tested against Python 3.11. (#502)
  • New table.search_sql(include_rank=True) option, which adds a rank column to the generated SQL. Thanks, Jacob Chapman. (#480)
  • Progress bars now display for newline-delimited JSON files using the --nl option. Thanks, Mischa Untaga. (#485)
  • New db.close() method. (#504)
  • Conversion functions passed to table.convert(...) can now return lists or dictionaries, which will be inserted into the database as JSON strings. (#495)
  • sqlite-utils install and sqlite-utils uninstall commands for installing packages into the same virtual environment as sqlite-utils, described here. (#483)
  • New sqlite_utils.utils.flatten() utility function. (#500)
  • Documentation on using Just to run tests, linters and build documentation.
  • Documentation now covers the Release process for this package.
sqlite-utils 140912432  
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  
75560168 https://github.com/simonw/sqlite-utils/releases/tag/3.29 RE_kwDOCGYnMM4EgPTo 3.29 main 3.29 0 simonw 9599 0 2022-08-28T03:48:36Z 2022-08-28T03:50:29Z
  • The sqlite-utils query, memory and bulk commands now all accept a new --functions option. This can be passed a string of Python code, and any callable objects defined in that code will be made available to SQL queries as custom SQL functions. See Defining custom SQL functions for details. (#471)
  • db[table].create(...) method now accepts a new transform=True parameter. If the table already exists it will be transform to match the schema configuration options passed to the function. This may result in columns being added or dropped, column types being changed, column order being updated or not null and default values for columns being set. (#467)
  • Related to the above, the sqlite-utils create-table command now accepts a --transform option.
  • New introspection property: table.default_values returns a dictionary mapping each column name with a default value to the configured default value. (#475)
  • The --load-extension option can now be provided a path to a compiled SQLite extension module accompanied by the name of an entrypoint, separated by a colon - for example --load-extension ./lines0:sqlite3_lines0_noread_init. This feature is modelled on code first contributed to Datasette by Alex Garcia. (#470)
  • Functions registered using the db.register_function() method can now have a custom name specified using the new db.register_function(fn, name=...) parameter. (#458)
  • sqlite-utils rows has a new --order option for specifying the sort order for the returned rows. (#469)
  • All of the CLI options that accept Python code blocks can now all be used to define functions that can access modules imported in that same block of code without needing to use the global keyword. (#472)
  • Fixed bug where table.extract() would not behave correctly for columns containing null values. Thanks, Forest Gregg. (#423)
  • New tutorial: Cleaning data with sqlite-utils and Datasette shows how to use sqlite-utils to import and clean an example CSV file.
  • Datasette and sqlite-utils now have a Discord community. Join the Discord here.
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/75560168/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
75010827 https://github.com/dogsheep/pocket-to-sqlite/releases/tag/0.2.2 RE_kwDODLZ_YM4EeJML 0.2.2 main 0.2.2 0 simonw 9599 0 2022-08-22T16:18:16Z 2022-08-22T16:21:34Z
  • -a is now the shortcut for --auth - previously it was duplicated as a shortcut for --all. Thanks, Thomas Lockney. #7
  • pocket-to-sqlite auth command now updates the existing auth.json file rather than over-writing it. #10
pocket-to-sqlite 213286752  
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  
72130482 https://github.com/simonw/sqlite-utils/releases/tag/3.28 RE_kwDOCGYnMM4ETJ-y 3.28 main 3.28 0 simonw 9599 0 2022-07-15T22:56:01Z 2022-07-15T23:02:45Z
  • New table.duplicate(new_name) method for creating a copy of a table with a matching schema and row contents. Thanks, David. (#449)
  • New sqlite-utils duplicate data.db table_name new_name CLI command for Duplicating tables. (#454)
  • sqlite_utils.utils.rows_from_file() is now a documented API. It can be used to read a sequence of dictionaries from a file-like object containing CSV, TSV, JSON or newline-delimited JSON. It can be passed an explicit format or can attempt to detect the format automatically. (#443)
  • sqlite_utils.utils.TypeTracker is now a documented API for detecting the likely column types for a sequence of string rows, see Detecting column types using TypeTracker. (#445)
  • sqlite_utils.utils.chunks() is now a documented API for splitting an iterator into chunks. (#451)
  • sqlite-utils enable-fts now has a --replace option for replacing the existing FTS configuration for a table. (#450)
  • The create-index, add-column and duplicate commands all now take a --ignore option for ignoring errors should the database not be in the right state for them to operate. (#450)
sqlite-utils 140912432  
69481688 https://github.com/simonw/sqlite-utils/releases/tag/3.27 RE_kwDOCGYnMM4EJDTY 3.27 main 3.27 0 simonw 9599 0 2022-06-15T04:30:47Z 2022-06-15T04:34:45Z

See also the annotated release notes for this release.

  • Documentation now uses the Furo Sphinx theme. (#435)
  • Code examples in documentation now have a "copy to clipboard" button. (#436)
  • sqlite_utils.utils.utils.rows_from_file() is now a documented API, see Reading rows from a file. (#443)
  • rows_from_file() has two new parameters to help handle CSV files with rows that contain more values than are listed in that CSV file's headings: ignore_extras=True and extras_key="name-of-key". (#440)
  • sqlite_utils.utils.maximize_csv_field_size_limit() helper function for increasing the field size limit for reading CSV files to its maximum, see Setting the maximum CSV field size limit. (#442)
  • table.search(where=, where_args=) parameters for adding additional WHERE clauses to a search query. The where= parameter is available on table.search_sql(...) as well. See Searching with table.search(). (#441)
  • Fixed bug where table.detect_fts() and other search-related functions could fail if two FTS-enabled tables had names that were prefixes of each other. (#434)
sqlite-utils 140912432  
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  
65833874 https://github.com/simonw/sqlite-utils/releases/tag/3.26.1 RE_kwDOCGYnMM4D7IuS 3.26.1 main 3.26.1 0 simonw 9599 0 2022-05-02T18:17:19Z 2022-05-02T18:18:01Z
  • Now depends on click-default-group-wheel, a pure Python wheel package. This means you can install and use this package with Pyodide, which can run Python entirely in your browser using WebAssembly. (#429)

Try that out using the Pyodide REPL:

```pycon

import micropip await micropip.install("sqlite-utils") import sqlite_utils db = sqlite_utils.Database(memory=True) list(db.query("select 3 * 5")) [{'3 * 5': 15}] ```

sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/65833874/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
64414802 https://github.com/simonw/sqlite-utils/releases/tag/3.26 RE_kwDOCGYnMM4D1uRS 3.26 main 3.26 0 simonw 9599 0 2022-04-13T22:51:48Z 2022-04-13T22:53:36Z
  • New errors=r.IGNORE/r.SET_NULL parameter for the r.parsedatetime() and r.parsedate() convert recipes. (#416)
  • Fixed a bug where --multi could not be used in combination with --dry-run for the convert command. (#415)
  • New documentation: Using a convert() function to execute initialization. (#420)
  • More robust detection for whether or not deterministic=True is supported. (#425)
sqlite-utils 140912432  
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  
61628678 https://github.com/simonw/sqlite-utils/releases/tag/3.25.1 RE_kwDOCGYnMM4DrGEG 3.25.1 main 3.25.1 0 simonw 9599 0 2022-03-11T18:34:44Z 2022-03-11T18:35:41Z
  • Improved display of type information and parameters in the API reference documentation. #413
sqlite-utils 140912432  
60770975 https://github.com/simonw/sqlite-utils/releases/tag/3.25 RE_kwDOCGYnMM4Dn0qf 3.25 main 3.25 0 simonw 9599 0 2022-03-02T06:34:46Z 2022-03-02T06:35:18Z
  • New hash_id_columns= parameter for creating a primary key that's a hash of the content of specific columns - see Setting an ID based on the hash of the row contents for details. (#343)
  • New db.sqlite_version property, returning a tuple of integers representing the version of SQLite, for example (3, 38, 0).
  • Fixed a bug where register_function(deterministic=True) caused errors on versions of SQLite prior to 3.8.3. (#408)
  • New documented hash_record(record, keys=...) function.
sqlite-utils 140912432  
59656694 https://github.com/simonw/sqlite-utils/releases/tag/3.24 RE_kwDOCGYnMM4Djkn2 3.24 main 3.24 0 simonw 9599 0 2022-02-16T01:39:13Z 2022-02-16T01:41:50Z
  • SpatiaLite helpers for the sqlite-utils command-line tool - thanks, Chris Amico. (#398)
    • sqlite-utils create-database --init-spatialite option for initializing SpatiaLite on a newly created database.
    • sqlite-utils add-geometry-column command for adding geometry columns.
    • sqlite-utils create-spatial-index command for adding spatial indexes.
  • db[table].create(..., if_not_exists=True) option for creating a table only if it does not already exist. (#397)
  • Database(memory_name="my_shared_database") parameter for creating a named in-memory database that can be shared between multiple connections. (#405)
  • Documentation now describes how to add a primary key to a rowid table using sqlite-utils transform. (#403)
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/59656694/reactions",
    "total_count": 2,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
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
}
58663467 https://github.com/simonw/sqlite-utils/releases/tag/3.23 RE_kwDOCGYnMM4DfyIr 3.23 main 3.23 0 simonw 9599 0 2022-02-04T06:41:46Z 2022-02-04T06:44:19Z

This release introduces four new utility methods for working with SpatiaLite. Thanks, Chris Amico. (#330)

  • sqlite_utils.utils.find_spatialite() finds the location of the SpatiaLite module on disk.
  • db.init_spatialite() initializes SpatiaLite for the given database.
  • table.add_geometry_column(...) adds a geometry column to an existing table.
  • table.create_spatial_index(...) creates a spatial index for a column.
  • sqlite-utils batch now accepts a --batch-size option. (#392)
sqlite-utils 140912432  
57980102 https://github.com/simonw/sqlite-utils/releases/tag/3.22.1 RE_kwDOCGYnMM4DdLTG 3.22.1 main 3.22.1 0 simonw 9599 0 2022-01-26T03:28:30Z 2022-01-26T03:29:24Z
  • All commands now include example usage in their --help - see CLI reference. (#384)
  • Python library documentation has a new Getting started section. (#387)
  • Documentation now uses Plausible analytics. (#389)
sqlite-utils 140912432  
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  
56875206 https://github.com/simonw/sqlite-utils/releases/tag/3.22 RE_kwDOCGYnMM4DY9jG 3.22 main 3.22 0 simonw 9599 0 2022-01-11T23:44:48Z 2022-01-11T23:49:28Z
  • New CLI reference documentation page, listing the output of --help for every one of the CLI commands. (#383)
  • sqlite-utils rows now has --limit and --offset options for paginating through data. (#381)
  • sqlite-utils rows now has --where and -p options for filtering the table using a WHERE query, see Returning all rows in a table. (#382)
sqlite-utils 140912432  
56788942 https://github.com/simonw/sqlite-utils/releases/tag/3.21 RE_kwDOCGYnMM4DYofO 3.21 main 3.21 0 simonw 9599 0 2022-01-11T02:34:21Z 2022-01-11T02:35:02Z

CLI and Python library improvements to help run ANALYZE after creating indexes or inserting rows, to gain better performance from the SQLite query planner when it runs against indexes.

Three new CLI commands: create-database, analyze and bulk.

More details and examples can be found in the annotated release notes.

  • New sqlite-utils create-database command for creating new empty database files. (#348)
  • New Python methods for running ANALYZE against a database, table or index: db.analyze() and table.analyze(), see Optimizing index usage with ANALYZE. (#366)
  • New sqlite-utils analyze command for running ANALYZE using the CLI. (#379)
  • The create-index, insert and upsert commands now have a new --analyze option for running ANALYZE after the command has completed. (#379)
  • New sqlite-utils bulk command which can import records in the same way as sqlite-utils insert (from JSON, CSV or TSV) and use them to bulk execute a parametrized SQL query. (#375)
  • The CLI tool can now also be run using python -m sqlite_utils. (#368)
  • Using --fmt now implies --table, so you don't need to pass both options. (#374)
  • The --convert function applied to rows can now modify the row in place. (#371)
  • The insert-files command supports two new columns: stem and suffix. (#372)
  • The --nl import option now ignores blank lines in the input. (#376)
  • Fixed bug where streaming input to the insert command with --batch-size 1 would appear to only commit after several rows had been ingested, due to unnecessary input buffering. (#364)
sqlite-utils 140912432  
56514583 https://github.com/simonw/sqlite-utils/releases/tag/3.20 RE_kwDOCGYnMM4DXlgX 3.20 main 3.20 0 simonw 9599 0 2022-01-06T06:55:35Z 2022-01-06T06:57:09Z
  • sqlite-utils insert ... --lines to insert the lines from a file into a table with a single line column, see Inserting unstructured data with --lines and --text.
  • sqlite-utils insert ... --text to insert the contents of the file into a table with a single text column and a single row.
  • sqlite-utils insert ... --convert allows a Python function to be provided that will be used to convert each row that is being inserted into the database. See Applying conversions while inserting data, including details on special behavior when combined with --lines and --text. (#356)
  • sqlite-utils convert now accepts a code value of - to read code from standard input. (#353)
  • sqlite-utils convert also now accepts code that defines a named convert(value) function, see Converting data in columns.
  • db.supports_strict property showing if the database connection supports SQLite strict tables.
  • table.strict property (see .strict) indicating if the table uses strict mode. (#344)
  • Fixed bug where sqlite-utils upsert ... --detect-types ignored the --detect-types option. (#362)
sqlite-utils 140912432  
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  
54439832 https://github.com/dogsheep/github-to-sqlite/releases/tag/2.8.3 RE_kwDODFdgUs4DPq-Y 2.8.3 main 2.8.3 0 simonw 9599 0 2021-12-01T19:36:52Z 2021-12-01T19:37:19Z
  • Minor documentation and inline help improvements.
github-to-sqlite 207052882  
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  
53785562 https://github.com/simonw/sqlite-utils/releases/tag/3.19 RE_kwDOCGYnMM4DNLPa 3.19 main 3.19 0 simonw 9599 0 2021-11-21T04:41:56Z 2021-11-21T04:42:24Z
  • The table.lookup() method now accepts keyword arguments that match those on the underlying table.insert() method: foreign_keys=, column_order=, not_null=, defaults=, extracts=, conversions= and columns=. You can also now pass pk= to specify a different column name to use for the primary key. (#342)
sqlite-utils 140912432  
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  
53698399 https://github.com/simonw/sqlite-utils/releases/tag/3.19a0 RE_kwDOCGYnMM4DM19f 3.19a0 main 3.19a0 0 simonw 9599 1 2021-11-19T07:27:41Z 2021-11-19T07:28:50Z
  • Extra keyword arguments for table.lookup() which are passed through to .insert(). #342
sqlite-utils 140912432  
53350811 https://github.com/simonw/sqlite-utils/releases/tag/3.18 RE_kwDOCGYnMM4DLhGb 3.18 main 3.18 0 simonw 9599 0 2021-11-15T03:15:23Z 2021-11-15T03:17:31Z
  • The table.lookup() method now has an optional second argument which can be used to populate columns only the first time the record is created, see Working with lookup tables. (#339)
  • sqlite-utils memory now has a --flatten option for flattening nested JSON objects into separate columns, consistent with sqlite-utils insert. (#332)
  • table.create_index(..., find_unique_name=True) parameter, which finds an available name for the created index even if the default name has already been taken. This means that index-foreign-keys will work even if one of the indexes it tries to create clashes with an existing index name. (#335)
  • Added py.typed to the module, so mypy should now correctly pick up the type annotations. Thanks, Andreas Longo. (#331)
  • Now depends on python-dateutil instead of depending on dateutils. Thanks, Denys Pavlov. (#324)
  • table.create() (see Explicitly creating a table) now handles dict, list and tuple types, mapping them to TEXT columns in SQLite so that they can be stored encoded as JSON. (#338)
  • Inserted data with square braces in the column names (for example a CSV file containing a item[price]) column now have the braces converted to underscores: item_price_. Previously such columns would be rejected with an error. (#329)
  • Now also tested against Python 3.10. (#330)
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/53350811/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 0
}
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
}
50089123 https://github.com/simonw/sqlite-utils/releases/tag/3.17.1 RE_kwDOCGYnMM4C_Eyj 3.17.1 main 3.17.1 0 simonw 9599 0 2021-09-22T20:49:36Z 2021-09-22T20:51:04Z
  • sqlite-utils memory now works if files passed to it share the same file name. (#325)
  • sqlite-utils query now returns [] in JSON mode if no rows are returned. (#328)
sqlite-utils 140912432  
50003635 https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.22 RE_kwDODEm0Qs4C-v6z 0.22 main 0.22 0 simonw 9599 0 2021-09-21T17:39:08Z 2021-09-21T17:41:05Z
  • twitter-to-sqlite import now imports app.js to archive_app table.
  • Small fixes for twitter-to-sqlite import reflecting changed filenames in the Twitter export.
  • Fix for remaining since_id bug, thanks Ruben Vermeersch! #58
twitter-to-sqlite 206156866
{
    "url": "https://api.github.com/repos/dogsheep/twitter-to-sqlite/releases/50003635/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "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  
48523966 https://github.com/dogsheep/evernote-to-sqlite/releases/tag/0.3.2 MDc6UmVsZWFzZTQ4NTIzOTY2 0.3.2 main 0.3.2 0 simonw 9599 0 2021-08-26T19:01:49Z 2021-08-26T19:02:47Z
  • Fixed error when encountering <en-note> documents that were not well-formed XML. #13
evernote-to-sqlite 303218369  
48389722 https://github.com/simonw/sqlite-utils/releases/tag/3.17 MDc6UmVsZWFzZTQ4Mzg5NzIy 3.17 main 3.17 0 simonw 9599 0 2021-08-24T23:40:18Z 2021-08-24T23:42:22Z
  • The sqlite-utils memory command has a new --analyze option, which runs the equivalent of the analyze-tables command directly against the in-memory database created from the incoming CSV or JSON data. (#320)
  • sqlite-utils insert-files now has the ability to insert file contents in to TEXT columns in addition to the default BLOB. Pass the --text option or use content_text as a column specifier. (#319)
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/48389722/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 1,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
48151477 https://github.com/dogsheep/healthkit-to-sqlite/releases/tag/1.0.1 MDc6UmVsZWFzZTQ4MTUxNDc3 1.0.1 main 1.0.1 0 simonw 9599 0 2021-08-20T00:55:29Z 2021-08-20T00:56:17Z
  • Fixed bug where activity_summary table could fail to be built with an error. #19
healthkit-to-sqlite 197882382  
48150315 https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.21.4 MDc6UmVsZWFzZTQ4MTUwMzE1 0.21.4 main 0.21.4 0 simonw 9599 0 2021-08-20T00:14:08Z 2021-08-20T00:14:30Z
  • Fix for since_id error with user-timeline. #57
  • Document the use of --stop_after with favorites - thanks, Mike Lee Williams. #49
  • Fixes for Twitter archive imports, thanks Jacob Kaplan-Moss. #55
twitter-to-sqlite 206156866  
48077246 https://github.com/simonw/sqlite-utils/releases/tag/3.16 MDc6UmVsZWFzZTQ4MDc3MjQ2 3.16 main 3.16 0 simonw 9599 0 2021-08-18T22:36:32Z 2021-08-18T22:37:55Z
  • Type signatures added to more methods, including table.resolve_foreign_keys(), db.create_table_sql(), db.create_table() and table.create(). (#314)
  • New db.quote_fts(value) method, see Quoting characters for use in search - thanks, Mark Neumann. (#246)
  • table.search() now accepts an optional quote=True parameter. (#296)
  • CLI command sqlite-utils search now accepts a --quote option. (#296)
  • Fixed bug where --no-headers and --tsv options to sqlite-utils insert could not be used together. (#295)
  • Various small improvements to API reference documentation.
sqlite-utils 140912432  
47636109 https://github.com/simonw/sqlite-utils/releases/tag/3.15.1 MDc6UmVsZWFzZTQ3NjM2MTA5 3.15.1 main 3.15.1 0 simonw 9599 0 2021-08-10T23:55:12Z 2021-08-10T23:55:38Z
  • Python library now includes type annotations on almost all of the methods, plus detailed docstrings describing each one. (#311)
  • New API Reference documentation page, powered by those docstrings.
  • Fixed bug where .add_foreign_keys() failed to raise an error if called against a View. (#313)
  • Fixed bug where .delete_where() returned a [] instead of returning self if called against a non-existant table. (#315)
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/47636109/reactions",
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
47569134 https://github.com/simonw/sqlite-utils/releases/tag/3.15 MDc6UmVsZWFzZTQ3NTY5MTM0 3.15 main 3.15 0 simonw 9599 0 2021-08-09T22:42:06Z 2021-08-09T22:43:16Z
  • sqlite-utils insert --flatten option for flattening nested JSON objects to create tables with column names like topkey_nestedkey. (#310)
  • Fixed several spelling mistakes in the documentation, spotted using codespell.
  • Errors that occur while using the sqlite-utils CLI tool now show the responsible SQL and query parameters, if possible. (#309)
sqlite-utils 140912432  
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  
47185841 https://github.com/simonw/sqlite-utils/releases/tag/3.14 MDc6UmVsZWFzZTQ3MTg1ODQx 3.14 main 3.14 0 simonw 9599 0 2021-08-02T21:29:16Z 2021-08-02T21:34:43Z

This release introduces the new sqlite-utils convert command (#251) and corresponding table.convert(...) Python method (#302). These tools can be used to apply a Python conversion function to one or more columns of a table, either updating the column in place or using transformed data from that column to populate one or more other columns.

This command-line example uses the Python standard library textwrap module to wrap the content of the content column in the articles table to 100 characters: $ sqlite-utils convert content.db articles content\ '"\n".join(textwrap.wrap(value, 100))'\ --import=textwrap The same operation in Python code looks like this: ```python import sqlite_utils, textwrap

db = sqlite_utils.Database("content.db") db["articles"].convert("content", lambda v: "\n".join(textwrap.wrap(v, 100))) ``` See the full documentation for the sqlite-utils convert command and the table.convert(...) Python method for more details.

Also in this release:

  • The new table.count_where(...) method, for counting rows in a table that match a specific SQL WHERE clause. (#305)
  • New --silent option for the sqlite-utils insert-files command to hide the terminal progress bar, consistent with the --silent option for sqlite-utils convert. (#301)
sqlite-utils 140912432  
46720847 https://github.com/simonw/sqlite-utils/releases/tag/3.13 MDc6UmVsZWFzZTQ2NzIwODQ3 3.13 main 3.13 0 simonw 9599 0 2021-07-24T22:15:27Z 2021-07-24T22:17:47Z
  • sqlite-utils schema my.db table1 table2 command now accepts optional table names. (#299)
  • sqlite-utils memory --help now describes the --schema option.
sqlite-utils 140912432  
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  
45251624 https://github.com/simonw/sqlite-utils/releases/tag/3.12 MDc6UmVsZWFzZTQ1MjUxNjI0 3.12 main 3.12 0 simonw 9599 0 2021-06-25T17:59:05Z 2021-06-25T18:00:18Z
  • New db.query(sql, params) method, which executes a SQL query and returns the results as an iterator over Python dictionaries. (#290)
  • This project now uses flake8 and has started to use mypy. (#291)
  • New documentation on contributing to this project. (#292)
sqlite-utils 140912432  
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
}
44927292 https://github.com/simonw/sqlite-utils/releases/tag/3.11 MDc6UmVsZWFzZTQ0OTI3Mjky 3.11 main 3.11 0 simonw 9599 0 2021-06-20T18:52:15Z 2021-06-20T18:53:09Z
  • New sqlite-utils memory data.csv --schema option, for outputting the schema of the in-memory database generated from one or more files. See --schema, --dump and --save. (#288)
  • Added installation instructions. (#286)
sqlite-utils 140912432  
44904928 https://github.com/simonw/sqlite-utils/releases/tag/3.10 MDc6UmVsZWFzZTQ0OTA0OTI4 3.10 main 3.10 0 simonw 9599 0 2021-06-19T16:09:29Z 2021-06-19T16:13:11Z

This release introduces the sqlite-utils memory command, which can be used to load CSV or JSON data into a temporary in-memory database and run SQL queries (including joins across multiple files) directly against that data.

Also new: sqlite-utils insert --detect-types, sqlite-utils dump, table.use_rowid plus some smaller fixes.

sqlite-utils memory

This example of sqlite-utils memory retrieves information about the all of the repositories in the Dogsheep organization on GitHub using this JSON API, sorts them by their number of stars and outputs a table of the top five (using -t):

``` $ curl -s 'https://api.github.com/users/dogsheep/repos'\ | sqlite-utils memory - ' select full_name, forks_count, stargazers_count from stdin order by stargazers_count desc limit 5 ' -t full_name forks_count stargazers_count


dogsheep/twitter-to-sqlite 12 225 dogsheep/github-to-sqlite 14 139 dogsheep/dogsheep-photos 5 116 dogsheep/dogsheep.github.io 7 90 dogsheep/healthkit-to-sqlite 4 85 ```

The tool works against files on disk as well. This example joins data from two CSV files:

$ cat creatures.csv species_id,name 1,Cleo 2,Bants 2,Dori 2,Azi $ cat species.csv id,species_name 1,Dog 2,Chicken $ sqlite-utils memory species.csv creatures.csv ' select * from creatures join species on creatures.species_id = species.id ' [{"species_id": 1, "name": "Cleo", "id": 1, "species_name": "Dog"}, {"species_id": 2, "name": "Bants", "id": 2, "species_name": "Chicken"}, {"species_id": 2, "name": "Dori", "id": 2, "species_name": "Chicken"}, {"species_id": 2, "name": "Azi", "id": 2, "species_name": "Chicken"}]

Here the species.csv file becomes the species table, the creatures.csv file becomes the creatures table and the output is JSON, the default output format.

You can also use the --attach option to attach existing SQLite database files to the in-memory database, in order to join data from CSV or JSON directly against your existing tables.

Full documentation of this new feature is available in Querying data directly using an in-memory database. (#272)

sqlite-utils insert --detect-types

The sqlite-utils insert command can be used to insert data from JSON, CSV or TSV files into a SQLite database file. The new --detect-types option (shortcut -d), when used in conjunction with a CSV or TSV import, will automatically detect if columns in the file are integers or floating point numbers as opposed to treating everything as a text column and create the new table with the corresponding schema. See Inserting CSV or TSV data for details. (#282)

Other changes

  • Bug fix: table.transform(), when run against a table without explicit primary keys, would incorrectly create a new version of the table with an explicit primary key column called rowid. (#284)
  • New table.use_rowid introspection property, see .use_rowid. (#285)
  • The new sqlite-utils dump file.db command outputs a SQL dump that can be used to recreate a database. (#274)
  • -h now works as a shortcut for --help, thanks Loren McIntyre. (#276)
  • Now using pytest-cov and Codecov to track test coverage - currently at 96%. (#275)
  • SQL errors that occur when using sqlite-utils query are now displayed as CLI errors.
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/44904928/reactions",
    "total_count": 3,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 1,
    "eyes": 1
}
44537329 https://github.com/dogsheep/dogsheep-beta/releases/tag/0.10.2 MDc6UmVsZWFzZTQ0NTM3MzI5 0.10.2 main 0.10.2 0 simonw 9599 0 2021-06-13T14:37:17Z 2021-06-13T14:38:09Z
  • Fixed bug where searches consisting only of whitespace caused a server error. #33
dogsheep-beta 197431109  
44529219 https://github.com/simonw/sqlite-utils/releases/tag/3.9.1 MDc6UmVsZWFzZTQ0NTI5MjE5 3.9.1 main 3.9.1 0 simonw 9599 0 2021-06-13T02:59:08Z 2021-06-13T03:00:45Z
  • Fixed bug when using table.upsert_all() to create a table with only a single column that is treated as the primary key. (#271)
sqlite-utils 140912432  
44511190 https://github.com/simonw/sqlite-utils/releases/tag/3.9 MDc6UmVsZWFzZTQ0NTExMTkw 3.9 main 3.9 0 simonw 9599 0 2021-06-12T02:07:18Z 2021-06-12T02:08:03Z
  • New sqlite-utils schema command showing the full SQL schema for a database, see Showing the schema (CLI). (#268)
  • db.schema introspection property exposing the same feature to the Python library, see Showing the schema (Python library).
sqlite-utils 140912432
{
    "url": "https://api.github.com/repos/simonw/sqlite-utils/releases/44511190/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  
44019361 https://github.com/simonw/sqlite-utils/releases/tag/3.8 MDc6UmVsZWFzZTQ0MDE5MzYx 3.8 main 3.8 0 simonw 9599 0 2021-06-03T05:16:33Z 2021-06-03T05:17:33Z
  • New sqlite-utils indexes command to list indexes in a database, see Listing indexes. (#263)
  • table.xindexes introspection property returning more details about that table's indexes, see .xindexes. (#261)
sqlite-utils 140912432  
43797212 https://github.com/simonw/sqlite-utils/releases/tag/3.7 MDc6UmVsZWFzZTQzNzk3MjEy 3.7 main 3.7 0 simonw 9599 0 2021-05-29T05:47:59Z 2021-05-29T05:49:59Z
  • New table.pks_and_rows_where() method returning (primary_key, row_dictionary) tuples - see Listing rows with their primary keys. (#240)
  • Fixed bug with table.add_foreign_key() against columns containing spaces. (#238)
  • table_or_view.drop(ignore=True) option for avoiding errors if the table or view does not exist. (#237)
  • sqlite-utils drop-view --ignore and sqlite-utils drop-table --ignore options. (#237)
  • Fixed a bug with inserts of nested JSON containing non-ascii strings - thanks, Dylan Wu. (#257)
  • Suggest --alter if an error occurs caused by a missing column. (#259)
  • Support creating indexes with columns in descending order, see API documentation and CLI documentation. (#260)
  • Correctly handle CSV files that start with a UTF-8 BOM. (#250)
sqlite-utils 140912432  
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  
39765751 https://github.com/dogsheep/hacker-news-to-sqlite/releases/tag/0.4 MDc6UmVsZWFzZTM5NzY1NzUx 0.4 main 0.4 0 simonw 9599 0 2021-03-13T19:11:12Z 2021-03-13T19:15:06Z

Progress display now shows the total as well as the number currently in the queue. % hacker-news-to-sqlite trees hn.db 26440397 done: 1, in queue: 0, total: 1 done: 2, in queue: 28, total: 30 done: 3, in queue: 27, total: 30

hacker-news-to-sqlite 248903544  
38290990 https://github.com/simonw/sqlite-utils/releases/tag/3.6 MDc6UmVsZWFzZTM4MjkwOTkw 3.6 main 3.6 0 simonw 9599 0 2021-02-19T05:18:02Z 2021-02-19T05:19:00Z

This release adds the ability to execute queries joining data from more than one database file - similar to the cross database querying feature introduced in Datasette 0.55.

  • The db.attach(alias, filepath) Python method can be used to attach extra databases to the same connection, see db.attach() in the Python API documentation. (#113)
  • The --attach option attaches extra aliased databases to run SQL queries against directly on the command-line, see attaching additional databases in the CLI documentation. (#236)
sqlite-utils 140912432  
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  
38037267 https://github.com/simonw/sqlite-utils/releases/tag/3.5 MDc6UmVsZWFzZTM4MDM3MjY3 3.5 main 3.5 0 simonw 9599 0 2021-02-14T22:43:06Z 2021-02-14T22:44:21Z
  • sqlite-utils insert --sniff option for detecting the delimiter and quote character used by a CSV file, see Alternative delimiters and quote characters. (#230)
  • The table.rows_where(), table.search() and table.search_sql() methods all now take optional offset= and limit= arguments. (#231)
  • New --no-headers option for sqlite-utils insert --csv to handle CSV files that are missing the header row, see CSV files without a header row. (#228)
  • Fixed bug where inserting data with extra columns in subsequent chunks would throw an error. Thanks @nieuwenhoven for the fix. (#234)
  • Fixed bug importing CSV files with columns containing more than 128KB of data. (#229)
  • Test suite now runs in CI against Ubuntu, macOS and Windows. Thanks @nieuwenhoven for the Windows test fixes. (#232)
sqlite-utils 140912432  
37947725 https://github.com/dogsheep/evernote-to-sqlite/releases/tag/0.3.1 MDc6UmVsZWFzZTM3OTQ3NzI1 0.3.1 main 0.3.1 0 simonw 9599 0 2021-02-11T22:38:21Z 2021-02-11T22:40:40Z
  • Explicitly open file using utf-8 encoding - thanks, RiverZhou. #10
  • Fix import error if note has no "updated" element - thanks, Matej Korosec. #8
evernote-to-sqlite 303218369  
37946829 https://github.com/dogsheep/evernote-to-sqlite/releases/tag/0.3 MDc6UmVsZWFzZTM3OTQ2ODI5 0.3 main 0.3 0 simonw 9599 0 2021-02-11T22:14:01Z 2021-02-11T22:16:20Z
  • Correctly handle entities in XHTML notes. #9
  • Fixed a bug importing ENEX files on Windows. Thanks, dskrad. #11
evernote-to-sqlite 303218369  
37438817 https://github.com/simonw/sqlite-utils/releases/tag/3.4.1 MDc6UmVsZWFzZTM3NDM4ODE3 3.4.1 main 3.4.1 0 simonw 9599 0 2021-02-06T02:10:04Z 2021-02-06T02:11:15Z
  • Fixed a code import bug that slipped in to 3.4. (#226)
sqlite-utils 140912432  
37437744 https://github.com/simonw/sqlite-utils/releases/tag/3.4 MDc6UmVsZWFzZTM3NDM3NzQ0 3.4 main 3.4 0 simonw 9599 0 2021-02-06T01:37:27Z 2021-02-06T01:38:26Z
  • sqlite-utils insert --csv now accepts optional --delimiter and --quotechar options. See Alternative delimiters and quote characters. (#223)
sqlite-utils 140912432  
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  
36530359 https://github.com/dogsheep/swarm-to-sqlite/releases/tag/0.3.3 MDc6UmVsZWFzZTM2NTMwMzU5 0.3.3 main 0.3.3 0 simonw 9599 0 2021-01-18T04:34:56Z 2021-01-18T04:36:03Z
  • Fixed bug where tool could crash with an error about missing columns. #11
swarm-to-sqlite 205429375  
36530216 https://github.com/simonw/sqlite-utils/releases/tag/3.3 MDc6UmVsZWFzZTM2NTMwMjE2 3.3 main 3.3 0 simonw 9599 0 2021-01-18T04:28:24Z 2021-01-18T04:29:48Z
  • The table.m2m() method now accepts an optional alter=True argument to specify that any missing columns should be added to the referenced table. See Working with many-to-many relationships. (#222)
sqlite-utils 140912432  
36307444 https://github.com/simonw/sqlite-utils/releases/tag/3.2.1 MDc6UmVsZWFzZTM2MzA3NDQ0 3.2.1 main 3.2.1 0 simonw 9599 0 2021-01-12T23:22:53Z 2021-01-12T23:23:25Z
  • Fixed a bug where .add_missing_columns() failed to take case insensitive column names into account. (#221)
sqlite-utils 140912432  
35930040 https://github.com/simonw/sqlite-utils/releases/tag/3.2 MDc6UmVsZWFzZTM1OTMwMDQw 3.2 main 3.2 0 simonw 9599 0 2021-01-03T21:15:26Z 2021-01-03T21:17:37Z

This release introduces a new mechanism for speeding up count(*) queries using cached table counts, stored in a _counts table and updated by triggers. This mechanism is described in Cached table counts using triggers, and can be enabled using Python API methods or the new enable-counts CLI command. (#212)

  • table.enable_counts() method for enabling these triggers on a specific table.
  • db.enable_counts() method for enabling triggers on every table in the database. (#213)
  • New sqlite-utils enable-counts my.db command for enabling counts on all or specific tables, see Enabling cached counts. (#214)
  • New sqlite-utils triggers command for listing the triggers defined for a database or specific tables, see Listing triggers. (#218)
  • New db.use_counts_table property which, if True, causes table.count to read from the _counts table. (#215)
  • table.has_counts_triggers property revealing if a table has been configured with the new _counts database triggers.
  • db.reset_counts() method and sqlite-utils reset-counts command for resetting the values in the _counts table. (#219)
  • The previously undocumented db.escape() method has been renamed to db.quote() and is now covered by the documentation: Quoting strings for use in SQL. (#217)
  • New table.triggers_dict and db.triggers_dict introspection properties. (#211, #216)
  • sqlite-utils insert now shows a more useful error message for invalid JSON. (#206)
sqlite-utils 140912432  
35902315 https://github.com/simonw/sqlite-utils/releases/tag/3.1.1 MDc6UmVsZWFzZTM1OTAyMzE1 3.1.1 main 3.1.1 0 simonw 9599 0 2021-01-01T23:56:20Z 2021-01-01T23:57:07Z
  • Fixed failing test caused by optimize sometimes creating larger database files. (#209)
  • Documentation now lives on https://sqlite-utils.datasette.io/
  • README now includes brew install sqlite-utils installation method.
sqlite-utils 140912432  
35520026 https://github.com/dogsheep/dogsheep-beta/releases/tag/0.10.1 MDc6UmVsZWFzZTM1NTIwMDI2 0.10.1 main 0.10.1 0 simonw 9599 0 2020-12-19T06:18:01Z 2020-12-19T06:19:13Z
  • Fix for error if search query contains hyphens such as github-to-sqlite. #31
dogsheep-beta 197431109  
35382391 https://github.com/dogsheep/dogsheep-beta/releases/tag/0.10 MDc6UmVsZWFzZTM1MzgyMzkx 0.10 main 0.10 0 simonw 9599 0 2020-12-16T21:27:04Z 2020-12-16T21:28:13Z
  • Now depends on sqlite-utils >= 3.0. #30
  • The user's original search term is now passed to the display_sql SQL query as the :q parameter. #29
dogsheep-beta 197431109  
35374715 https://github.com/dogsheep/github-to-sqlite/releases/tag/2.8.2 MDc6UmVsZWFzZTM1Mzc0NzE1 2.8.2 main 2.8.2 0 simonw 9599 0 2020-12-16T19:20:36Z 2020-12-16T19:21:58Z
  • --readme now stores null if the README file does not exist, rather than throwing an error. #57
  • README HTML is rewritten to fix broken internal links, e.g. for a table of contents. #58
github-to-sqlite 207052882  
35200016 https://github.com/simonw/sqlite-utils/releases/tag/3.1 MDc6UmVsZWFzZTM1MjAwMDE2 3.1 main 3.1 0 simonw 9599 0 2020-12-13T07:30:59Z 2020-12-13T07:31:40Z
  • New command: sqlite-utils analyze-tables my.db outputs useful information about the table columns in the database, such as the number of distinct values and how many rows are null. See Analyzing tables for documentation. (#207)
  • New table.analyze_column(column) Python method used by the analyze-tables command - see Analyzing a column.
  • The table.update() method now correctly handles values that should be stored as JSON. Thanks, Andreas Madsack. (#204)
sqlite-utils 140912432  
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  

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 28.537ms · About: github-to-sqlite