html_url,id,node_id,tag_name,target_commitish,name,draft,author,prerelease,created_at,published_at,body,repo,reactions https://github.com/simonw/sqlite-utils/releases/tag/3.35.2,127967404,RE_kwDOCGYnMM4HoKCs,3.35.2,main,3.35.2,0,9599,0,2023-11-04T01:03:42Z,2023-11-04T01:05:56Z,"- The `--load-extension=spatialite` option and [find_spatialite()](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-gis-find-spatialite) utility function now both work correctly on `arm64` Linux. Thanks, [Mike Coats](https://github.com/MikeCoats). ([#599](https://github.com/simonw/sqlite-utils/issues/599)) - Fix for bug where `sqlite-utils insert` could cause your terminal cursor to disappear. Thanks, [Luke Plant](https://github.com/spookylukey). ([#433](https://github.com/simonw/sqlite-utils/issues/433)) - `datetime.timedelta` values are now stored as `TEXT` columns. Thanks, [Harald Nezbeda](https://github.com/nezhar). ([#522](https://github.com/simonw/sqlite-utils/issues/522)) - Test suite is now also run against Python 3.12.",140912432, https://github.com/simonw/sqlite-utils/releases/tag/3.35.1,120501239,RE_kwDOCGYnMM4HLrP3,3.35.1,main,3.35.1,0,9599,0,2023-09-09T00:49:55Z,2023-09-09T00:50:42Z,- Fixed a bug where [table.transform()](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-transform) would sometimes re-assign the `rowid` values for a table rather than keeping them consistent across the operation. ([#592](https://github.com/simonw/sqlite-utils/issues/592)),140912432, https://github.com/simonw/datasette/releases/tag/1.0a6,120375181,RE_kwDOBm6k_c4HLMeN,1.0a6,main,1.0a6,0,9599,1,2023-09-08T04:44:08Z,2023-09-08T04:45:12Z,"- New plugin hook: [actors_from_ids(datasette, actor_ids)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-hook-actors-from-ids) and an internal method to accompany it, [await .actors_from_ids(actor_ids)](https://docs.datasette.io/en/latest/internals.html#datasette-actors-from-ids). This mechanism is intended to be used by plugins that may need to display the actor who was responsible for something managed by that plugin: they can now resolve the recorded IDs of actors into the full actor objects. ([#2181](https://github.com/simonw/datasette/issues/2181)) - `DATASETTE_LOAD_PLUGINS` environment variable for [controlling which plugins](https://docs.datasette.io/en/latest/plugins.html#plugins-datasette-load-plugins) are loaded by Datasette. ([#2164](https://github.com/simonw/datasette/issues/2164)) - Datasette now checks if the user has permission to view a table linked to by a foreign key before turning that foreign key into a clickable link. ([#2178](https://github.com/simonw/datasette/issues/2178)) - The `execute-sql` permission now implies that the actor can also view the database and instance. ([#2169](https://github.com/simonw/datasette/issues/2169)) - Documentation describing a pattern for building plugins that themselves [define further hooks](https://docs.datasette.io/en/latest/writing_plugins.html#writing-plugins-extra-hooks) for other plugins. ([#1765](https://github.com/simonw/datasette/issues/1765)) - Datasette is now tested against the Python 3.12 preview. ([#2175](https://github.com/simonw/datasette/pull/2175))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a5,119112633,RE_kwDOBm6k_c4HGYO5,1.0a5,main,1.0a5,0,9599,1,2023-08-29T17:17:54Z,2023-08-29T17:19:35Z,"- When restrictions are applied to [API tokens](https://docs.datasette.io/en/1.0a5/authentication.html#createtokenview), those restrictions now behave slightly differently: applying the `view-table` restriction will imply the ability to `view-database` for the database containing that table, and both `view-table` and `view-database` will imply `view-instance`. Previously you needed to create a token with restrictions that explicitly listed `view-instance` and `view-database` and `view-table` in order to view a table without getting a permission denied error. ([#2102](https://github.com/simonw/datasette/issues/2102)) - New `datasette.yaml` (or `.json`) configuration file, which can be specified using `datasette -c path-to-file`. The goal here to consolidate settings, plugin configuration, permissions, canned queries, and other Datasette configuration into a single single file, separate from `metadata.yaml`. The legacy `settings.json` config file used for [Configuration directory mode](https://docs.datasette.io/en/1.0a5/settings.html#config-dir) has been removed, and `datasette.yaml` has a `""settings""` section where the same settings key/value pairs can be included. In the next future alpha release, more configuration such as plugins/permissions/canned queries will be moved to the `datasette.yaml` file. See [#2093](https://github.com/simonw/datasette/issues/2093) for more details. Thanks, Alex Garcia. - The `-s/--setting` option can now take dotted paths to nested settings. These will then be used to set or over-ride the same options as are present in the new configuration file. ([#2156](https://github.com/simonw/datasette/issues/2156)) - New `--actor '{""id"": ""json-goes-here""}'` option for use with `datasette --get` to treat the simulated request as being made by a specific actor, see [datasette --get](https://docs.datasette.io/en/1.0a5/cli-reference.html#cli-datasette-get). ([#2153](https://github.com/simonw/datasette/issues/2153)) - The Datasette `_internal` database has had some changes. It no longer shows up in the `datasette.databases` list by default, and is now instead available to plugins using the `datasette.get_internal_database()`. Plugins are invited to use this as a private database to store configuration and settings and secrets that should not be made visible through the default Datasette interface. Users can pass the new `--internal internal.db` option to persist that internal database to disk. Thanks, Alex Garcia. ([#2157](https://github.com/simonw/datasette/issues/2157)).",107914493, https://github.com/simonw/datasette/releases/tag/1.0a4,118245443,RE_kwDOBm6k_c4HDEhD,1.0a4,main,1.0a4,0,9599,1,2023-08-22T17:10:01Z,2023-08-22T17:13:26Z,"This alpha fixes a security issue with the `/-/api` API explorer. On authenticated Datasette instances (instances protected using plugins such as [datasette-auth-passwords](https://datasette.io/plugins/datasette-auth-passwords)) the API explorer interface could reveal the names of databases and tables within the protected instance. The data stored in those tables was not revealed. For more information and workarounds, read [the security advisory](https://github.com/simonw/datasette/security/advisories/GHSA-7ch3-7pp7-7cpq). The issue has been present in every previous alpha version of Datasette 1.0: versions 1.0a0, 1.0a1, 1.0a2 and 1.0a3. Also in this alpha: - The new `datasette plugins --requirements` option outputs a list of currently installed plugins in Python `requirements.txt` format, useful for duplicating that installation elsewhere. ([#2133](https://github.com/simonw/datasette/issues/2133)) - [Writable canned queries](https://docs.datasette.io/en/latest/sql_queries.html#canned-queries-writable) can now define a `on_success_message_sql` field in their configuration, containing a SQL query that should be executed upon successful completion of the write operation in order to generate a message to be shown to the user. ([#2138](https://github.com/simonw/datasette/issues/2138)) - The automatically generated border color for a database is now shown in more places around the application. ([#2119](https://github.com/simonw/datasette/issues/2119)) - Every instance of example shell script code in the documentation should now include a working copy button, free from additional syntax. ([#2140](https://github.com/simonw/datasette/issues/2140))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/118245443/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 1, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/sqlite-utils/releases/tag/3.35,117703394,RE_kwDOCGYnMM4HBALi,3.35,main,3.35,0,9599,0,2023-08-18T02:05:15Z,2023-08-18T02:05:22Z,"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.",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/117703394/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/1.0a3,115813784,RE_kwDOBm6k_c4G5y2Y,1.0a3,main,1.0a3,0,9599,1,2023-08-09T19:13:11Z,2023-08-09T19:17:26Z,"This alpha release previews the updated design for Datasette's default JSON API. ([#782](https://github.com/simonw/datasette/issues/782)) The new [default JSON representation](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-default) for both table pages (`/dbname/table.json`) and arbitrary SQL queries (`/dbname.json?sql=...`) is now shaped like this: ```json { ""ok"": true, ""rows"": [ { ""id"": 3, ""name"": ""Detroit"" }, { ""id"": 2, ""name"": ""Los Angeles"" }, { ""id"": 4, ""name"": ""Memnonia"" }, { ""id"": 1, ""name"": ""San Francisco"" } ], ""truncated"": false } ``` Tables will include an additional `""next""` key for pagination, which can be passed to `?_next=` to fetch the next page of results. The various `?_shape=` options continue to work as before - see [Different shapes](https://docs.datasette.io/en/1.0a3/json_api.html#json-api-shapes) for details. A new `?_extra=` mechanism is available for tables, but has not yet been stabilized or documented. Details on that are available in [#262](https://github.com/simonw/datasette/issues/262). ### Smaller changes - Datasette documentation now shows YAML examples for [Metadata](https://docs.datasette.io/en/1.0a3/metadata.html#metadata) by default, with a tab interface for switching to JSON. ([#1153](https://github.com/simonw/datasette/issues/1153)) - [register_output_renderer(datasette)](https://docs.datasette.io/en/1.0a3/plugin_hooks.html#plugin-register-output-renderer) plugins now have access to `error` and `truncated` arguments, allowing them to display error messages and take into account truncated results. ([#2130](https://github.com/simonw/datasette/issues/2130)) - `render_cell()` plugin hook now also supports an optional `request` argument. ([#2007](https://github.com/simonw/datasette/issues/2007)) - New `Justfile` to support development workflows for Datasette using [Just](https://github.com/casey/just). - `datasette.render_template()` can now accepts a `datasette.views.Context` subclass as an alternative to a dictionary. ([#2127](https://github.com/simonw/datasette/issues/2127)) - `datasette install -e path` option for editable installations, useful while developing plugins. ([#2106](https://github.com/simonw/datasette/issues/2106)) - When started with the `--cors` option Datasette now serves an `Access-Control-Max-Age: 3600` header, ensuring CORS OPTIONS requests are repeated no more than once an hour. ([#2079](https://github.com/simonw/datasette/issues/2079)) - Fixed a bug where the `_internal` database could display `None` instead of `null` for in-memory databases. ([#1970](https://github.com/simonw/datasette/issues/1970))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/115813784/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 3, ""eyes"": 0}" https://github.com/simonw/sqlite-utils/releases/tag/3.34,113203288,RE_kwDOCGYnMM4Gv1hY,3.34,main,3.34,0,9599,0,2023-07-22T23:25:14Z,2023-07-22T23:30:49Z,"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))",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/113203288/reactions"", ""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/dogsheep/pocket-to-sqlite/releases/tag/0.2.3,111513749,RE_kwDODLZ_YM4GpZCV,0.2.3,main,0.2.3,0,9599,0,2023-07-09T01:14:06Z,2023-07-09T01:15:03Z,"- Progress bar now includes a count of the total number of items to fetch. - Now packaged using `pyproject.toml`. [#12](https://github.com/dogsheep/pocket-to-sqlite/issues/12)",213286752, https://github.com/simonw/sqlite-utils/releases/tag/3.33,109839649,RE_kwDOCGYnMM4GjAUh,3.33,main,3.33,0,9599,0,2023-06-26T01:31:22Z,2023-06-26T01:32:30Z,"- `sqlite-utils` will now use [sqlean.py](https://github.com/nalgeon/sqlean.py) in place of `sqlite3` if it is installed in the same virtual environment. This is useful for Python environments with either an outdated version of SQLite or with restrictions on SQLite such as disabled extension loading or restrictions resulting in the `sqlite3.OperationalError: table sqlite_master may not be modified` error. ([#559](https://github.com/simonw/sqlite-utils/issues/559)) - New `with db.ensure_autocommit_off()` context manager, which ensures that the database is in autocommit mode for the duration of a block of code. This is used by `db.enable_wal()` and `db.disable_wal()` to ensure they work correctly with `pysqlite3` and `sqlean.py`. - New `db.iterdump()` method, providing an iterator over SQL strings representing a dump of the database. This uses `sqlite-dump` if it is available, otherwise falling back on the `conn.iterdump()` method from `sqlite3`. Both `pysqlite3` and `sqlean.py` omit support for `iterdump()` - this method helps paper over that difference.",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/109839649/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/sqlite-utils/releases/tag/3.32.1,103740013,RE_kwDOCGYnMM4GLvJt,3.32.1,main,3.32.1,0,9599,0,2023-05-21T21:11:54Z,2023-05-21T21:12:05Z,"- Examples in the [CLI documentation](https://sqlite-utils.datasette.io/en/stable/cli.html) can now all be copied and pasted without needing to remove a leading `$`. ([#551](https://github.com/simonw/sqlite-utils/issues/551)) - Documentation now covers [Setting up shell completion](https://sqlite-utils.datasette.io/en/stable//installation.html#installation-completion) for `bash` and `zsh`. ([#552](https://github.com/simonw/sqlite-utils/issues/552))",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/103740013/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/sqlite-utils/releases/tag/3.32,103736235,RE_kwDOCGYnMM4GLuOr,3.32,main,3.32,0,9599,0,2023-05-21T18:53:44Z,2023-05-21T18:55:42Z,"- New experimental `sqlite-utils tui` interface for interactively building command-line invocations, powered by [Trogon](https://github.com/Textualize/trogon). This requires an optional dependency, installed using `sqlite-utils install trogon`. There is a screenshot [in the documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-tui). ([#545](https://github.com/simonw/sqlite-utils/issues/545)) - `sqlite-utils analyze-tables` command ([documentation](https://sqlite-utils.datasette.io/en/stable/cli.html#cli-analyze-tables)) now has a `--common-limit 20` option for changing the number of common/least-common values shown for each column. ([#544](https://github.com/simonw/sqlite-utils/issues/544)) - `sqlite-utils analyze-tables --no-most` and `--no-least` options for disabling calculation of most-common and least-common values. - If a column contains only `null` values, `analyze-tables` will no longer attempt to calculate the most common and least common values for that column. ([#547](https://github.com/simonw/sqlite-utils/issues/547)) - Calling `sqlite-utils analyze-tables` with non-existent columns in the `-c/--column` option now results in an error message. ([#548](https://github.com/simonw/sqlite-utils/issues/548)) - The `table.analyze_column()` method ([documented here](https://sqlite-utils.datasette.io/en/stable/python-api.html#python-api-analyze-column)) now accepts `most_common=False` and `least_common=False` options for disabling calculation of those values.",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/103736235/reactions"", ""total_count"": 3, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 3, ""eyes"": 0}" https://github.com/simonw/sqlite-utils/releases/tag/3.31,102274005,RE_kwDOCGYnMM4GGJPV,3.31,main,3.31,0,9599,0,2023-05-08T22:33:57Z,2023-05-08T22:37:24Z,"- Dropped support for Python 3.6. Tests now ensure compatibility with Python 3.11. ([#517](https://github.com/simonw/sqlite-utils/issues/517)) - Automatically locates the SpatiaLite extension on Apple Silicon. Thanks, Chris Amico. ([#536](https://github.com/simonw/sqlite-utils/pull/536)) - New `--raw-lines` option for the `sqlite-utils query` and `sqlite-utils memory` commands, which outputs just the raw value of the first column of evy row. ([#539](https://github.com/simonw/sqlite-utils/issues/539)) - Fixed a bug where `table.upsert_all()` failed if the `not_null=` option was passed. ([#538](https://github.com/simonw/sqlite-utils/issues/538)) - Fixed a `ResourceWarning` when using `sqlite-utils insert`. ([#534](https://github.com/simonw/sqlite-utils/issues/534)) - Now shows a more detailed error message when `sqlite-utils insert` is called with invalid JSON. ([#532](https://github.com/simonw/sqlite-utils/ises/532)) - `table.convert(..., skip_false=False)` and `sqlite-utils convert --no-skip-false` options, for avoiding a misfeature where the [convert()](http://127.0.0.1:8000/python-api.html#python-api-convert) mechanism skips rows in the database with a falsey value for the specified column. Fixing this by default would be a backwards-incompatible change and is under consideration for a 4.0 release in the future. ([#527](https://github.com/simonw/sqlite-utils/issues/527)) - Tables can now be created with self-referential foreign keys. Thanks, Scott Perry. ([#537](https://github.com/simonw/sqlite-utils/pull/537)) - `sqlite-utils transform` no longer breaks if a table defines default values for columns. Thanks, Kenny Song. ([#509](https://github.com/simonw/sqlite-utils/issues/509)) - Fixed a bug where repeated calls to `table.transform()` did not work correctly. Thanks, Martin Carpenter. ([#525](https://github.com/simonw/sqlite-utils/issues/525)) - Improved error message if `rows_from_file()` is passed a non-binary-mode file-like object. ([#520](https://github.com/simonw/sqlite-utils/issues/520))",140912432,"{""url"": ""https://api.github.com/repos/simonw/sqlite-utils/releases/102274005/reactions"", ""total_count"": 3, ""+1"": 3, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/dogsheep/swarm-to-sqlite/releases/tag/0.3.4,98864081,RE_kwDODD6af84F5IvR,0.3.4,main,0.3.4,0,9599,0,2023-04-11T03:17:35Z,2023-04-11T03:18:16Z,- Fixed an error in the `checkins_detail` view. [#15](https://github.com/dogsheep/swarm-to-sqlite/issues/15),205429375, https://github.com/dogsheep/apple-notes-to-sqlite/releases/tag/0.1,95017974,RE_kwDOJHON9s4Fqdv2,0.1,main,0.1,0,9599,0,2023-03-09T05:11:00Z,2023-03-09T05:12:12Z,"- Initial working version. `apple-notes-to-sqlite notes.db` dumps your notes out to a SQLite database. [#2](https://github.com/dogsheep/apple-notes-to-sqlite/issues/2) - `apple-notes-to-sqlite --dump` outputs them to standard output as newline-delimited JSON. [#3](https://github.com/dogsheep/apple-notes-to-sqlite/issues/3)",611552758, https://github.com/simonw/datasette/releases/tag/1.0a2,86103928,RE_kwDOBm6k_c4FIdd4,1.0a2,main,1.0a2,0,9599,1,2022-12-15T02:02:42Z,2022-12-15T02:03:59Z,"The third Datasette 1.0 alpha release adds upsert support to the JSON API, plus the ability to specify finely grained permissions when creating an API token. See [Datasette 1.0a2: Upserts and finely grained permissions](https://simonwillison.net/2022/Dec/15/datasette-1a2/) for an extended, annotated version of these release notes. - New `/db/table/-/upsert` API, [documented here](https://docs.datasette.io/en/latest/json_api.html#tableupsertview). upsert is an update-or-insert: existing rows will have specified keys updated, but if no row matches the incoming primary key a brand new row will be inserted instead. ([#1878](https://github.com/simonw/datasette/issues/1878)) - New [register_permissions(datasette)](https://docs.datasette.io/en/latest/plugin_hooks.html#plugin-register-permissions) plugin hook. Plugins can now register named permissions, which will then be listed in various interfaces that show available permissions. ([#1940](https://github.com/simonw/datasette/issues/1940)) - The `/db/-/create` API for [creating a table](https://docs.datasette.io/en/latest/json_api.html#tablecreateview) now accepts `""ignore"": true` and `""replace"": true` options when called with the `""rows""` property that creates a new table based on an example set of rows. This means the API can be called multiple times with different rows, setting rules for what should happen if a primary key collides with an existing row. ([#1927](https://github.com/simonw/datasette/issues/1927)) - Arbitrary permissions can now be configured at the instance, database and resource (table, SQL view or canned query) level in Datasette's [Metadata](https://docs.datasette.io/en/latest/metadata.html#metadata) JSON and YAML files. The new `""permissions""` key can be used to specify which actors should have which permissions. See [Other permissions in metadata](https://docs.datasette.io/en/latest/authentication.html#authentication-permissions-other) for details. ([#1636](https://github.com/simonw/datasette/issues/1636)) - The `/-/create-token` page can now be used to create API tokens which are restricted to just a subset of actions, including against specific databases or resources. See [API Tokens](https://docs.datasette.io/en/latest/authentication.html#createtokenview) for details. ([#1947](https://github.com/simonw/datasette/issues/1947)) - Likewise, the [datasette create-token](https://docs.datasette.io/en/latest/internals.html#create-token-actor-id-expires-after-none-restrict-all-none-restrict-database-none-restrict-resource-none) CLI command can now create tokens with [a subset of permissions](https://docs.datasette.io/en/latest/authentication.html#authentication-cli-create-token-restrict). ([#1855](https://github.com/simonw/datasette/issues/1855)) - New datasette.create_token() API method ` for programmatically creating signed API tokens. ([#1951](https://github.com/simonw/datasette/issues/1951)) - `/db/-/create` API now requires actor to have `insert-row` permission in order to use the `""row""` or `""rows""` properties. ([#1937](https://github.com/simonw/datasette/issues/1937))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a1,84755750,RE_kwDOBm6k_c4FDUUm,1.0a1,main,1.0a1,0,9599,1,2022-12-01T21:30:39Z,2022-12-01T21:42:45Z,"- Write APIs now serve correct CORS headers if Datasette is started in `--cors` mode. See the full list of [CORS headers](https://docs.datasette.io/en/latest/json_api.html#json-api) in the documentation. ([#1922](https://github.com/simonw/datasette/issues/1922)) - Fixed a bug where the `_memory` database could be written to even though writes were not persisted. ([#1917](https://github.com/simonw/datasette/issues/1917)) - The demo instance now includes an `ephemeral` database which can be used to test Datasette's write APIs, using the new [datasette-ephemeral-tables](https://datasette.io/plugins/datasette-ephemeral-tables) plugin to drop any created tables after five minutes. This database is only available if you sign in as the root user using the link on the homepage. ([#1915](https://github.com/simonw/datasette/issues/1915)) - Fixed a bug where hitting the write endpoints with a `GET` request returned a 500 error. It now returns a 405 (method not allowed) error instead. ([#1916](https://github.com/simonw/datasette/issues/1916)) - The list of endpoints in the API explorer now lists mutable databases first. ([#1918](https://github.com/simonw/datasette/issues/1918)) - The `""ignore"": true` and `""replace"": true` options for the insert API are [now documented](https://docs.datasette.io/en/latest/json_api.html#tableinsertview). ([#1924](https://github.com/simonw/datasette/issues/1924))",107914493, https://github.com/simonw/datasette/releases/tag/1.0a0,84496148,RE_kwDOBm6k_c4FCU8U,1.0a0,main,1.0a0,0,9599,1,2022-11-29T19:57:54Z,2022-11-29T19:58:55Z,"This first alpha release of Datasette 1.0 introduces a brand new collection of APIs for writing to the database ([#1850](https://github.com/simonw/datasette/issues/1850)), as well as a new API token mechanism baked into Datasette core. Previously, API tokens have only been supported by installing additional plugins. This is very much a preview: expect many more backwards incompatible API changes prior to the full 1.0 release. Feedback enthusiastically welcomed, either through [issue comments](https://github.com/simonw/datasette/issues/1850) or via the [Datasette Discord](https://datasette.io/discord) community. ### Signed API tokens - New `/-/create-token` page allowing authenticated users to create signed API tokens that can act on their behalf, see [API Tokens](https://docs.datasette.io/en/1.0-dev/authentication.html#createtokenview). ([#1852](https://github.com/simonw/datasette/issues/1852)) - New `datasette create-token` command for creating tokens from the command line: [datasette create-token](https://docs.datasette.io/en/1.0-dev/authentication.html#authentication-cli-create-token). - New [allow_signed_tokens](https://docs.datasette.io/en/1.0-dev/settings.html#setting-allow-signed-tokens) setting which can be used to turn off signed token support. ([#1856](https://github.com/simonw/datasette/issues/1856)) - New [max_signed_tokens_ttl](https://docs.datasette.io/en/1.0-dev/settings.html#setting-max-signed-tokens-ttl) setting for restricting the maximum allowed duration of a signed token. ([#1858](https://github.com/simonw/datasette/issues/1858)) ### Write API - New API explorer at `/-/api` for trying out the API. ([#1871](https://github.com/simonw/datasette/issues/1871)) - `/db/-/create` API for [Creating a table](https://docs.datasette.io/en/1.0-dev/json_api.html#tablecreateview). ([#1882](https://github.com/simonw/datasette/issues/1882)) - `/db/table/-/insert` API for [Inserting rows](https://docs.datasette.io/en/1.0-dev/json_api.html#tableinsertview). ([#1851](https://github.com/simonw/datasette/issues/1851)) - `/db/table/-/drop` API for [Dropping tables](https://docs.datasette.io/en/1.0-dev/json_api.html#tabledropview). ([#1874](https://github.com/simonw/datasette/issues/1874)) - `/db/table/pk/-/update` API for [Updating a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowupdateview). ([#1863](https://github.com/simonw/datasette/issues/1863)) - `/db/table/pk/-/delete` API for [Deleting a row](https://docs.datasette.io/en/1.0-dev/json_api.html#rowdeleteview). ([#1864](https://github.com/simonw/datasette/issues/1864))",107914493,"{""url"": ""https://api.github.com/repos/simonw/datasette/releases/84496148/reactions"", ""total_count"": 2, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 2, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}" https://github.com/simonw/datasette/releases/tag/0.63.1,82765509,RE_kwDOBm6k_c4E7ubF,0.63.1,main,0.63.1,0,9599,0,2022-11-11T07:01:20Z,2022-11-11T07:02:36Z,"- Fixed a bug where Datasette's table filter form would not redirect correctly when run behind a proxy using the [base_url](https://docs.datasette.io/en/stable/settings.html#setting-base-url) setting. ([#1883](https://github.com/simonw/datasette/issues/1883)) - SQL query is now shown wrapped in a `