rowid,repo,release,date,body_markdown,published_at,topics
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.9,2019-09-03,https://sqlite-utils.readthedocs.io/en/stable/changelog.html#v1-9,2019-09-03T00:46:02Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.8,2019-09-03,https://sqlite-utils.readthedocs.io/en/stable/changelog.html#v1-8,2019-09-03T00:45:42Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.11,2019-09-03,https://sqlite-utils.readthedocs.io/en/stable/changelog.html#v1-11,2019-09-03T01:03:27Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.10,2019-09-03,https://sqlite-utils.readthedocs.io/en/stable/changelog.html#v1-10,2019-09-03T00:46:27Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.7.1,2019-07-28,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-7-1,2019-07-28T12:05:36Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.7,2019-07-28,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-7,2019-07-28T12:03:21Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.3,2019-06-29,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-3,2019-06-29T06:39:32Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.2.2,2019-06-26,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-2-2,2019-06-26T04:24:33Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.2.1,2019-06-21,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-2-1,2019-06-21T00:06:29Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.2,2019-06-13,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-2,2019-06-13T06:42:21Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.12.1,2019-11-07,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-12-1,2019-11-07T05:00:55Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.12,2019-11-07,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-12,2019-11-07T05:00:24Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.1,2019-05-29,"https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-1

* Support for `ignore=True` / `--ignore` for ignoring inserted records if the primary key alread exists (#21)
* Ability to add a column that is a foreign key reference using `fk=...` / `--fk` (#16)
",2019-05-29T05:15:22Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.0.1,2019-05-28,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-0-1,2019-05-28T00:51:21Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/1.0,2019-05-25,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-0,2019-05-25T01:19:21Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.9,2019-01-29,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-9,2019-01-29T15:30:48Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.14,2019-02-24,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-14,2019-02-24T23:15:16Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.13,2019-02-24,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-13,2019-02-24T07:00:14Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.12,2019-02-23,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-12,2019-02-23T02:31:29Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.11,2019-02-23,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-11,2019-02-23T02:15:34Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.10,2019-02-08,https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-10,2019-02-08T05:19:33Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.30.1,2019-11-02,https://datasette.readthedocs.io/en/stable/changelog.html#v0-30-1,2019-11-02T00:06:02Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.30,2019-10-30,https://datasette.readthedocs.io/en/stable/changelog.html#v0-30,2019-10-30T18:51:30Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.29.3,2019-10-18,https://datasette.readthedocs.io/en/stable/changelog.html#v0-29-3,2019-10-18T05:24:54Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.27,2019-02-06,https://datasette.readthedocs.io/en/stable/changelog.html#v0-27,2019-02-06T05:10:20Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.30.2,2019-11-02,https://datasette.readthedocs.io/en/latest/changelog.html#v0-30-2,2019-11-02T23:33:13Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.3,2020-02-08,"`table.exists()` is now a method, not a property. This was not a documented part of the API before so I’m considering this a non-breaking change. (#83)",2020-02-08T23:59:20Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.3.1,2020-02-11,`table.create_index()` now works for columns that contain spaces. (#85),2020-02-11T05:59:43Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.28,2019-05-19,"[Datasette 0.28](https://datasette.readthedocs.io/en/stable/changelog.html#v0-28) - a salmagundi of new features!
   * No longer immutable! Datasette now supports [databases that change](https://datasette.readthedocs.io/en/stable/changelog.html#supporting-databases-that-change).
   * [Faceting improvements](https://datasette.readthedocs.io/en/stable/changelog.html#faceting-improvements-and-faceting-plugins) including facet-by-JSON-array and the ability to define custom faceting using plugins.
   * [datasette publish cloudrun](https://datasette.readthedocs.io/en/stable/changelog.html#datasette-publish-cloudrun) lets you publish databasese to Google's new Cloud Run hosting service.
   * New [register_output_renderer](https://datasette.readthedocs.io/en/stable/changelog.html#register-output-renderer-plugins) plugin hook for adding custom output extensions to Datasette in addition to the default `.json` and `.csv`.
   * Dozens of other smaller features and tweaks - see [the release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-28) for full details.",2019-05-19T21:42:28Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.26,2019-01-10,[Datasette 0.26 release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-26),2019-01-10T21:41:00Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.41,2020-05-06,"You can now create [custom pages](https://datasette.readthedocs.io/en/0.41/custom_templates.html#custom-pages) within your Datasette instance using a custom template file. For example, adding a template file called `templates/pages/about.html` will result in a new page being served at `/about` on your instance. See the [custom pages documentation](https://datasette.readthedocs.io/en/0.41/custom_templates.html#custom-pages) for full details, including how to return custom HTTP headers, redirects and status codes. (#648)

[Configuration directory mode](https://datasette.readthedocs.io/en/0.41/config.html#config-dir) (#731) allows you to define a custom Datasette instance as a directory. So instead of running the following:

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

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

    $ datasette my-project/

Also in this release:

-   New `NOT LIKE` table filter: `?colname__notlike=expression`. (#750)
-   Datasette now has a *pattern portfolio* at `/-/patterns` - e.g. <https://latest.datasette.io/-/patterns>. This is a page that shows every Datasette user interface component in one place, to aid core development and people building custom CSS themes. (#151)
-   SQLite [PRAGMA functions](https://www.sqlite.org/pragma.html#pragfunc) such as `pragma_table_info(tablename)` are now allowed in Datasette SQL queries. (#761)
-   Datasette pages now consistently return a `content-type` of `text/html; charset=utf-8""`. (#752)
-   Datasette now handles an ASGI `raw_path` value of `None`, which should allow compatibilty with the [Mangum](https://github.com/erm/mangum) adapter for running ASGI apps on AWS Lambda. Thanks, Colin Dellow. (#719)
-   Installation documentation now covers how to [Install using pipx](https://datasette.readthedocs.io/en/0.41/installation.html#installation-pipx). (#756)
-   Improved the documentation for [Full-text search](https://datasette.readthedocs.io/en/0.41/full_text_search.html#full-text-search).",2020-05-06T18:30:03Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
197882382,https://github.com/dogsheep/healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/releases/tag/0.3.1,2019-07-24,Uses less RAM - see #7 ,2019-07-24T06:38:36Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""healthkit"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.8,2019-01-28,"Two new commands: `sqlite-utils csv` and `sqlite-utils json`

https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-8",2019-01-28T06:28:12Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.31,2019-11-13,"This version adds compatibility with Python 3.8 and breaks compatibility with Python 3.5.

Full release notes: https://datasette.readthedocs.io/en/stable/changelog.html#v0-31",2019-11-13T02:16:15Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.20,2020-09-23,"This release introduces two key new capabilities: **transform** ([#114](https://github.com/simonw/sqlite-utils/issues/114)) and **extract** ([#42](https://github.com/simonw/sqlite-utils/issues/42)).

### Transform

SQLite's ALTER TABLE has [several documented limitations](https://sqlite.org/lang_altertable.html). The `table.transform()` Python method and `sqlite-utils transform` CLI command work around these limitations using a pattern where a new table with the desired structure is created, data is copied over to it and the old table is then dropped and replaced by the new one.

You can use these tools to drop columns, change column types, rename columns, add and remove `NOT NULL` and defaults, remove foreign key constraints and more. See the [transforming tables (CLI)](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-transform-table) and [transforming tables (Python library)](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-transform) documentation for full details of how to use them.

### Extract

Sometimes a database table - especially one imported from a CSV file - will contain duplicate data. A `Trees` table may include a `Species` column with only a few dozen unique values, when the table itself contains thousands of rows.

The `table.extract()` method and `sqlite-utils extract` commands can extract a column - or multiple columns - out into a separate lookup table, and set up a foreign key relationship from the original table.

The Python library [extract() documentation](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-extract) describes how extraction works in detail, and [Extracting columns into a separate table](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-extract) in the CLI documentation includes a detailed example.

### Other changes

-   The `@db.register_function` decorator can be used to quickly register Python functions as custom SQL functions, see [Registering custom SQL functions](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-register-function). ([#162](https://github.com/simonw/sqlite-utils/issues/162))
-   The `table.rows_where()` method now accepts an optional `select=` argument for specifying which columns should be selected, see [Listing rows](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-rows).",2020-09-23T00:37:01Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.14,2021-08-02,"This release introduces the new [sqlite-utils convert command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-convert) ([#251](https://github.com/simonw/sqlite-utils/issues/251)) and corresponding [table.convert(...)](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-convert) Python method ([#302](https://github.com/simonw/sqlite-utils/issues/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](https://docs.python.org/3/library/textwrap.html) 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](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-convert) and the [table.convert(...)](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-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](https://github.com/simonw/sqlite-utils/issues/305))
-   New `--silent` option for the [sqlite-utils insert-files command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-files) to hide the terminal progress bar, consistent with the `--silent` option for `sqlite-utils convert`. ([#301](https://github.com/simonw/sqlite-utils/issues/301))",2021-08-02T21:34:43Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.10,2021-06-19,"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](https://github.com/dogsheep) organization on GitHub using [this JSON API](https://api.github.com/users/dogsheep/repos), 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](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-memory). ([#272](https://github.com/simonw/sqlite-utils/issues/272))

### sqlite-utils insert --detect-types

The [sqlite-utils insert](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-inserting-data) 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](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-csv-tsv) for details. ([#282](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/284))
-   New `table.use_rowid` introspection property, see [.use_rowid](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-introspection-use-rowid). ([#285](https://github.com/simonw/sqlite-utils/issues/285))
-   The new `sqlite-utils dump file.db` command outputs a SQL dump that can be used to recreate a database. ([#274](https://github.com/simonw/sqlite-utils/issues/274))
-   `-h` now works as a shortcut for `--help`, thanks Loren McIntyre. ([#276](https://github.com/simonw/sqlite-utils/issues/276))
-   Now using [pytest-cov](https://pytest-cov.readthedocs.io/) and [Codecov](https://about.codecov.io/) to track test coverage - currently at 96%. ([#275](https://github.com/simonw/sqlite-utils/issues/275))
-   SQL errors that occur when using `sqlite-utils query` are now displayed as CLI errors.",2021-06-19T16:13:11Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.23,2022-02-04,"This release introduces four new utility methods for working with [SpatiaLite](https://www.gaia-gis.it/fossil/libspatialite/index). Thanks, Chris Amico. ([#330](https://github.com/simonw/sqlite-utils/pull/385))

-   `sqlite_utils.utils.find_spatialite()` [finds the location of the SpatiaLite module](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-gis-find-spatialite) on disk.
-   `db.init_spatialite()` [initializes SpatiaLite](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-gis-init-spatialite) for the given database.
-   `table.add_geometry_column(...)` [adds a geometry column](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-gis-add-geometry-column) to an existing table.
-   `table.create_spatial_index(...)` [creates a spatial index](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-gis-create-spatial-index) for a column.
-   `sqlite-utils batch` now accepts a `--batch-size` option. ([#392](https://github.com/simonw/sqlite-utils/issues/392))",2022-02-04T06:44:19Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.2,2021-01-03,"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](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-cached-table-counts), and can be enabled using Python API methods or the new `enable-counts` CLI command. ([#212](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/213))
- New `sqlite-utils enable-counts my.db` command for enabling counts on all or specific tables, see [Enabling cached counts](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-enable-counts). ([#214](https://github.com/simonw/sqlite-utils/issues/214))
- New `sqlite-utils triggers` command for listing the triggers defined for a database or specific tables, see [Listing triggers](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-triggers). ([#218](https://github.com/simonw/sqlite-utils/issues/218))
- New `db.use_counts_table` property which, if `True`, causes `table.count` to read from the `_counts` table. ([#215](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/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](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-quote). ([#217](https://github.com/simonw/sqlite-utils/issues/217))
- New `table.triggers_dict` and `db.triggers_dict` introspection properties. ([#211](https://github.com/simonw/sqlite-utils/issues/211), [#216](https://github.com/simonw/sqlite-utils/issues/216))
- `sqlite-utils insert` now shows a more useful error message for invalid JSON. ([#206](https://github.com/simonw/sqlite-utils/issues/206))",2021-01-03T21:17:37Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.0,2020-11-08,"This release introduces a new `sqlite-utils search` command for searching tables, see [Executing searches](https://sqlite-utils.readthedocs.io/en/latest/cli.html#cli-search). ([#192](https://github.com/simonw/sqlite-utils/issues/192))

The `table.search()` method has been redesigned, see [Searching with table.search()](https://sqlite-utils.readthedocs.io/en/latest/python-api.html#python-api-fts-search). ([#197](https://github.com/simonw/sqlite-utils/issues/197))

The release includes minor backwards-incompatible changes, hence the version bump to 3.0. Those changes, which should not affect most users, are:

-   The `-c` shortcut option for outputting CSV is no longer available. The full `--csv` option is required instead.
-   The `-f` shortcut for `--fmt` has also been removed - use `--fmt`.
-   The `table.search()` method now defaults to sorting by relevance, not sorting by `rowid`. ([#198](https://github.com/simonw/sqlite-utils/issues/198))
-   The `table.search()` method now returns a generator over a list of Python dictionaries. It previously returned a list of tuples.

Also in this release:

-   The `query`, `tables`, `rows` and `search` CLI commands now accept a new `--tsv` option which outputs the results in TSV. ([#193](https://github.com/simonw/sqlite-utils/issues/193))
-   A new `table.virtual_table_using` property reveals if a table is a virtual table, and returns the upper case type of virtual table (e.g. `FTS4` or `FTS5`) if it is. It returns `None` if the table is not a virtual table. ([#196](https://github.com/simonw/sqlite-utils/issues/196))
-   The new `table.search_sql()` method returns the SQL for searching a table, see [Building SQL queries with table.search_sql()](https://sqlite-utils.readthedocs.io/en/latest/python-api.html#python-api-fts-search-sql).
-   `sqlite-utils rows` now accepts multiple optional `-c` parameters specifying the columns to return. ([#200](https://github.com/simonw/sqlite-utils/issues/200))

Changes since the 3.0a0 alpha release:

-   The `sqlite-utils search` command now defaults to returning every result, unless you add a `--limit 20` option.
-   The `sqlite-utils search -c` and `table.search(columns=[])` options are now fully respected. ([#201](https://github.com/simonw/sqlite-utils/issues/201))",2020-11-08T17:24:27Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.0a0,2020-11-07,"This release introduces a new `sqlite-utils search` command for searching tables, see [Executing searches](https://sqlite-utils.readthedocs.io/en/latest/cli.html#cli-search). ([#192](https://github.com/simonw/sqlite-utils/issues/192))

The `table.search()` method has been redesigned, see [Searching with table.search()](https://sqlite-utils.readthedocs.io/en/latest/python-api.html#python-api-fts-search). ([#197](https://github.com/simonw/sqlite-utils/issues/197))

The release includes minor backwards-incompatible changes, hence the version bump to 3.0. Those changes, which should not affect most users, are:

-   The `-c` shortcut option for outputting CSV is no longer available. The full `--csv` option is required instead.
-   The `-f` shortcut for `--fmt` has also been removed - use `--fmt`.
-   The `table.search()` method now defaults to sorting by relevance, not sorting by `rowid`. ([#198](https://github.com/simonw/sqlite-utils/issues/198))
-   The `table.search()` method now returns a generator over a list of Python dictionaries. It previously returned a list of tuples.

Also in this release:

-   The `query`, `tables`, `rows` and `search` CLI commands now accept a new `--tsv` option which outputs the results in TSV. ([#193](https://github.com/simonw/sqlite-utils/issues/193))
-   A new `table.virtual_table_using` property reveals if a table is a virtual table, and returns the upper case type of virtual table (e.g. `FTS4` or `FTS5`) if it is. It returns `None` if the table is not a virtual table. ([#196](https://github.com/simonw/sqlite-utils/issues/196))
-   The new `table.search_sql()` method returns the SQL for searching a table, see [Building SQL queries with table.search_sql()](https://sqlite-utils.readthedocs.io/en/latest/python-api.html#python-api-fts-search-sql).
-   `sqlite-utils rows` now accepts multiple optional `-c` parameters specifying the columns to return. ([#200](https://github.com/simonw/sqlite-utils/issues/200))",2020-11-07T01:24:43Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.34,2023-07-22,"This release introduces a new [plugin system](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins). ([#567](https://github.com/simonw/sqlite-utils/issues/567))

-   Documentation describing [how to build a plugin](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-building).
-   Plugin hook: [register_commands(cli)](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-hooks-register-commands), for plugins to add extra commands to `sqlite-utils`. ([#569](https://github.com/simonw/sqlite-utils/issues/569))
-   Plugin hook: [prepare_connection(conn)](https://sqlite-utils.datasette.io/en/stable/plugins.html#plugins-hooks-prepare-connection). Plugins can use this to help prepare the SQLite connection to do things like registering custom SQL functions. Thanks, [Alex Garcia](https://github.com/asg017). ([#574](https://github.com/simonw/sqlite-utils/issues/574))
-   `sqlite_utils.Database(..., execute_plugins=False)` option for disabling plugin execution. ([#575](https://github.com/simonw/sqlite-utils/issues/575))
- `sqlite-utils install -e path-to-directory` option for installing editable code. This option is useful during the development of a plugin. ([#570](https://github.com/simonw/sqlite-utils/issues/570))
- `table.create(...)` method now accepts `replace=True` to drop and replace an existing table with the same name, or `ignore=True` to silently do nothing if a table already exists with the same name. ([#568](https://github.com/simonw/sqlite-utils/issues/568))
- `sqlite-utils insert ... --stop-after 10` option for stopping the insert after a specified number of records. Works for the `upsert` command as well. ([#561](https://github.com/simonw/sqlite-utils/issues/561))
- The `--csv` and `--tsv` modes for `insert` now accept a `--empty-null` option, which cases empty strings in the CSV file to be stored as `null` in the database. ([#563](https://github.com/simonw/sqlite-utils/issues/563))
- New `db.rename_table(table_name, new_name)` method for renaming tables. ([#565](https://github.com/simonw/sqlite-utils/issues/565))
- `sqlite-utils rename-table my.db table_name new_name` command for renaming tables. ([#565](https://github.com/simonw/sqlite-utils/issues/565))
- The `table.transform(...)` method now takes an optional `keep_table=new_table_name` parameter, which will cause the original table to be renamed to `new_table_name` rather than being dropped at the end of the transformation. ([#571](https://github.com/simonw/sqlite-utils/issues/571))
- Documentation now notes that calling `table.transform()` without any arguments will reformat the SQL schema stored by SQLite to be more aesthetically pleasing. ([#564](https://github.com/simonw/sqlite-utils/issues/564))",2023-07-22T23:30:49Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.18,2018-04-14,"This release introduces [support for units](http://datasette.readthedocs.io/en/latest/metadata.html#specifying-units-for-a-column), contributed by Russ Garrett ([\#203](https://github.com/simonw/datasette/issues/203)). You can now optionally specify the units for specific columns using `metadata.json`. Once specified, units will be displayed in the HTML view of your table. They also become available for use in filters - if a column is configured with a unit of distance, you can request all rows where that column is less than 50 meters or more than 20 feet [for example](https://wtr-api.herokuapp.com/wtr-663ea99/license_frequency?frequency__gt=50GHz&height__lt=50ft).

  - Link foreign keys which don't have labels. \[Russ Garrett\]
    
    This renders unlabeled FKs as simple links.
    
    Also includes bonus fixes for two minor issues:
    
      - In foreign key link hrefs the primary key was escaped using HTML escaping rather than URL escaping. This broke some non-integer PKs.
      - Print tracebacks to console when handling 500 errors.

  - Fix SQLite error when loading rows with no incoming FKs. \[Russ Garrett\]
    
    This fixes `ERROR: conn=<sqlite3.Connection object at 0x10bbb9f10>, sql = 'select ', params = {'id': '1'}` caused by an invalid query when loading incoming FKs.
    
    The error was ignored due to async but it still got printed to the console.

  - Allow custom units to be registered with Pint. \[Russ Garrett\]

  - Support units in filters. \[Russ Garrett\]

  - Tidy up units support. \[Russ Garrett\]
    
      - Add units to exported JSON
      - Units key in metadata skeleton
      - Docs

  - Initial units support. \[Russ Garrett\]
    
    Add support for specifying units for a column in `metadata.json` and rendering them on display using [pint](https://pint.readthedocs.io/en/latest/)",2018-04-14T15:45:11Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
207052882,https://github.com/dogsheep/github-to-sqlite,https://github.com/dogsheep/github-to-sqlite/releases/tag/2.0,2020-04-22,"This release includes some backwards-incompatible schema changes:

* The `milestone` and `assignee` columns on the `issues` table are now integers that are foreign keys to the `milestones` and `users` tables - previously they could be `text` columns instead. #30
* `milestones` now has an integer foreign key in the `creator` column, and a new `repo` column that is an integer foreign key to the `repos` table. #29
* The `repo` column in the `issues` table is now an integer foreign key to `repos`. Previously it was a string of the format `dogsheep/github-to-sqlite`. #31",2020-04-22T01:24:37Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""github-api"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.52,2020-11-28,"This release includes a number of changes relating to an internal rebranding effort: Datasette's **configuration** mechanism (things like `datasette --config default_page_size:10`) has been renamed to **settings**.

-   New `--setting default_page_size 10` option as a replacement for `--config default_page_size:10` (note the lack of a colon). The `--config` option is deprecated but will continue working until Datasette 1.0. ([#992](https://github.com/simonw/datasette/issues/992))
-   The `/-/config` introspection page is now `/-/settings`, and the previous page redirects to the new one. ([#1103](https://github.com/simonw/datasette/issues/1103))
-   The `config.json` file in [Configuration directory mode](https://docs.datasette.io/en/stable/settings.html#config-dir) is now called `settings.json`. ([#1104](https://github.com/simonw/datasette/issues/1104))
-   The undocumented `datasette.config()` internal method has been replaced by a documented [.setting(key)](https://docs.datasette.io/en/stable/internals.html#datasette-setting) method. ([#1107](https://github.com/simonw/datasette/issues/1107))

Also in this release:

-   New plugin hook: [database_actions(datasette, actor, database)](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hook-database-actions), which adds menu items to a new cog menu shown at the top of the database page. ([#1077](https://github.com/simonw/datasette/issues/1077))
-   `datasette publish cloudrun` has a new `--apt-get-install` option that can be used to install additional Ubuntu packages as part of the deployment. This is useful for deploying the new [datasette-ripgrep plugin](https://github.com/simonw/datasette-ripgrep). ([#1110](https://github.com/simonw/datasette/issues/1110))
-   Swept the documentation to remove words that minimize involved difficulty. ([#1089](https://github.com/simonw/datasette/issues/1089))

And some bug fixes:

-   Foreign keys linking to rows with blank label columns now display as a hyphen, allowing those links to be clicked. ([#1086](https://github.com/simonw/datasette/issues/1086))
-   Fixed bug where row pages could sometimes 500 if the underlying queries exceeded a time limit. ([#1088](https://github.com/simonw/datasette/issues/1088))
-   Fixed a bug where the table action menu could appear partially obscured by the edge of the page. ([#1084](https://github.com/simonw/datasette/issues/1084))",2020-11-28T23:57:12Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.17,2020-09-07,"This release handles a bug where replacing rows in FTS tables could result in growing numbers of unneccessary rows in the associated `*_fts_docsize` table. ([#149](https://github.com/simonw/sqlite-utils/issues/149))

-   `PRAGMA recursive_triggers=on` by default for all connections. You can turn it off with `Database(recursive_triggers=False)`. ([#152](https://github.com/simonw/sqlite-utils/issues/152))
-   `table.optimize()` method now deletes unnecessary rows from the `*_fts_docsize` table. ([#153](https://github.com/simonw/sqlite-utils/issues/153))
-   New tracer method for tracking underlying SQL queries, see [Tracing queries](http://127.0.0.1:8000/python-api.html#python-api-tracing). ([#150](https://github.com/simonw/sqlite-utils/issues/150))
-   Neater indentation for schema SQL. ([#148](https://github.com/simonw/sqlite-utils/issues/148))
-   Documentation for `sqlite_utils.AlterError` exception thrown by in `add_foreign_keys()`.",2020-09-07T22:08:33Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.23,2018-06-18,"This release features CSV export, improved options for foreign key expansions, new configuration settings and improved support for SpatiaLite.

See full release notes here: http://datasette.readthedocs.io/en/latest/changelog.html#v0-23",2018-06-18T15:28:37Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.0,2019-12-30,"This release changes the behaviour of `upsert`. It’s a breaking change, hence 2.0.

The `upsert` command-line utility and the `.upsert()` and `.upsert_all()` Python API methods have had their behaviour altered. They used to completely replace the affected records: now, they update the specified values on existing records but leave other columns unaffected.

See [Upserting data using the Python API](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-upsert) and [Upserting data using the CLI](https://sqlite-utils.readthedocs.io/en/stable/cli.html#upserting-data) for full details.

If you want the old behaviour - where records were completely replaced - you can use `$ sqlite-utils insert ... --replace` on the command-line and `.insert(..., replace=True)` and `.insert_all(..., replace=True)` in the Python API. See [Insert-replacing data using the Python API](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-insert-replace) and [Insert-replacing data using the CLI](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-insert-replace) for more.

For full background on this change, see issue #66.",2019-12-30T06:26:09Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.6,2021-02-19,"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](https://docs.datasette.io/en/stable/changelog.html#v0-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](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-attach). ([#113](https://github.com/simonw/sqlite-utils/issues/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](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-attach). ([#236](https://github.com/simonw/sqlite-utils/issues/236))",2021-02-19T05:19:00Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.19,2018-04-17,"This is the first preview of the new Datasette plugins mechanism. Only two plugin hooks are available so far - for custom SQL functions and custom template filters. There's plenty more to come - read [the documentation](https://datasette.readthedocs.io/en/latest/plugins.html) and get involved in [the tracking ticket](https://github.com/simonw/datasette/issues/14) if you have feedback on the direction so far.

- Fix for `_sort_desc=sortable_with_nulls` test, refs [#216](https://github.com/simonw/datasette/issues/216)

- Fixed [#216](https://github.com/simonw/datasette/issues/216) - paginate correctly when sorting by nullable column

- Initial documentation for plugins, closes [#213](https://github.com/simonw/datasette/issues/213)

  https://datasette.readthedocs.io/en/latest/plugins.html

- New `--plugins-dir=plugins/` option ([#212](https://github.com/simonw/datasette/issues/212))

  New option causing Datasette to load and evaluate all of the Python files in the specified directory and register any plugins that are defined in those files.

  This new option is available for the following commands:

      datasette serve mydb.db --plugins-dir=plugins/
      datasette publish now/heroku mydb.db --plugins-dir=plugins/
      datasette package mydb.db --plugins-dir=plugins/

- Start of the plugin system, based on pluggy ([#210](https://github.com/simonw/datasette/issues/14))

  Uses https://pluggy.readthedocs.io/ originally created for the py.test project

  We're starting with two plugin hooks:

  `prepare_connection(conn)`

  This is called when a new SQLite connection is created. It can be used to register custom SQL functions.

  `prepare_jinja2_environment(env)`

  This is called with the Jinja2 environment. It can be used to register custom template tags and filters.

  An example plugin which uses these two hooks can be found at https://github.com/simonw/datasette-plugin-demos or installed using `pip install datasette-plugin-demos`

  Refs [#14](https://github.com/simonw/datasette/issues/14)

- Return HTTP 405 on InvalidUsage rather than 500. [Russ Garrett]

  This also stops it filling up the logs. This happens for HEAD requests at the moment - which perhaps should be handled better, but that's a different issue.",2018-04-17T02:21:51Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/1.0a0,2022-11-29,"This first alpha release of Datasette 1.0 introduces a brand new collection of APIs for writing to the database ([#1850](https://github.com/simonw/datasette/issues/1850)), as well as a new API token mechanism baked into Datasette core. Previously, API tokens have only been supported by installing additional plugins.

This is very much a preview: expect many more backwards incompatible API changes prior to the full 1.0 release.

Feedback enthusiastically welcomed, either through [issue comments](https://github.com/simonw/datasette/issues/1850) or via the [Datasette Discord](https://datasette.io/discord) community.

### Signed API tokens

- New `/-/create-token` page allowing authenticated users to create signed API tokens that can act on their behalf, see [API Tokens](https://docs.datasette.io/en/1.0-dev/authentication.html#createtokenview). ([#1852](https://github.com/simonw/datasette/issues/1852))
- New `datasette create-token` command for creating tokens from the command line: [datasette create-token](https://docs.datasette.io/en/1.0-dev/authentication.html#authentication-cli-create-token).
- New [allow_signed_tokens](https://docs.datasette.io/en/1.0-dev/settings.html#setting-allow-signed-tokens) setting which can be used to turn off signed token support. ([#1856](https://github.com/simonw/datasette/issues/1856))
- New [max_signed_tokens_ttl](https://docs.datasette.io/en/1.0-dev/settings.html#setting-max-signed-tokens-ttl) setting for restricting the maximum allowed duration of a signed token. ([#1858](https://github.com/simonw/datasette/issues/1858))

### Write API

- New API explorer at `/-/api` for trying out the API. ([#1871](https://github.com/simonw/datasette/issues/1871))
- `/db/-/create` API for [Creating a table](https://docs.datasette.io/en/1.0-dev/json_api.html#tablecreateview). ([#1882](https://github.com/simonw/datasette/issues/1882))
- `/db/table/-/insert` API for [Inserting rows](https://docs.datasette.io/en/1.0-dev/json_api.html#tableinsertview). ([#1851](https://github.com/simonw/datasette/issues/1851))
- `/db/table/-/drop` API for [Dropping tables](https://docs.datasette.io/en/1.0-dev/json_api.html#tabledropview). ([#1874](https://github.com/simonw/datasette/issues/1874))
- `/db/table/pk/-/update` API for [Updating a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowupdateview). ([#1863](https://github.com/simonw/datasette/issues/1863))
- `/db/table/pk/-/delete` API for [Deleting a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowdeleteview). ([#1864](https://github.com/simonw/datasette/issues/1864))",2022-11-29T19:58:55Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/1.0a3,2023-08-09,"This alpha release previews the updated design for Datasette's default JSON API. ([#782](https://github.com/simonw/datasette/issues/782))

The new [default JSON representation](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-default) for both table pages (`/dbname/table.json`) and arbitrary SQL queries (`/dbname.json?sql=...`) is now shaped like this:
```json
{
  ""ok"": true,
  ""rows"": [
    {
      ""id"": 3,
      ""name"": ""Detroit""
    },
    {
      ""id"": 2,
      ""name"": ""Los Angeles""
    },
    {
      ""id"": 4,
      ""name"": ""Memnonia""
    },
    {
      ""id"": 1,
      ""name"": ""San Francisco""
    }
  ],
  ""truncated"": false
}
```
Tables will include an additional `""next""` key for pagination, which can be passed to `?_next=` to fetch the next page of results.

The various `?_shape=` options continue to work as before - see [Different shapes](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-shapes) for details.

A new `?_extra=` mechanism is available for tables, but has not yet been stabilized or documented. Details on that are available in [#262](https://github.com/simonw/datasette/issues/262).

### Smaller changes

- Datasette documentation now shows YAML examples for [Metadata](https://docs.datasette.io/en/1.0a3/metadata.html#metadata) by default, with a tab interface for switching to JSON. ([#1153](https://github.com/simonw/datasette/issues/1153))
- [register_output_renderer(datasette)](https://docs.datasette.io/en/1.0a3/plugin_hooks.html#plugin-register-output-renderer) plugins now have access to `error` and `truncated` arguments, allowing them to display error messages and take into account truncated results. ([#2130](https://github.com/simonw/datasette/issues/2130))
- `render_cell()` plugin hook now also supports an optional `request` argument. ([#2007](https://github.com/simonw/datasette/issues/2007))
- New `Justfile` to support development workflows for Datasette using [Just](https://github.com/casey/just).
- `datasette.render_template()` can now accepts a `datasette.views.Context` subclass as an alternative to a dictionary. ([#2127](https://github.com/simonw/datasette/issues/2127))
- `datasette install -e path` option for editable installations, useful while developing plugins. ([#2106](https://github.com/simonw/datasette/issues/2106))
- When started with the `--cors` option Datasette now serves an `Access-Control-Max-Age: 3600` header, ensuring CORS OPTIONS requests are repeated no more than once an hour. ([#2079](https://github.com/simonw/datasette/issues/2079))
- Fixed a bug where the `_internal` database could display `None` instead of `null` for in-memory databases. ([#1970](https://github.com/simonw/datasette/issues/1970))",2023-08-09T19:17:26Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/1.0a4,2023-08-22,"This alpha fixes a security issue with the `/-/api` API explorer. On authenticated Datasette instances (instances protected using plugins such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords)) the API explorer interface could reveal the names of databases and tables within the protected instance. The data stored in those tables was not revealed.

For more information and workarounds, read [the security advisory](https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq). The issue has been present in every previous alpha version of Datasette 1.0: versions 1.0a0, 1.0a1, 1.0a2 and 1.0a3.

Also in this alpha:

- The new `datasette plugins --requirements` option outputs a list of currently installed plugins in Python `requirements.txt` format, useful for duplicating that installation elsewhere. ([#2133](https://github.com/simonw/datasette/issues/2133))
- [Writable canned queries](https://docs.datasette.io/en/latest/sql_queries.html#canned-queries-writable) can now define a `on_success_message_sql` field in their configuration, containing a SQL query that should be executed upon successful completion of the write operation in order to generate a message to be shown to the user. ([#2138](https://github.com/simonw/datasette/issues/2138))
- The automatically generated border color for a database is now shown in more places around the application. ([#2119](https://github.com/simonw/datasette/issues/2119))
- Every instance of example shell script code in the documentation should now include a working copy button, free from additional syntax. ([#2140](https://github.com/simonw/datasette/issues/2140))",2023-08-22T17:13:26Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.54,2021-01-25,"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](https://simonwillison.net/2021/Jan/25/datasette/).

### The _internal database

As part of ongoing work to help Datasette handle much larger numbers of connected databases and tables (see [Datasette Library](https://github.com/simonw/datasette/issues/417)) Datasette now maintains an in-memory SQLite database with details of all of the attached databases, tables, columns, indexes and foreign keys. ([#1150](https://github.com/simonw/datasette/issues/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](https://latest.datasette.io/login-as-root) to the `latest.datasette.io` demo instance and then navigating to [latest.datasette.io/_internal](https://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](https://github.com/simonw/datasette/issues/1151))

The new `memory_name=` parameter to the [Database class](https://docs.datasette.io/en/stable/internals.html#internals-database) can be used to create named, shared in-memory databases.

### JavaScript modules

[JavaScript modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/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](https://docs.datasette.io/en/stable/custom_templates.html#customization-css-and-javascript) can now be used with modules, and module support is also available for the [extra_body_script()](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hook-extra-body-script) plugin hook. ([#1186](https://github.com/simonw/datasette/issues/1186), [#1187](https://github.com/simonw/datasette/issues/1187))

[datasette-leaflet-freedraw](https://datasette.io/plugins/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](https://simonwillison.net/2021/Jan/24/drawing-shapes-spatialite/) for more on this plugin.

### Code formatting with Black and Prettier

Datasette adopted [Black](https://github.com/psf/black) for opinionated Python code formatting in June 2019. Datasette now also embraces [Prettier](https://prettier.io/) 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](https://docs.datasette.io/en/stable/contributing.html#contributing-formatting) in the contributors documentation. ([#1167](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/509))
-   `datasette publish cloudrun` now sets `force_https_urls` for every deployment, fixing some incorrect `http://` links. ([#1178](https://github.com/simonw/datasette/issues/1178))
-   Fixed a bug in the example nginx configuration in [Running Datasette behind a proxy](https://docs.datasette.io/en/stable/deploying.html#deploying-proxy). ([#1091](https://github.com/simonw/datasette/issues/1091))
-   The [Datasette Ecosystem](https://docs.datasette.io/en/stable/ecosystem.html#ecosystem) documentation page has been reduced in size in favour of the `datasette.io` [tools](https://datasette.io/tools) and [plugins](https://datasette.io/plugins) directories. ([#1182](https://github.com/simonw/datasette/issues/1182))
-   The request object now provides a `request.full_path` property, which returns the path including any query string. ([#1184](https://github.com/simonw/datasette/issues/1184))
-   Better error message for disallowed `PRAGMA` clauses in SQL queries. ([#1185](https://github.com/simonw/datasette/issues/1185))
-   `datasette publish heroku` now deploys using `python-3.8.7`.
-   New plugin testing documentation on [Testing outbound HTTP calls with pytest-httpx](https://docs.datasette.io/en/stable/testing_plugins.html#testing-plugins-pytest-httpx). ([#1198](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1194))
-   Fixed a bug loading a database file called `test-database (1).sqlite`. ([#1181](https://github.com/simonw/datasette/issues/1181))",2021-01-25T17:36:30Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/1.0a2,2022-12-15,"The third Datasette 1.0 alpha release adds upsert support to the JSON API, plus the ability to specify finely grained permissions when creating an API token.

See [Datasette 1.0a2: Upserts and finely grained permissions](https://simonwillison.net/2022/Dec/15/datasette-1a2/) for an extended, annotated version of these release notes.

- New `/db/table/-/upsert` API, [documented here](https://docs.datasette.io/en/latest/json_api.html#tableupsertview). upsert is an update-or-insert: existing rows will have specified keys updated, but if no row matches the incoming primary key a brand new row will be inserted instead. ([#1878](https://github.com/simonw/datasette/issues/1878))
- New [register_permissions(datasette)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-register-permissions) plugin hook. Plugins can now register named permissions, which will then be listed in various interfaces that show available permissions. ([#1940](https://github.com/simonw/datasette/issues/1940))
- The `/db/-/create` API for [creating a table](https://docs.datasette.io/en/latest/json_api.html#tablecreateview) now accepts `""ignore"": true` and `""replace"": true` options when called with the `""rows""` property that creates a new table based on an example set of rows. This means the API can be called multiple times with different rows, setting rules for what should happen if a primary key collides with an existing row. ([#1927](https://github.com/simonw/datasette/issues/1927))
- Arbitrary permissions can now be configured at the instance, database and resource (table, SQL view or canned query) level in Datasette's [Metadata](https://docs.datasette.io/en/latest/metadata.html#metadata) JSON and YAML files. The new `""permissions""` key can be used to specify which actors should have which permissions. See [Other permissions in metadata](https://docs.datasette.io/en/latest/authentication.html#authentication-permissions-other) for details. ([#1636](https://github.com/simonw/datasette/issues/1636))
- The `/-/create-token` page can now be used to create API tokens which are restricted to just a subset of actions, including against specific databases or resources. See [API Tokens](https://docs.datasette.io/en/latest/authentication.html#createtokenview) for details. ([#1947](https://github.com/simonw/datasette/issues/1947))
- Likewise, the [datasette create-token](https://docs.datasette.io/en/latest/internals.html#create-token-actor-id-expires-after-none-restrict-all-none-restrict-database-none-restrict-resource-none) CLI command can now create tokens with [a subset of permissions](https://docs.datasette.io/en/latest/authentication.html#authentication-cli-create-token-restrict). ([#1855](https://github.com/simonw/datasette/issues/1855))
- New datasette.create_token() API method <datasette_create_token>` for programmatically creating signed API tokens. ([#1951](https://github.com/simonw/datasette/issues/1951))
- `/db/-/create` API now requires actor to have `insert-row` permission in order to use the `""row""` or `""rows""` properties. ([#1937](https://github.com/simonw/datasette/issues/1937))",2022-12-15T02:03:59Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.14,2017-12-10,"The theme of this release is customization: Datasette now allows every aspect of its presentation [to be customized](http://datasette.readthedocs.io/en/latest/custom_templates.html) either using additional CSS or by providing entirely new templates.

Datasette's [metadata.json format](http://datasette.readthedocs.io/en/latest/metadata.html) has also been expanded, to allow per-database and per-table metadata. A new `datasette skeleton` command can be used to generate a skeleton JSON file ready to be filled in with per-database and per-table details.

The `metadata.json` file can also be used to define [canned queries](http://datasette.readthedocs.io/en/latest/sql_queries.html#canned-queries), as a more powerful alternative to SQL views.

  - `extra_css_urls`/`extra_js_urls` in metadata
    
    A mechanism in the `metadata.json` format for adding custom CSS and JS urls.
    
    Create a `metadata.json` file that looks like this:
    
        {
            ""extra_css_urls"": [
                ""https://simonwillison.net/static/css/all.bf8cd891642c.css""
            ],
            ""extra_js_urls"": [
                ""https://code.jquery.com/jquery-3.2.1.slim.min.js""
            ]
        }
    
    Then start datasette like this:
    
        datasette mydb.db --metadata=metadata.json
    
    The CSS and JavaScript files will be linked in the `<head>` of every page.
    
    You can also specify a SRI (subresource integrity hash) for these assets:
    
        {
            ""extra_css_urls"": [
                {
                    ""url"": ""https://simonwillison.net/static/css/all.bf8cd891642c.css"",
                    ""sri"": ""sha384-9qIZekWUyjCyDIf2YK1FRoKiPJq4PHt6tp/ulnuuyRBvazd0hG7pWbE99zvwSznI""
                }
            ],
            ""extra_js_urls"": [
                {
                    ""url"": ""https://code.jquery.com/jquery-3.2.1.slim.min.js"",
                    ""sri"": ""sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=""
                }
            ]
        }
    
    Modern browsers will only execute the stylesheet or JavaScript if the SRI hash matches the content served. You can generate hashes using <https://www.srihash.org/>

  - Auto-link column values that look like URLs ([\#153](https://github.com/simonw/datasette/issues/153))

  - CSS styling hooks as classes on the body ([\#153](https://github.com/simonw/datasette/issues/153))
    
    Every template now gets CSS classes in the body designed to support custom styling.
    
    The index template (the top level page at `/`) gets this:
    
        <body class=""index"">
    
    The database template (`/dbname/`) gets this:
    
        <body class=""db db-dbname"">
    
    The table template (`/dbname/tablename`) gets:
    
        <body class=""table db-dbname table-tablename"">
    
    The row template (`/dbname/tablename/rowid`) gets:
    
        <body class=""row db-dbname table-tablename"">
    
    The `db-x` and `table-x` classes use the database or table names themselves IF they are valid CSS identifiers. If they aren't, we strip any invalid characters out and append a 6 character md5 digest of the original name, in order to ensure that multiple tables which resolve to the same stripped character version still have different CSS classes.
    
    Some examples (extracted from the unit tests):
    
        ""simple"" => ""simple""
        ""MixedCase"" => ""MixedCase""
        ""-no-leading-hyphens"" => ""no-leading-hyphens-65bea6""
        ""_no-leading-underscores"" => ""no-leading-underscores-b921bc""
        ""no spaces"" => ""no-spaces-7088d7""
        ""-"" => ""336d5e""
        ""no $ characters"" => ""no--characters-59e024""

  - `datasette --template-dir=mytemplates/` argument
    
    You can now pass an additional argument specifying a directory to look for custom templates in.
    
    Datasette will fall back on the default templates if a template is not found in that directory.

  - Ability to over-ride templates for individual tables/databases.
    
    It is now possible to over-ride templates on a per-database / per-row or per-table basis.
    
    When you access e.g. `/mydatabase/mytable` Datasette will look for the following:
    
        - table-mydatabase-mytable.html
        - table.html
    
    If you provided a `--template-dir` argument to datasette serve it will look in that directory first.
    
    The lookup rules are as follows:
    
        Index page (/):
            index.html
        
        Database page (/mydatabase):
            database-mydatabase.html
            database.html
        
        Table page (/mydatabase/mytable):
            table-mydatabase-mytable.html
            table.html
        
        Row page (/mydatabase/mytable/id):
            row-mydatabase-mytable.html
            row.html
    
    If a table name has spaces or other unexpected characters in it, the template filename will follow the same rules as our custom `<body>` CSS classes - for example, a table called ""Food Trucks"" will attempt to load the following templates:
    
        table-mydatabase-Food-Trucks-399138.html
        table.html
    
    It is possible to extend the default templates using Jinja template inheritance. If you want to customize EVERY row template with some additional content you can do so by creating a row.html template like this:
    
        {% extends ""default:row.html"" %}
        
        {% block content %}
        <h1>EXTRA HTML AT THE TOP OF THE CONTENT BLOCK</h1>
        <p>This line renders the original block:</p>
        {{ super() }}
        {% endblock %}

  - `--static` option for datasette serve ([\#160](https://github.com/simonw/datasette/issues/160))
    
    You can now tell Datasette to serve static files from a specific location at a specific mountpoint.
    
    For example:
    
        datasette serve mydb.db --static extra-css:/tmp/static/css
    
    Now if you visit this URL:
    
        http://localhost:8001/extra-css/blah.css
    
    The following file will be served:
    
        /tmp/static/css/blah.css

  - Canned query support.
    
    Named canned queries can now be defined in `metadata.json` like this:
    
        {
            ""databases"": {
                ""timezones"": {
                    ""queries"": {
                        ""timezone_for_point"": ""select tzid from timezones ...""
                    }
                }
            }
        }
    
    These will be shown in a new ""Queries"" section beneath ""Views"" on the database page.

  - New `datasette skeleton` command for generating `metadata.json` ([\#164](https://github.com/simonw/datasette/issues/164))

  - `metadata.json` support for per-table/per-database metadata ([\#165](https://github.com/simonw/datasette/issues/165))
    
    Also added support for descriptions and HTML descriptions.
    
    Here's an example metadata.json file illustrating custom per-database and per-table metadata:
    
        {
            ""title"": ""Overall datasette title"",
            ""description_html"": ""This is a <em>description with HTML</em>."",
            ""databases"": {
                ""db1"": {
                    ""title"": ""First database"",
                    ""description"": ""This is a string description & has no HTML"",
                    ""license_url"": ""http://example.com/"",
                ""license"": ""The example license"",
                    ""queries"": {
                      ""canned_query"": ""select * from table1 limit 3;""
                    },
                    ""tables"": {
                        ""table1"": {
                            ""title"": ""Custom title for table1"",
                            ""description"": ""Tables can have descriptions too"",
                            ""source"": ""This has a custom source"",
                            ""source_url"": ""http://example.com/""
                        }
                    }
                }
            }
        }

  - Renamed `datasette build` command to `datasette inspect` ([\#130](https://github.com/simonw/datasette/issues/130))

  - Upgrade to Sanic 0.7.0 ([\#168](https://github.com/simonw/datasette/issues/168))
    
    <https://github.com/channelcat/sanic/releases/tag/0.7.0>

  - Package and publish commands now accept `--static` and `--template-dir`
    
    Example usage:
    
        datasette package --static css:extra-css/ --static js:extra-js/ \
          sf-trees.db --template-dir templates/ --tag sf-trees --branch master
    
    This creates a local Docker image that includes copies of the templates/, extra-css/ and extra-js/ directories. You can then run it like this:
    
        docker run -p 8001:8001 sf-trees
    
    For publishing to Zeit now:
    
        datasette publish now --static css:extra-css/ --static js:extra-js/ \
          sf-trees.db --template-dir templates/ --name sf-trees --branch master

  - HTML comment showing which templates were considered for a page ([\#171](https://github.com/simonw/datasette/issues/171))
",2017-12-10T01:41:14Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.12,2020-07-27,"The theme of this release is better tools for working with binary data. The new `insert-files` command can be used to insert binary files directly into a database table, and other commands have been improved with better support for BLOB columns.

-   `sqlite-utils insert-files my.db gifs *.gif` can now insert the contents of files into a specified table. The columns in the table can be customized to include different pieces of metadata derived from the files. See [Inserting binary data from files](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-insert-files). ([#122](https://github.com/simonw/sqlite-utils/issues/122))
-   `--raw` option to `sqlite-utils query` - for outputting just a single raw column value - see [Returning raw data from a query, such as binary content](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-raw). ([#123](https://github.com/simonw/sqlite-utils/issues/123))
-   JSON output now encodes BLOB values as special base64 obects - see [Running queries and returning JSON](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-json). ([#125](https://github.com/simonw/sqlite-utils/issues/125))
-   The same format of JSON base64 objects can now be used to insert binary data - see [Inserting JSON data](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-inserting-data). ([#126](https://github.com/simonw/sqlite-utils/issues/126))
-   The `sqlite-utils query` command can now accept named parameters, e.g. `sqlite-utils :memory: ""select :num * :num2"" -p num 5 -p num2 6` - see [Running queries and returning JSON](https://sqlite-utils.readthedocs.io/en/stable/cli.html#cli-query-json). ([#124](https://github.com/simonw/sqlite-utils/issues/124))",2020-07-27T07:24:10Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.43,2020-05-28,"The main focus of this release is a major upgrade to the [register_output_renderer(datasette)](https://datasette.readthedocs.io/en/stable/plugins.html#plugin-register-output-renderer) plugin hook, which allows plugins to provide new output formats for Datasette such as [datasette-atom](https://github.com/simonw/datasette-atom) and [datasette-ics](https://github.com/simonw/datasette-ics).

-   Redesign of [register_output_renderer(datasette)](https://datasette.readthedocs.io/en/stable/plugins.html#plugin-register-output-renderer) to provide more context to the render callback and support an optional `""can_render""` callback that controls if a suggested link to the output format is provided. ([#581](https://github.com/simonw/datasette/issues/581), [#770](https://github.com/simonw/datasette/issues/770))
-   Visually distinguish float and integer columns - useful for figuring out why order-by-column might be returning unexpected results. ([#729](https://github.com/simonw/datasette/issues/729))
-   The [Request object](https://datasette.readthedocs.io/en/stable/internals.html#internals-request), which is passed to several plugin hooks, is now documented. ([#706](https://github.com/simonw/datasette/issues/706))
-   New `metadata.json` option for setting a custom default page size for specific tables and views, see [Setting a custom page size](https://datasette.readthedocs.io/en/stable/metadata.html#metadata-page-size). ([#751](https://github.com/simonw/datasette/issues/751))
-   Canned queries can now be configured with a default URL fragment hash, useful when working with plugins such as [datasette-vega](https://github.com/simonw/datasette-vega), see [Setting a default fragment](https://datasette.readthedocs.io/en/stable/sql_queries.html#canned-queries-default-fragment). ([#706](https://github.com/simonw/datasette/issues/706))
-   Fixed a bug in `datasette publish` when running on operating systems where the `/tmp` directory lives in a different volume, using a backport of the Python 3.8 `shutil.copytree()` function. ([#744](https://github.com/simonw/datasette/issues/744))
-   Every plugin hook is now covered by the unit tests, and a new unit test checks that each plugin hook has at least one corresponding test. ([#771](https://github.com/simonw/datasette/issues/771), [#773](https://github.com/simonw/datasette/issues/773))",2020-05-28T14:39:18Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.50,2020-10-09,"The key new feature in this release is the **column actions** menu on the table page ([#891](https://github.com/simonw/datasette/issues/891)). This can be used to sort a column in ascending or descending order, facet data by that column or filter the table to just rows that have a value for that column.

Plugin authors can use the new [datasette.client](https://docs.datasette.io/en/stable/internals.html#internals-datasette-client) object to make internal HTTP requests from their plugins, allowing them to make use of Datasette's JSON API. ([#943](https://github.com/simonw/datasette/issues/943))

New [Deploying Datasette](https://docs.datasette.io/en/stable/deploying.html#deploying) documentation with guides for deploying Datasette on a Linux server [using systemd](https://docs.datasette.io/en/stable/deploying.html#deploying-systemd) or to hosting providers [that support buildpacks](https://docs.datasette.io/en/stable/deploying.html#deploying-buildpacks). ([#514](https://github.com/simonw/datasette/issues/514), [#997](https://github.com/simonw/datasette/issues/997))

Other improvements in this release:

-   [Publishing to Google Cloud Run](https://docs.datasette.io/en/stable/publish.html#publish-cloud-run) documentation now covers Google Cloud SDK options. Thanks, Geoffrey Hing. ([#995](https://github.com/simonw/datasette/pull/995))
-   New `datasette -o` option which opens your browser as soon as Datasette starts up. ([#970](https://github.com/simonw/datasette/issues/970))
-   Datasette now sets `sqlite3.enable_callback_tracebacks(True)` so that errors in custom SQL functions will display tracebacks. ([#891](https://github.com/simonw/datasette/issues/891))
-   Fixed two rendering bugs with column headers in portrait mobile view. ([#978](https://github.com/simonw/datasette/issues/978), [#980](https://github.com/simonw/datasette/issues/980))
-   New `db.table_column_details(table)` introspection method for retrieving full details of the columns in a specific table, see [Database introspection](https://docs.datasette.io/en/stable/internals.html#internals-database-introspection).
-   Fixed a routing bug with custom page wildcard templates. ([#996](https://github.com/simonw/datasette/issues/996))
-   `datasette publish heroku` now deploys using Python 3.8.6.
-   New `datasette publish heroku --tar=` option. ([#969](https://github.com/simonw/datasette/issues/969))
-   `OPTIONS` requests against HTML pages no longer return a 500 error. ([#1001](https://github.com/simonw/datasette/issues/1001))
-   Datasette now supports Python 3.9.",2020-10-09T17:58:27Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.15,2018-04-09,"The biggest new feature in this release is the ability to sort by column. On the table page the column headers can now be clicked to apply sort (or descending sort), or you can specify `?_sort=column` or `?_sort_desc=column` directly in the URL.

You can try this feature out on [this fivethirtyeight data](https://fivethirtyeight.datasettes.com/fivethirtyeight/congress-age%2Fcongress-terms) about the ages of different US politicians.

  - `table_rows` =\> `table_rows_count`, `filtered_table_rows` =\> `filtered_table_rows_count`
    
    Renamed properties. Closes [\#194](https://github.com/simonw/datasette/issues/194)

  - New `sortable_columns` option in `metadata.json` to control sort options.
    
    You can now explicitly set which columns in a table can be used for sorting using the `_sort` and `_sort_desc` arguments using `metadata.json`:
    
        {
            ""databases"": {
                ""database1"": {
                    ""tables"": {
                        ""example_table"": {
                            ""sortable_columns"": [
                                ""height"",
                                ""weight""
                            ]
                        }
                    }
                }
            }
        }
    
    Refs [\#189](https://github.com/simonw/datasette/issues/189)

  - Column headers now link to sort/desc sort - refs [\#189](https://github.com/simonw/datasette/issues/189)

  - `_sort` and `_sort_desc` parameters for table views
    
    Allows for paginated sorted results based on a specified column.
    
    Refs [\#189](https://github.com/simonw/datasette/issues/189)

  - Total row count now correct even if `_next` applied

  - Use .custom\_sql() for \_group\_count implementation (refs [\#150](https://github.com/simonw/datasette/issues/150))

  - Make HTML title more readable in query template ([\#180](https://github.com/simonw/datasette/issues/180)) \[Ryan Pitts\]

  - New `?_shape=objects/object/lists` param for JSON API ([\#192](https://github.com/simonw/datasette/issues/192))
    
    New `_shape=` parameter replacing old `.jsono` extension
    
    Now instead of this:
    
        /database/table.jsono
    
    We use the `_shape` parameter like this:
    
        /database/table.json?_shape=objects
    
    Also introduced a new `_shape` called `object` which looks like this:
    
        /database/table.json?_shape=object
    
    Returning an object for the rows key:
    
        ...
        ""rows"": {
            ""pk1"": {
                ...
            },
            ""pk2"": {
                ...
            }
        }
    
    Refs [\#122](https://github.com/simonw/datasette/issues/122)

  - Utility for writing test database fixtures to a .db file
    
    `python tests/fixtures.py /tmp/hello.db`
    
    This is useful for making a SQLite database of the test fixtures for interactive exploration.

  - Compound primary key `_next=` now plays well with extra filters
    
    Closes [\#190](https://github.com/simonw/datasette/issues/190)

  - Fixed bug with keyset pagination over compound primary keys
    
    Refs [\#190](https://github.com/simonw/datasette/issues/190)

  - Database/Table views inherit `source/license/source_url/license_url` metadata
    
    If you set the `source_url/license_url/source/license` fields in your root metadata those values will now be inherited all the way down to the database and table templates.
    
    The `title/description` are NOT inherited.
    
    Also added unit tests for the HTML generated by the metadata.
    
    Refs [\#185](https://github.com/simonw/datasette/issues/185)

  - Add metadata, if it exists, to heroku temp dir ([\#178](https://github.com/simonw/datasette/issues/178)) \[Tony Hirst\]

  - Initial documentation for pagination

  - Broke up test\_app into test\_api and test\_html

  - Fixed bug with .json path regular expression
    
    I had a table called `geojson` and it caused an exception because the regex was matching `.json` and not `\.json`

  - Deploy to Heroku with Python 3.6.3",2018-04-09T15:55:29Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.22,2018-05-20,"The big new feature in this release is [facets](http://datasette.readthedocs.io/en/latest/facets.html). Datasette can now apply faceted browse to any column in any table. It will also suggest possible facets. See the [Datasette Facets](https://simonwillison.net/2018/May/20/datasette-facets/) announcement post for more details.

In addition to the work on facets:

- Added [docs for introspection endpoints](https://datasette.readthedocs.io/en/latest/introspection.html)

- New `--config` option, added `--help-config`, closes #274

  Removed the `--page_size=` argument to `datasette serve` in favour of:

      datasette serve --config default_page_size:50 mydb.db

  Added new help section:

      $ datasette --help-config
      Config options:
        default_page_size            Default page size for the table view
                                     (default=100)
        max_returned_rows            Maximum rows that can be returned from a table
                                     or custom query (default=1000)
        sql_time_limit_ms            Time limit for a SQL query in milliseconds
                                     (default=1000)
        default_facet_size           Number of values to return for requested facets
                                     (default=30)
        facet_time_limit_ms          Time limit for calculating a requested facet
                                     (default=200)
        facet_suggest_time_limit_ms  Time limit for calculating a suggested facet
                                     (default=50)
- Only apply responsive table styles to `.rows-and-column`

  Otherwise they interfere with tables in the description, e.g. on
  https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo

- Refactored views into new `views/` modules, refs #256
- [Documentation for SQLite full-text search](http://datasette.readthedocs.io/en/latest/full_text_search.html) support, closes #253
- `/-/versions` now includes SQLite `fts_versions`, closes #252",2018-05-20T23:44:19Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.0.1,2020-01-05,The `.upsert()` and `.upsert_all()` methods now raise a `sqlite_utils.db.PrimaryKeyRequired` exception if you call them without specifying the primary key column using `pk=` (#73).,2020-01-05T17:33:15Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.55,2021-02-19,"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](https://docs.datasette.io/en/stable/sql_queries.html#cross-database-queries) for details. ([#283](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1221))
-   The `/:memory:` page has been renamed (and redirected) to `/_memory` for consistency with the new `/_internal` database introduced in Datasette 0.54. ([#1205](https://github.com/simonw/datasette/issues/1205))
-   Added plugin testing documentation on [Using pdb for errors thrown inside Datasette](https://docs.datasette.io/en/stable//testing_plugins.html#testing-plugins-pdb). ([#1207](https://github.com/simonw/datasette/issues/1207))
-   The [official Datasette Docker image](https://hub.docker.com/r/datasetteproject/datasette) now uses Python 3.7.10, applying [the latest security fix](https://www.python.org/downloads/release/python-3710/) for that Python version. ([#1235](https://github.com/simonw/datasette/issues/1235))",2021-02-19T02:02:29Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.24,2018-07-24,"See full release notes here: http://datasette.readthedocs.io/en/latest/changelog.html#v0-24
",2018-07-24T16:51:29Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.27,2022-06-15,"See also [the annotated release notes](https://simonwillison.net/2022/Jun/19/weeknotes/#sqlite-utils-3-27) for this release.

-   Documentation now uses the [Furo](https://github.com/pradyunsg/furo) Sphinx theme. ([#435](https://github.com/simonw/sqlite-utils/issues/435))
-   Code examples in documentation now have a ""copy to clipboard"" button. ([#436](https://github.com/simonw/sqlite-utils/issues/436))
-   `sqlite_utils.utils.utils.rows_from_file()` is now a documented API, see [Reading rows from a file](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-rows-from-file). ([#443](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/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](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-maximize-csv-field-size-limit). ([#442](https://github.com/simonw/sqlite-utils/issues/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()](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-fts-search). ([#441](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/434))",2022-06-15T04:34:45Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.63,2022-10-27,"See [Datasette 0.63: The annotated release notes](https://simonwillison.net/2022/Oct/27/datasette-0-63/) 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](https://github.com/simonw/datasette/issues/1853))
- `--load-extension` option now supports entrypoints. Thanks, Alex Garcia. ([#1789](https://github.com/simonw/datasette/pull/1789))
- Facet size can now be set per-table with the new `facet_size` table metadata option. ([#1804](https://github.com/simonw/datasette/issues/1804))
- The [truncate_cells_html](https://docs.datasette.io/en/stable/settings.html#setting-truncate-cells-html) setting now also affects long URLs in columns. ([#1805](https://github.com/simonw/datasette/issues/1805))
- The non-JavaScript SQL editor textarea now increases height to fit the SQL query. ([#1786](https://github.com/simonw/datasette/issues/1786))
- Facets are now displayed with better line-breaks in long values. Thanks, Daniel Rech. ([#1794](https://github.com/simonw/datasette/pull/1794))
- The `settings.json` file used in [Configuration directory mode](https://docs.datasette.io/en/stable/settings.html#config-dir) is now validated on startup. ([#1816](https://github.com/simonw/datasette/issues/1816))
- SQL queries can now include leading SQL comments, using `/* ... */` or `-- ...` syntax. Thanks, Charles Nepote. ([#1860](https://github.com/simonw/datasette/issues/1860))
- SQL query is now re-displayed when terminated with a time limit error. ([#1819](https://github.com/simonw/datasette/issues/1819))
- The [inspect data](https://docs.datasette.io/en/stable/performance.html#performance-inspect) mechanism is now used to speed up server startup - thanks, Forest Gregg. ([#1834](https://github.com/simonw/datasette/issues/1834))
- In [Configuration directory mode](https://docs.datasette.io/en/stable/settings.html#config-dir) databases with filenames ending in `.sqlite` or `.sqlite3` are now automatically added to the Datasette instance. ([#1646](https://github.com/simonw/datasette/issues/1646))
- Breadcrumb navigation display now respects the current user's permissions. ([#1831](https://github.com/simonw/datasette/issues/1831))

## Plugin hooks and internals

- The [prepare_jinja2_environment(env, datasette)](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hook-prepare-jinja2-environment) plugin hook now accepts an optional `datasette` argument. Hook implementations can also now return an `async` function which will be awaited automatically. ([#1809](https://github.com/simonw/datasette/issues/1809))
- `Database(is_mutable=)` now defaults to `True`. ([#1808](https://github.com/simonw/datasette/issues/1808))
- The [datasette.check_visibility()](https://docs.datasette.io/en/stable/internals.html#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](https://github.com/simonw/datasette/issues/1829))
- Datasette no longer enforces upper bounds on its dependencies. ([#1800](https://github.com/simonw/datasette/issues/1800))

## Documentation

- New tutorial: [Cleaning data with sqlite-utils and Datasette](https://datasette.io/tutorials/clean-data).
- Screenshots in the documentation are now maintained using [shot-scraper](https://shot-scraper.datasette.io/), as described in [Automating screenshots for the Datasette documentation using shot-scraper](https://simonwillison.net/2022/Oct/14/automating-screenshots/). ([#1844](https://github.com/simonw/datasette/issues/1844))
- More detailed command descriptions on the [CLI reference](https://docs.datasette.io/en/stable/cli-reference.html#cli-reference) page. ([#1787](https://github.com/simonw/datasette/issues/1787))
- New documentation on [Running Datasette using OpenRC](https://docs.datasette.io/en/stable/deploying.html#deploying-openrc) - thanks, Adam Simpson. ([#1825](https://github.com/simonw/datasette/pull/1825))",2022-10-27T22:13:32Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.26.1,2019-01-28,Release notes: https://datasette.readthedocs.io/en/stable/changelog.html#v0-26-1,2019-01-28T01:50:45Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/0.7,2019-01-25,Release notes are here: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v0-7,2019-01-25T07:27:57Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
248903544,https://github.com/dogsheep/hacker-news-to-sqlite,https://github.com/dogsheep/hacker-news-to-sqlite/releases/tag/0.4,2021-03-13,"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
```",2021-03-13T19:15:06Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""hacker-news""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.25,2018-09-19,"New plugin hooks, improved database view support and an easier way to use more recent versions of SQLite.

See full release notes here: https://datasette.readthedocs.io/en/latest/changelog.html#v0-25",2018-09-19T18:27:21Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.2,2020-02-07,"New feature: `sqlite_utils.suggest_column_types([records])` returns the suggested column types for a list of records. See [Suggesting column types](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-suggest-column-types). (#81).

This replaces the undocumented `table.detect_column_types()` method.",2020-02-07T07:18:12Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.1,2020-01-31,New feature: `conversions={...}` can be passed to the `.insert()` family of functions to specify SQL conversions that should be applied to values that are being inserted or updated. See [Converting column values using SQL functions](https://sqlite-utils.readthedocs.io/en/stable/python-api.html#python-api-conversions). (#77).,2020-01-31T00:30:40Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
206156866,https://github.com/dogsheep/twitter-to-sqlite,https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.16,2020-02-07,New `friends` command for importing accounts that a specific user follows.,2020-02-07T07:44:53Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""sqlite"", ""twitter"", ""twitter-api""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.21,2018-05-05,"New JSON `_shape=` options, the ability to set table `_size=` and a mechanism for searching within specific columns.

  - Default tests to using a longer timelimit
    
    Every now and then a test will fail in Travis CI on Python 3.5 because it hit the default 20ms SQL time limit.
    
    Test fixtures now default to a 200ms time limit, and we only use the 20ms time limit for the specific test that tests query interruption.

    This should make our tests on Python 3.5 in Travis much more stable.

  - Support `_search_COLUMN=text` searches, closes [\#237](https://github.com/simonw/datasette/issues/237)

  - Show version on `/-/plugins` page, closes [\#248](https://github.com/simonw/datasette/issues/248)

  - `?_size=max` option, closes [\#249](https://github.com/simonw/datasette/issues/249)

  - Added `/-/versions` and `/-/versions.json`, closes [\#244](https://github.com/simonw/datasette/issues/244)
    
    Sample output:
    
        {
          ""python"": {
            ""version"": ""3.6.3"",
            ""full"": ""3.6.3 (default, Oct  4 2017, 06:09:38) \n[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.37)]""
          },
          ""datasette"": {
            ""version"": ""0.20""
          },
          ""sqlite"": {
            ""version"": ""3.23.1"",
            ""extensions"": {
              ""json1"": null,
              ""spatialite"": ""4.3.0a""
            }
          }
        }

  - Renamed `?_sql_time_limit_ms=` to `?_timelimit`, closes [\#242](https://github.com/simonw/datasette/issues/242)

  - New `?_shape=array` option + tweaks to `_shape`, closes [\#245](https://github.com/simonw/datasette/issues/245)
    
      - Default is now `?_shape=arrays` (renamed from `lists`)
      - New `?_shape=array` returns an array of objects as the root object
      - Changed `?_shape=object` to return the object as the root
      - Updated docs

  - FTS tables now detected by `inspect()`, closes [\#240](https://github.com/simonw/datasette/issues/240)

  - New `?_size=XXX` querystring parameter for table view, closes [\#229](https://github.com/simonw/datasette/issues/229)
    
    Also added documentation for all of the `_special` arguments.
    
    Plus deleted some duplicate logic implementing `_group_count`.

  - If `max_returned_rows==page_size`, increment `max_returned_rows` - fixes [\#230](https://github.com/simonw/datasette/issues/230)

  - New `hidden: True` option for table metadata, closes [\#239](https://github.com/simonw/datasette/issues/239)

  - Hide `idx_*` tables if spatialite detected, closes [\#228](https://github.com/simonw/datasette/issues/228)

  - Added `class=rows-and-columns` to custom query results table

  - Added CSS class `rows-and-columns` to main table

  - `label_column` option in `metadata.json` - closes [\#234](https://github.com/simonw/datasette/issues/234)",2018-05-05T23:21:33Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.20,2018-04-20,"Mostly new work on the [Plugins](http://datasette.readthedocs.io/en/latest/plugins.html) mechanism: plugins can now bundle static assets and custom templates, and ``datasette publish`` has a new ``--install=name-of-plugin`` option.

- Add col-X classes to HTML table on custom query page
- Fixed out-dated template in documentation
- Plugins can now bundle custom templates, #224
- Added /-/metadata /-/plugins /-/inspect, #225
- Documentation for --install option, refs #223
- Datasette publish/package --install option, #223
- Fix for plugins in Python 3.5, #222
- New plugin hooks: extra_css_urls() and extra_js_urls(), #214
- /-/static-plugins/PLUGIN_NAME/ now serves static/ from plugins
- <th> now gets class=""col-X"" - plus added col-X documentation
- Use to_css_class for table cell column classes

  This ensures that columns with spaces in the name will still
  generate usable CSS class names. Refs #209
- Add column name classes to <td>s, make PK bold [Russ Garrett]
- Don't duplicate simple primary keys in the link column [Russ Garrett]

  When there's a simple (single-column) primary key, it looks weird to
  duplicate it in the link column.

  This change removes the second PK column and treats the link column as
  if it were the PK column from a header/sorting perspective.
- Correct escaping for HTML display of row links [Russ Garrett]
- Longer time limit for test_paginate_compound_keys

  It was failing intermittently in Travis - see #209
- Use application/octet-stream for downloadable databses
- Updated PyPI classifiers
- Updated PyPI link to pypi.org",2018-04-20T14:41:14Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.23.1,2018-06-21,"Minor bugfix release.

* Correctly display empty strings in HTML table, closes #314
* Allow “.” in database filenames, closes #302
* 404s ending in slash redirect to remove that slash, closes #309
* Fixed incorrect display of compound primary keys with foreign key references. Closes #319
* Docs + example of canned SQL query using || concatenation. Closes #321
* Correctly display facets with value of 0 - closes #318
* Default ‘expand labels’ to checked in CSV advanced export
",2018-06-21T16:02:44Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.23.2,2018-07-08,"Minor bugfix and documentation release.

* CSV export now respects `--cors`, fixes #326
* [Installation instructions](https://datasette.readthedocs.io/en/latest/installation.html) including docker image - closes #328
* Fix for row pages for tables with / in, closes #325",2018-07-08T05:41:38Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.57a0,2021-05-23,"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](https://github.com/simonw/datasette/issues/1308))
-   New `?_facet_size=` argument for customizing the number of facet results returned on a page. ([#1332](https://github.com/simonw/datasette/issues/1332))",2021-05-23T00:46:44Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.45,2020-07-01,"Magic parameters for canned queries, a log out feature, improved plugin documentation and four new plugin hooks.

### Magic parameters for canned queries

Canned queries now support [Magic parameters](https://docs.datasette.io/en/stable/sql_queries.html#canned-queries-magic-parameters), which can be used to insert or select automatically generated values. For example:
```sql
insert into logs
  (user_id, timestamp)
values
  (:_actor_id, :_now_datetime_utc)
```
This inserts the currently authenticated actor ID and the current datetime. ([#842](https://github.com/simonw/datasette/issues/842))

### Log out

The [ds_actor cookie](https://docs.datasette.io/en/stable/authentication.html#authentication-ds-actor) can be used by plugins (or by Datasette's [--root mechanism](https://docs.datasette.io/en/stable/authentication.html#authentication-root)) to authenticate users. The new `/-/logout` page provides a way to clear that cookie.

A ""Log out"" button now shows in the global navigation provided the user is authenticated using the `ds_actor` cookie. ([#840](https://github.com/simonw/datasette/issues/840))

### Better plugin documentation

The plugin documentation has been re-arranged into four sections, including a brand new section on testing plugins. ([#687](https://github.com/simonw/datasette/issues/687))

-   [Plugins](https://docs.datasette.io/en/stable/plugins.html#plugins) introduces Datasette's plugin system and describes how to install and configure plugins.
-   [Writing plugins](https://docs.datasette.io/en/stable/writing_plugins.html#writing-plugins) describes how to author plugins, from simple one-off plugins to packaged plugins that can be published to PyPI. It also describes how to start a plugin using the new [datasette-plugin](https://github.com/simonw/datasette-plugin) cookiecutter template.
-   [Plugin hooks](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hooks) is a full list of detailed documentation for every Datasette plugin hook.
-   [Testing plugins](https://docs.datasette.io/en/stable/testing_plugins.html#testing-plugins) describes how to write tests for Datasette plugins, using [pytest](https://docs.pytest.org/) and [HTTPX](https://www.python-httpx.org/).

### New plugin hooks

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

### Smaller changes

-   Cascading view permissons - so if a user has `view-table` they can view the table page even if they do not have `view-database` or `view-instance`. ([#832](https://github.com/simonw/datasette/issues/832))
-   CSRF protection no longer applies to `Authentication: Bearer token` requests or requests without cookies. ([#835](https://github.com/simonw/datasette/issues/835))
-   `datasette.add_message()` now works inside plugins. ([#864](https://github.com/simonw/datasette/issues/864))
-   Workaround for ""Too many open files"" error in test runs. ([#846](https://github.com/simonw/datasette/issues/846))
-   Respect existing `scope[""actor""]` if already set by ASGI middleware. ([#854](https://github.com/simonw/datasette/issues/854))
-   New process for shipping [Alpha and beta releases](https://docs.datasette.io/en/stable/contributing.html#contributing-alpha-beta). ([#807](https://github.com/simonw/datasette/issues/807))
-   `{{ csrftoken() }}` now works when plugins render a template using `datasette.render_template(..., request=request)`. ([#863](https://github.com/simonw/datasette/issues/863))
-   Datasette now creates a single [Request object](https://docs.datasette.io/en/stable/internals.html#internals-request) and uses it throughout the lifetime of the current HTTP request. ([#870](https://github.com/simonw/datasette/issues/870))",2020-07-01T21:46:07Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
213286752,https://github.com/dogsheep/pocket-to-sqlite,https://github.com/dogsheep/pocket-to-sqlite/releases/tag/0.1,2019-10-07,Initial release,2019-10-07T05:18:20Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""pocket"", ""pocket-api"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.61,2022-03-23,"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](https://simonwillison.net/2022/Mar/24/datasette-061/).

-   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](https://docs.datasette.io/en/stable/internals.html#internals-tilde-encoding). ([#1657](https://github.com/simonw/datasette/issues/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](https://docs.datasette.io/en/stable/performance.html#performance-hashed-urls) for details. ([#1661](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1668))
-   Datasette is now covered by a [Code of Conduct](https://github.com/simonw/datasette/blob/main/CODE_OF_CONDUCT.md). ([#1654](https://github.com/simonw/datasette/issues/1654))
-   Python 3.6 is no longer supported. ([#1577](https://github.com/simonw/datasette/issues/1577))
-   Tests now run against Python 3.11-dev. ([#1621](https://github.com/simonw/datasette/issues/1621))
-   New [datasette.ensure_permissions(actor, permissions)](https://docs.datasette.io/en/stable/internals.html#datasette-ensure-permissions) internal method for checking multiple permissions at once. ([#1675](https://github.com/simonw/datasette/issues/1675))
-   New [datasette.check_visibility(actor, action, resource=None)](https://docs.datasette.io/en/stable/internals.html#datasette-check-visibilty) internal method for checking if a user can see a resource that would otherwise be invisible to unauthenticated users. ([#1678](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1612))
-   Datasette now has a default favicon. ([#1603](https://github.com/simonw/datasette/issues/1603))
-   `sqlite_stat` tables are now hidden by default. ([#1587](https://github.com/simonw/datasette/issues/1587))
-   SpatiaLite tables `data_licenses`, `KNN` and `KNN2` are now hidden by default. ([#1601](https://github.com/simonw/datasette/issues/1601))
-   SQL query tracing mechanism now works for queries executed in `asyncio` sub-tasks, such as those created by `asyncio.gather()`. ([#1576](https://github.com/simonw/datasette/issues/1576))
-   [datasette.tracer](https://docs.datasette.io/en/stable/internals.html#internals-tracer) mechanism is now documented.
-   Common Datasette symbols can now be imported directly from the top-level `datasette` package, see [Import shortcuts](https://docs.datasette.io/en/stable/internals.html#internals-shortcuts). Those symbols are `Response`, `Forbidden`, `NotFound`, `hookimpl`, `actor_matches_allow`. ([#957](https://github.com/simonw/datasette/issues/957))
-   `/-/versions` page now returns additional details for libraries used by SpatiaLite. ([#1607](https://github.com/simonw/datasette/issues/1607))
-   Documentation now links to the [Datasette Tutorials](https://datasette.io/tutorials).
-   Datasette will now also look for SpatiaLite in `/opt/homebrew` - thanks, Dan Peterson. ([#1649](https://github.com/simonw/datasette/pull/1649))
-   Fixed bug where [custom pages](https://docs.datasette.io/en/stable/custom_templates.html#custom-pages) did not work on Windows. Thanks, Robert Christie. ([#1545](https://github.com/simonw/datasette/issues/1545))
-   Fixed error caused when a table had a column named `n`. ([#1228](https://github.com/simonw/datasette/issues/1228))",2022-03-23T18:14:36Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
206156866,https://github.com/dogsheep/twitter-to-sqlite,https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.2,2019-09-04,Full text search for tweets table,2019-09-04T22:09:46Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""sqlite"", ""twitter"", ""twitter-api""]"
197882382,https://github.com/dogsheep/healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/releases/tag/0.2,2019-07-20,Fixed a bug where duplicate records could crash the import.,2019-07-20T16:44:41Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""healthkit"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/2.2.1,2020-02-07,"Fixed a bug where `.upsert(..., hash_id=""pk"")` threw an error (#84).",2020-02-07T07:24:54Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
197882382,https://github.com/dogsheep/healthkit-to-sqlite,https://github.com/dogsheep/healthkit-to-sqlite/releases/tag/0.3.2,2019-07-26,Fix for #9 - Too many SQL variables bug,2019-07-26T06:12:12Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""healthkit"", ""sqlite""]"
205429375,https://github.com/dogsheep/swarm-to-sqlite,https://github.com/dogsheep/swarm-to-sqlite/releases/tag/0.1,2019-08-31,First usable release.,2019-08-31T02:58:32Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""foursquare"", ""foursquare-api"", ""sqlite"", ""swarm""]"
209590345,https://github.com/dogsheep/genome-to-sqlite,https://github.com/dogsheep/genome-to-sqlite/releases/tag/0.1,2019-09-19,First release,2019-09-19T15:41:17Z,"[""23andme"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""genetics"", ""personal-analytics"", ""sqlite""]"
248903544,https://github.com/dogsheep/hacker-news-to-sqlite,https://github.com/dogsheep/hacker-news-to-sqlite/releases/tag/0.3,2020-03-21,First non-alpha release. Now configures full-text search for the `users` and `items` tables. #1,2020-03-21T19:47:36Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""hacker-news""]"
206156866,https://github.com/dogsheep/twitter-to-sqlite,https://github.com/dogsheep/twitter-to-sqlite/releases/tag/0.3,2019-09-04,"Extract places and media into separate tables

Demo: https://twitter-to-sqlite-demo.now.sh/",2019-09-04T22:11:01Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""sqlite"", ""twitter"", ""twitter-api""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.56,2021-03-29,"Documentation improvements, bug fixes and support for SpatiaLite 5.

-   The SQL editor can now be resized by dragging a handle. ([#1236](https://github.com/simonw/datasette/issues/1236))
-   Fixed a bug with JSON faceting and the `__arraycontains` filter caused by tables with spaces in their names. ([#1239](https://github.com/simonw/datasette/issues/1239))
-   Upgraded `httpx` dependency. ([#1005](https://github.com/simonw/datasette/issues/1005))
-   JSON faceting is now suggested even if a column contains blank strings. ([#1246](https://github.com/simonw/datasette/issues/1246))
-   New [datasette.add_memory_database()](https://docs.datasette.io/en/stable/internals.html#datasette-add-memory-database) method. ([#1247](https://github.com/simonw/datasette/issues/1247))
-   The [Response.asgi_send()](https://docs.datasette.io/en/stable/internals.html#internals-response-asgi-send) method is now documented. ([#1266](https://github.com/simonw/datasette/issues/1266))
-   The official Datasette Docker image now bundles SpatiaLite version 5. ([#1278](https://github.com/simonw/datasette/issues/1278))
-   Fixed a `no such table: pragma_database_list` bug when running Datasette against SQLite versions prior to SQLite 3.16.0. ([#1276](https://github.com/simonw/datasette/issues/1276))
-   HTML lists displayed in table cells are now styled correctly. Thanks, Bob Whitelock. ([#1141](https://github.com/simonw/datasette/issues/1141), [#1252](https://github.com/simonw/datasette/pull/1252))
-   Configuration directory mode now correctly serves immutable databases that are listed in `inspect-data.json`. Thanks Campbell Allen and Frankie Robertson. ([#1031](https://github.com/simonw/datasette/pull/1031), [#1229](https://github.com/simonw/datasette/pull/1229))",2021-03-29T00:43:36Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.25.1,2018-12-16,"Documentation improvements plus a fix for publishing to Zeit Now.

* `datasette publish now` now uses Zeit’s v1 platform, to work around the new 100MB image limit. Thanks, @slygent - closes #366.
",2018-12-16T21:44:27Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.32,2019-11-14,"Datasette now renders templates using [Jinja async mode](https://jinja.palletsprojects.com/en/2.10.x/api/#async-support). This makes it easy for plugins to provide custom template functions that perform asynchronous actions, for example the new [datasette-template-sql](https://github.com/simonw/datasette-template-sql) plugin which allows custom templates to directly execute SQL queries and render their results. (#628)

https://datasette.readthedocs.io/en/latest/changelog.html#v0-32",2019-11-14T23:42:14Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.53,2020-12-11,"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](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1135))
-   New `?_header=off` option for CSV export which omits the CSV header row, [documented here](https://docs.datasette.io/en/stable/csv_export.html#csv-export-url-parameters). ([#1133](https://github.com/simonw/datasette/issues/1133))
-   ""Powered by Datasette"" link in the footer now links to <https://datasette.io/>. ([#1138](https://github.com/simonw/datasette/issues/1138))
-   Project news no longer lives in the README - it can now be found at <https://datasette.io/news>. ([#1137](https://github.com/simonw/datasette/issues/1137))",2020-12-11T01:46:44Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.62,2022-08-14,"Datasette can now run entirely in your browser using WebAssembly. Try out [Datasette Lite](https://lite.datasette.io/), take a look [at the code](https://github.com/simonw/datasette-lite) or read more about it in [Datasette Lite: a server-side Python web application running in a browser](https://simonwillison.net/2022/May/4/datasette-lite/).

Datasette now has a [Discord community](https://discord.gg/ktd74dm5mw) for questions and discussions about Datasette and its ecosystem of projects.

## Features

-   Datasette is now compatible with [Pyodide](https://pyodide.org/). This is the enabling technology behind [Datasette Lite](https://lite.datasette.io/). ([#1733](https://github.com/simonw/datasette/issues/1733))
-   Database file downloads now implement conditional GET using ETags. ([#1739](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/pull/1759))
-   Datasette now runs some SQL queries in parallel. This has limited impact on performance, see [this research issue](https://github.com/simonw/datasette/issues/1727) for details.
-   New `--nolock` option for ignoring file locks when opening read-only databases. ([#1744](https://github.com/simonw/datasette/issues/1744))
-   Spaces in the database names in URLs are now encoded as `+` rather than `~20`. ([#1701](https://github.com/simonw/datasette/issues/1701))
-   `<Binary: 2427344 bytes>` is now displayed as `<Binary: 2,427,344 bytes>` and is accompanied by tooltip showing ""2.3MB"". ([#1712](https://github.com/simonw/datasette/issues/1712))
-   The base Docker image used by `datasette publish cloudrun`, `datasette package` and the [official Datasette image](https://hub.docker.com/datasetteproject/datasette) has been upgraded to `3.10.6-slim-bullseye`. ([#1768](https://github.com/simonw/datasette/issues/1768))
-   Canned writable queries against immutable databases now show a warning message. ([#1728](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/pull/1717))
-   `datasette publish cloudrun` has new `--min-instances` and `--max-instances` options. ([#1779](https://github.com/simonw/datasette/issues/1779))

## Plugin hooks

-   New plugin hook: [handle_exception()](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hook-handle-exception), for custom handling of exceptions caught by Datasette. ([#1770](https://github.com/simonw/datasette/issues/1770))
-   The [render_cell()](https://docs.datasette.io/en/stable/plugin_hooks.html#plugin-hook-render-cell) plugin hook is now also passed a `row` argument, representing the `sqlite3.Row` object that is being rendered. ([#1300](https://github.com/simonw/datasette/issues/1300))
-   The [configuration directory](https://docs.datasette.io/en/stable/settings.html#config-dir) is now stored in `datasette.config_dir`, making it available to plugins. Thanks, Chris Amico. ([#1766](https://github.com/simonw/datasette/pull/1766))

## Bug fixes

-   Don't show the facet option in the cog menu if faceting is not allowed. ([#1683](https://github.com/simonw/datasette/issues/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](https://github.com/simonw/datasette/issues/1773))
-   Fixed bug where `?_sort_desc` was duplicated in the URL every time the Apply button was clicked. ([#1738](https://github.com/simonw/datasette/issues/1738))

## Documentation

-   Examples in the documentation now include a copy-to-clipboard button. ([#1748](https://github.com/simonw/datasette/issues/1748))
-   Documentation now uses the [Furo](https://github.com/pradyunsg/furo) Sphinx theme. ([#1746](https://github.com/simonw/datasette/issues/1746))
-   Code examples in the documentation are now all formatted using Black. ([#1718](https://github.com/simonw/datasette/issues/1718))
-   `Request.fake()` method is now documented, see [Request object](https://docs.datasette.io/en/stable/internals.html#internals-request).
-   New documentation for plugin authors: [Registering a plugin for the duration of a test](https://docs.datasette.io/en/stable/testing_plugins.html#testing-plugins-register-in-test). ([#903](https://github.com/simonw/datasette/issues/903))",2022-08-14T17:43:05Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
248903544,https://github.com/dogsheep/hacker-news-to-sqlite,https://github.com/dogsheep/hacker-news-to-sqlite/releases/tag/0.2a,2020-03-21,Compatibility with sqlite-utils 1.x,2020-03-21T19:46:58Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""hacker-news""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.21,2022-01-11,"CLI and Python library improvements to help run [ANALYZE](https://www.sqlite.org/lang_analyze.html) 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](https://simonwillison.net/2022/Jan/11/sqlite-utils/).

-   New `sqlite-utils create-database` command for creating new empty database files. ([#348](https://github.com/simonw/sqlite-utils/issues/348))
-   New Python methods for running `ANALYZE` against a database, table or index: `db.analyze()` and `table.analyze()`, see [Optimizing index usage with ANALYZE](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-analyze). ([#366](https://github.com/simonw/sqlite-utils/issues/366))
-   New [sqlite-utils analyze command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-analyze) for running `ANALYZE` using the CLI. ([#379](https://github.com/simonw/sqlite-utils/issues/379))
-   The `create-index`, `insert` and `upsert` commands now have a new `--analyze` option for running `ANALYZE` after the command has completed. ([#379](https://github.com/simonw/sqlite-utils/issues/379))
-   New [sqlite-utils bulk command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-bulk) 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](https://github.com/simonw/sqlite-utils/issues/375))
-   The CLI tool can now also be run using `python -m sqlite_utils`. ([#368](https://github.com/simonw/sqlite-utils/issues/368))
-   Using `--fmt` now implies `--table`, so you don't need to pass both options. ([#374](https://github.com/simonw/sqlite-utils/issues/374))
-   The `--convert` function applied to rows can now modify the row in place. ([#371](https://github.com/simonw/sqlite-utils/issues/371))
-   The [insert-files command](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-insert-files) supports two new columns: `stem` and `suffix`. ([#372](https://github.com/simonw/sqlite-utils/issues/372))
-   The `--nl` import option now ignores blank lines in the input. ([#376](https://github.com/simonw/sqlite-utils/issues/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](https://github.com/simonw/sqlite-utils/issues/364))",2022-01-11T02:35:02Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.22.1,2018-05-23,"Bugfix release, plus we now use [versioneer](https://github.com/warner/python-versioneer) for our version numbers.

- Faceting no longer breaks pagination, fixes #282
- Add ``__version_info__`` derived from `__version__` [Robert Gieseke]

  This might be tuple of more than two values (major and minor
  version) if commits have been made after a release.
- Add version number support with Versioneer. [Robert Gieseke]

  Versioneer Licence:
  Public Domain (CC0-1.0)

  Closes #273
- Refactor inspect logic [Russ Garrett]",2018-05-23T14:04:17Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.44,2020-06-12,"Authentication and permissions, writable canned queries, flash messages, new plugin hooks and more. [Full release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-44). See also [Datasette 0.44: the annotated release notes](https://simonwillison.net/2020/Jun/12/annotated-release-notes/).",2020-06-12T07:10:38Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"
140912432,https://github.com/simonw/sqlite-utils,https://github.com/simonw/sqlite-utils/releases/tag/3.35,2023-08-18,"Adding foreign keys to a table no longer uses `PRAGMA writable_schema = 1` to directly manipulate the `sqlite_master` table. This was resulting in errors in some Python installations where the SQLite library was compiled in a way that prevented this from working, in particular on macOS. Foreign keys are now added using the [table transformation](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) mechanism instead. ([#577](https://github.com/simonw/sqlite-utils/issues/577))

This new mechanism creates a full copy of the table, so it is likely to be significantly slower for large tables, but will no longer trigger table `sqlite_master may not be modified` errors on platforms that do not support `PRAGMA writable_schema = 1`.

A new plugin, [sqlite-utils-fast-fks](https://github.com/simonw/sqlite-utils-fast-fks), is now available for developers who still want to use that faster but riskier implementation.

Other changes:

- The [table.transform() method](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) has two new parameters: `foreign_keys=` allows you to replace the foreign key constraints defined on a table, and `add_foreign_keys=` lets you specify new foreign keys to add. These complement the existing `drop_foreign_keys=` parameter. ([#577](https://github.com/simonw/sqlite-utils/issues/577))
- The [sqlite-utils transform](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-transform-table) command has a new `--add-foreign-key` option which can be called multiple times to add foreign keys to a table that is being transformed. ([#585](https://github.com/simonw/sqlite-utils/issues/585))
- [sqlite-utils convert](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-convert) now has a `--pdb` option for opening a debugger on the first encountered error in your conversion script. ([#581](https://github.com/simonw/sqlite-utils/issues/581))
- Fixed a bug where `sqlite-utils install -e '.[test]'` option did not work correctly.",2023-08-18T02:05:22Z,"[""cli"", ""click"", ""datasette"", ""datasette-io"", ""datasette-tool"", ""python"", ""sqlite"", ""sqlite-database""]"
248903544,https://github.com/dogsheep/hacker-news-to-sqlite,https://github.com/dogsheep/hacker-news-to-sqlite/releases/tag/0.3.1,2020-03-21,Added documentation on [Browsing your data with Datasette](https://github.com/dogsheep/hacker-news-to-sqlite/blob/0.3.1/README.md#browsing-your-data-with-datasette).,2020-03-21T22:41:16Z,"[""datasette"", ""datasette-io"", ""datasette-tool"", ""dogsheep"", ""hacker-news""]"
107914493,https://github.com/simonw/datasette,https://github.com/simonw/datasette/releases/tag/0.29,2019-07-08,"ASGI, new plugin hooks, facet by date and much, much more… See [the release notes](https://datasette.readthedocs.io/en/stable/changelog.html#v0-29) for full details.",2019-07-08T03:43:13Z,"[""asgi"", ""automatic-api"", ""csv"", ""datasets"", ""datasette"", ""datasette-io"", ""docker"", ""json"", ""python"", ""sql"", ""sqlite""]"