id,page,ref,title,content,breadcrumbs,references changelog:id11,changelog,id11,0.63 (2022-10-27),See Datasette 0.63: The annotated release notes for more background on the changes in this release.,"[""Changelog""]","[{""href"": ""https://simonwillison.net/2022/Oct/27/datasette-0-63/"", ""label"": ""Datasette 0.63: The annotated release notes""}]" changelog:id114,changelog,id114,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 datasette/compare/0.22.1...0.23 for a full list of commits added since the last release.","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/compare/0.22.1...0.23"", ""label"": ""datasette/compare/0.22.1...0.23""}]" changelog:id115,changelog,id115,0.22.1 (2018-05-23),"Bugfix release, plus we now use 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]","[""Changelog""]","[{""href"": ""https://github.com/warner/python-versioneer"", ""label"": ""versioneer""}, {""href"": ""https://github.com/simonw/datasette/issues/282"", ""label"": ""#282""}, {""href"": ""https://github.com/simonw/datasette/issues/273"", ""label"": ""#273""}]" changelog:id118,changelog,id118,0.22 (2018-05-20),"The big new feature in this release is Facets . Datasette can now apply faceted browse to any column in any table. It will also suggest possible facets. See the Datasette Facets announcement post for more details. In addition to the work on facets: Added docs for introspection endpoints 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 support, closes #253 /-/versions now includes SQLite fts_versions , closes #252","[""Changelog""]","[{""href"": ""https://simonwillison.net/2018/May/20/datasette-facets/"", ""label"": ""Datasette Facets""}, {""href"": ""https://docs.datasette.io/en/stable/introspection.html"", ""label"": ""docs for introspection endpoints""}, {""href"": ""https://github.com/simonw/datasette/issues/274"", ""label"": ""#274""}, {""href"": ""https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo"", ""label"": ""https://fivethirtyeight.datasettes.com/fivethirtyeight/nba-elo%2Fnbaallelo""}, {""href"": ""https://github.com/simonw/datasette/issues/256"", ""label"": ""#256""}, {""href"": ""https://docs.datasette.io/en/stable/full_text_search.html"", ""label"": ""Documentation for SQLite full-text search""}, {""href"": ""https://github.com/simonw/datasette/issues/253"", ""label"": ""#253""}, {""href"": ""https://github.com/simonw/datasette/issues/252"", ""label"": ""#252""}]" changelog:id123,changelog,id123,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 Show version on /-/plugins page, closes #248 ?_size=max option, closes #249 Added /-/versions and /-/versions.json , closes #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 New ?_shape=array option + tweaks to _shape , closes #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 New ?_size=XXX query string parameter for table view, closes #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 New hidden: True option for table metadata, closes #239 Hide idx_* tables if spatialite detected, closes #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","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/237"", ""label"": ""#237""}, {""href"": ""https://github.com/simonw/datasette/issues/248"", ""label"": ""#248""}, {""href"": ""https://github.com/simonw/datasette/issues/249"", ""label"": ""#249""}, {""href"": ""https://github.com/simonw/datasette/issues/244"", ""label"": ""#244""}, {""href"": ""https://github.com/simonw/datasette/issues/242"", ""label"": ""#242""}, {""href"": ""https://github.com/simonw/datasette/issues/245"", ""label"": ""#245""}, {""href"": ""https://github.com/simonw/datasette/issues/240"", ""label"": ""#240""}, {""href"": ""https://github.com/simonw/datasette/issues/229"", ""label"": ""#229""}, {""href"": ""https://github.com/simonw/datasette/issues/230"", ""label"": ""#230""}, {""href"": ""https://github.com/simonw/datasette/issues/239"", ""label"": ""#239""}, {""href"": ""https://github.com/simonw/datasette/issues/228"", ""label"": ""#228""}, {""href"": ""https://github.com/simonw/datasette/issues/234"", ""label"": ""#234""}]" changelog:id13,changelog,id13,0.62 (2022-08-14),"Datasette can now run entirely in your browser using WebAssembly. Try out Datasette Lite , take a look at the code or read more about it in Datasette Lite: a server-side Python web application running in a browser . Datasette now has a Discord community for questions and discussions about Datasette and its ecosystem of projects.","[""Changelog""]","[{""href"": ""https://lite.datasette.io/"", ""label"": ""Datasette Lite""}, {""href"": ""https://github.com/simonw/datasette-lite"", ""label"": ""at the code""}, {""href"": ""https://simonwillison.net/2022/May/4/datasette-lite/"", ""label"": ""Datasette Lite: a server-side Python web application running in a browser""}, {""href"": ""https://datasette.io/discord"", ""label"": ""Discord community""}]" changelog:id136,changelog,id136,0.20 (2018-04-20),"Mostly new work on the Plugins mechanism: plugins can now bundle static assets and custom templates, and datasette publish has a new --install=name-of-plugin option. Add col-X classes to HTML table on custom query page Fixed out-dated template in documentation Plugins can now bundle custom templates, #224 Added /-/metadata /-/plugins /-/inspect, #225 Documentation for --install option, refs #223 Datasette publish/package --install option, #223 Fix for plugins in Python 3.5, #222 New plugin hooks: extra_css_urls() and extra_js_urls(), #214 /-/static-plugins/PLUGIN_NAME/ now serves static/ from plugins now gets class=""col-X"" - plus added col-X documentation Use to_css_class for table cell column classes This ensures that columns with spaces in the name will still generate usable CSS class names. Refs #209 Add column name classes to s, make PK bold [Russ Garrett] Don't duplicate simple primary keys in the link column [Russ Garrett] When there's a simple (single-column) primary key, it looks weird to duplicate it in the link column. This change removes the second PK column and treats the link column as if it were the PK column from a header/sorting perspective. Correct escaping for HTML display of row links [Russ Garrett] Longer time limit for test_paginate_compound_keys It was failing intermittently in Travis - see #209 Use application/octet-stream for downloadable databases Updated PyPI classifiers Updated PyPI link to pypi.org","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/224"", ""label"": ""#224""}, {""href"": ""https://github.com/simonw/datasette/issues/225"", ""label"": ""#225""}, {""href"": ""https://github.com/simonw/datasette/issues/223"", ""label"": ""#223""}, {""href"": ""https://github.com/simonw/datasette/issues/223"", ""label"": ""#223""}, {""href"": ""https://github.com/simonw/datasette/issues/222"", ""label"": ""#222""}, {""href"": ""https://github.com/simonw/datasette/issues/214"", ""label"": ""#214""}, {""href"": ""https://github.com/simonw/datasette/issues/209"", ""label"": ""#209""}, {""href"": ""https://github.com/simonw/datasette/issues/209"", ""label"": ""#209""}]" changelog:id145,changelog,id145,0.19 (2018-04-16),"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 and get involved in the tracking ticket if you have feedback on the direction so far. Fix for _sort_desc=sortable_with_nulls test, refs #216 Fixed #216 - paginate correctly when sorting by nullable column Initial documentation for plugins, closes #213 https://docs.datasette.io/en/stable/plugins.html New --plugins-dir=plugins/ option ( #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 ) 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 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.","[""Changelog""]","[{""href"": ""https://docs.datasette.io/en/stable/plugins.html"", ""label"": ""the documentation""}, {""href"": ""https://github.com/simonw/datasette/issues/14"", ""label"": ""the tracking ticket""}, {""href"": ""https://github.com/simonw/datasette/issues/216"", ""label"": ""#216""}, {""href"": ""https://github.com/simonw/datasette/issues/216"", ""label"": ""#216""}, {""href"": ""https://github.com/simonw/datasette/issues/213"", ""label"": ""#213""}, {""href"": ""https://docs.datasette.io/en/stable/plugins.html"", ""label"": ""https://docs.datasette.io/en/stable/plugins.html""}, {""href"": ""https://github.com/simonw/datasette/issues/212"", ""label"": ""#212""}, {""href"": ""https://github.com/simonw/datasette/issues/14"", ""label"": ""#210""}, {""href"": ""https://pluggy.readthedocs.io/"", ""label"": ""https://pluggy.readthedocs.io/""}, {""href"": ""https://github.com/simonw/datasette-plugin-demos"", ""label"": ""https://github.com/simonw/datasette-plugin-demos""}, {""href"": ""https://github.com/simonw/datasette/issues/14"", ""label"": ""#14""}]" changelog:id152,changelog,id152,0.18 (2018-04-14),"This release introduces support for units , contributed by Russ Garrett ( #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. 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 an error 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","[""Changelog""]","[{""href"": ""https://docs.datasette.io/en/stable/metadata.html#specifying-units-for-a-column"", ""label"": ""support for units""}, {""href"": ""https://github.com/simonw/datasette/issues/203"", ""label"": ""#203""}, {""href"": ""https://pint.readthedocs.io/en/latest/"", ""label"": ""pint""}]" changelog:id154,changelog,id154,0.17 (2018-04-13),Release 0.17 to fix issues with PyPI,"[""Changelog""]",[] changelog:id155,changelog,id155,0.16 (2018-04-13),"Better mechanism for handling errors; 404s for missing table/database New error mechanism closes #193 404s for missing tables/databases closes #184 long_description in markdown for the new PyPI Hide SpatiaLite system tables. [Russ Garrett] Allow explain select / explain query plan select #201 Datasette inspect now finds primary_keys #195 Ability to sort using form fields (for mobile portrait mode) #199 We now display sort options as a select box plus a descending checkbox, which means you can apply sort orders even in portrait mode on a mobile phone where the column headers are hidden.","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/193"", ""label"": ""#193""}, {""href"": ""https://github.com/simonw/datasette/issues/184"", ""label"": ""#184""}, {""href"": ""https://github.com/simonw/datasette/issues/201"", ""label"": ""#201""}, {""href"": ""https://github.com/simonw/datasette/issues/195"", ""label"": ""#195""}, {""href"": ""https://github.com/simonw/datasette/issues/199"", ""label"": ""#199""}]" changelog:id161,changelog,id161,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. table_rows => table_rows_count , filtered_table_rows => filtered_table_rows_count Renamed properties. Closes #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 Column headers now link to sort/desc sort - refs #189 _sort and _sort_desc parameters for table views Allows for paginated sorted results based on a specified column. Refs #189 Total row count now correct even if _next applied Use .custom_sql() for _group_count implementation (refs #150 ) Make HTML title more readable in query template ( #180 ) [Ryan Pitts] New ?_shape=objects/object/lists param for JSON API ( #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 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 Fixed bug with keyset pagination over compound primary keys Refs #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 Add metadata, if it exists, to heroku temp dir ( #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","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/194"", ""label"": ""#194""}, {""href"": ""https://github.com/simonw/datasette/issues/189"", ""label"": ""#189""}, {""href"": ""https://github.com/simonw/datasette/issues/189"", ""label"": ""#189""}, {""href"": ""https://github.com/simonw/datasette/issues/189"", ""label"": ""#189""}, {""href"": ""https://github.com/simonw/datasette/issues/150"", ""label"": ""#150""}, {""href"": ""https://github.com/simonw/datasette/issues/180"", ""label"": ""#180""}, {""href"": ""https://github.com/simonw/datasette/issues/192"", ""label"": ""#192""}, {""href"": ""https://github.com/simonw/datasette/issues/122"", ""label"": ""#122""}, {""href"": ""https://github.com/simonw/datasette/issues/190"", ""label"": ""#190""}, {""href"": ""https://github.com/simonw/datasette/issues/190"", ""label"": ""#190""}, {""href"": ""https://github.com/simonw/datasette/issues/185"", ""label"": ""#185""}, {""href"": ""https://github.com/simonw/datasette/issues/178"", ""label"": ""#178""}]" changelog:id17,changelog,id17,0.61.1 (2022-03-23),Fixed a bug where databases with a different route from their name (as used by the datasette-hashed-urls plugin ) returned errors when executing custom SQL queries. ( #1682 ),"[""Changelog""]","[{""href"": ""https://datasette.io/plugins/datasette-hashed-urls"", ""label"": ""datasette-hashed-urls plugin""}, {""href"": ""https://github.com/simonw/datasette/issues/1682"", ""label"": ""#1682""}]" changelog:id174,changelog,id174,0.14 (2017-12-09),"The theme of this release is customization: Datasette now allows every aspect of its presentation to be customized either using additional CSS or by providing entirely new templates. Datasette's metadata.json format 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 , as a more powerful alternative to SQL views. extra_css_urls / extra_js_urls in metadata A mechanism in the metadata.json format for adding custom CSS and JS urls. Create a metadata.json file that looks like this: { ""extra_css_urls"": [ ""https://simonwillison.net/static/css/all.bf8cd891642c.css"" ], ""extra_js_urls"": [ ""https://code.jquery.com/jquery-3.2.1.slim.min.js"" ] } Then start datasette like this: datasette mydb.db --metadata=metadata.json The CSS and JavaScript files will be linked in the of every page. You can also specify a SRI (subresource integrity hash) for these assets: { ""extra_css_urls"": [ { ""url"": ""https://simonwillison.net/static/css/all.bf8cd891642c.css"", ""sri"": ""sha384-9qIZekWUyjCyDIf2YK1FRoKiPJq4PHt6tp/ulnuuyRBvazd0hG7pWbE99zvwSznI"" } ], ""extra_js_urls"": [ { ""url"": ""https://code.jquery.com/jquery-3.2.1.slim.min.js"", ""sri"": ""sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g="" } ] } Modern browsers will only execute the stylesheet or JavaScript if the SRI hash matches the content served. You can generate hashes using https://www.srihash.org/ Auto-link column values that look like URLs ( #153 ) CSS styling hooks as classes on the body ( #153 ) Every template now gets CSS classes in the body designed to support custom styling. The index template (the top level page at / ) gets this: The database template ( /dbname/ ) gets this: The table template ( /dbname/tablename ) gets: The row template ( /dbname/tablename/rowid ) gets: The db-x and table-x classes use the database or table names themselves IF they are valid CSS identifiers. If they aren't, we strip any invalid characters out and append a 6 character md5 digest of the original name, in order to ensure that multiple tables which resolve to the same stripped character version still have different CSS classes. Some examples (extracted from the unit tests): ""simple"" => ""simple"" ""MixedCase"" => ""MixedCase"" ""-no-leading-hyphens"" => ""no-leading-hyphens-65bea6"" ""_no-leading-underscores"" => ""no-leading-underscores-b921bc"" ""no spaces"" => ""no-spaces-7088d7"" ""-"" => ""336d5e"" ""no $ characters"" => ""no--characters-59e024"" datasette --template-dir=mytemplates/ argument You can now pass an additional argument specifying a directory to look for custom templates in. Datasette will fall back on the default templates if a template is not found in that directory. Ability to over-ride templates for individual tables/databases. It is now possible to over-ride templates on a per-database / per-row or per- table basis. When you access e.g. /mydatabase/mytable Datasette will look for the following: - table-mydatabase-mytable.html - table.html If you provided a --template-dir argument to datasette serve it will look in that directory first. The lookup rules are as follows: Index page (/): index.html Database page (/mydatabase): database-mydatabase.html database.html Table page (/mydatabase/mytable): table-mydatabase-mytable.html table.html Row page (/mydatabase/mytable/id): row-mydatabase-mytable.html row.html If a table name has spaces or other unexpected characters in it, the template filename will follow the same rules as our custom CSS classes - for example, a table called ""Food Trucks"" will attempt to load the following templates: table-mydatabase-Food-Trucks-399138.html table.html It is possible to extend the default templates using Jinja template inheritance. If you want to customize EVERY row template with some additional content you can do so by creating a row.html template like this: {% extends ""default:row.html"" %} {% block content %}

EXTRA HTML AT THE TOP OF THE CONTENT BLOCK

This line renders the original block:

{{ super() }} {% endblock %} --static option for datasette serve ( #160 ) 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 ) metadata.json support for per-table/per-database metadata ( #165 ) Also added support for descriptions and HTML descriptions. Here's an example metadata.json file illustrating custom per-database and per- table metadata: { ""title"": ""Overall datasette title"", ""description_html"": ""This is a description with HTML."", ""databases"": { ""db1"": { ""title"": ""First database"", ""description"": ""This is a string description & has no HTML"", ""license_url"": ""http://example.com/"", ""license"": ""The example license"", ""queries"": { ""canned_query"": ""select * from table1 limit 3;"" }, ""tables"": { ""table1"": { ""title"": ""Custom title for table1"", ""description"": ""Tables can have descriptions too"", ""source"": ""This has a custom source"", ""source_url"": ""http://example.com/"" } } } } } Renamed datasette build command to datasette inspect ( #130 ) Upgrade to Sanic 0.7.0 ( #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 )","[""Changelog""]","[{""href"": ""https://docs.datasette.io/en/stable/custom_templates.html"", ""label"": ""to be customized""}, {""href"": ""https://docs.datasette.io/en/stable/metadata.html"", ""label"": ""metadata.json format""}, {""href"": ""https://docs.datasette.io/en/stable/sql_queries.html#canned-queries"", ""label"": ""canned queries""}, {""href"": ""https://www.srihash.org/"", ""label"": ""https://www.srihash.org/""}, {""href"": ""https://github.com/simonw/datasette/issues/153"", ""label"": ""#153""}, {""href"": ""https://github.com/simonw/datasette/issues/153"", ""label"": ""#153""}, {""href"": ""https://github.com/simonw/datasette/issues/160"", ""label"": ""#160""}, {""href"": ""https://github.com/simonw/datasette/issues/164"", ""label"": ""#164""}, {""href"": ""https://github.com/simonw/datasette/issues/165"", ""label"": ""#165""}, {""href"": ""https://github.com/simonw/datasette/issues/130"", ""label"": ""#130""}, {""href"": ""https://github.com/simonw/datasette/issues/168"", ""label"": ""#168""}, {""href"": ""https://github.com/channelcat/sanic/releases/tag/0.7.0"", ""label"": ""https://github.com/channelcat/sanic/releases/tag/0.7.0""}, {""href"": ""https://github.com/simonw/datasette/issues/171"", ""label"": ""#171""}]" changelog:id18,changelog,id18,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. URLs within Datasette now use a different encoding scheme for tables or databases that include ""special"" characters outside of the range of a-zA-Z0-9_- . This scheme is explained here: Tilde encoding . ( #1657 ) Removed hashed URL mode from Datasette. The new datasette-hashed-urls plugin can be used to achieve the same result, see datasette-hashed-urls for details. ( #1661 ) Databases can now have a custom path within the Datasette instance that is independent of the database name, using the db.route property. ( #1668 ) Datasette is now covered by a Code of Conduct . ( #1654 ) Python 3.6 is no longer supported. ( #1577 ) Tests now run against Python 3.11-dev. ( #1621 ) New datasette.ensure_permissions(actor, permissions) internal method for checking multiple permissions at once. ( #1675 ) New datasette.check_visibility(actor, action, resource=None) internal method for checking if a user can see a resource that would otherwise be invisible to unauthenticated users. ( #1678 ) Table and row HTML pages now include a element and return a Link: URL; rel=""alternate""; type=""application/json+datasette"" HTTP header pointing to the JSON version of those pages. ( #1533 ) Access-Control-Expose-Headers: Link is now added to the CORS headers, allowing remote JavaScript to access that header. Canned queries are now shown at the top of the database page, directly below the SQL editor. Previously they were shown at the bottom, below the list of tables. ( #1612 ) Datasette now has a default favicon. ( #1603 ) sqlite_stat tables are now hidden by default. ( #1587 ) SpatiaLite tables data_licenses , KNN and KNN2 are now hidden by default. ( #1601 ) SQL query tracing mechanism now works for queries executed in asyncio sub-tasks, such as those created by asyncio.gather() . ( #1576 ) datasette.tracer mechanism is now documented. Common Datasette symbols can now be imported directly from the top-level datasette package, see Import shortcuts . Those symbols are Response , Forbidden , NotFound , hookimpl , actor_matches_allow . ( #957 ) /-/versions page now returns additional details for libraries used by SpatiaLite. ( #1607 ) Documentation now links to the Datasette Tutorials . Datasette will now also look for SpatiaLite in /opt/homebrew - thanks, Dan Peterson. ( #1649 ) Fixed bug where custom pages did not work on Windows. Thanks, Robert Christie. ( #1545 ) Fixed error caused when a table had a column named n . ( #1228 )","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1657"", ""label"": ""#1657""}, {""href"": ""https://github.com/simonw/datasette/issues/1661"", ""label"": ""#1661""}, {""href"": ""https://github.com/simonw/datasette/issues/1668"", ""label"": ""#1668""}, {""href"": ""https://github.com/simonw/datasette/blob/main/CODE_OF_CONDUCT.md"", ""label"": ""Code of Conduct""}, {""href"": ""https://github.com/simonw/datasette/issues/1654"", ""label"": ""#1654""}, {""href"": ""https://github.com/simonw/datasette/issues/1577"", ""label"": ""#1577""}, {""href"": ""https://github.com/simonw/datasette/issues/1621"", ""label"": ""#1621""}, {""href"": ""https://github.com/simonw/datasette/issues/1675"", ""label"": ""#1675""}, {""href"": ""https://github.com/simonw/datasette/issues/1678"", ""label"": ""#1678""}, {""href"": ""https://github.com/simonw/datasette/issues/1533"", ""label"": ""#1533""}, {""href"": ""https://github.com/simonw/datasette/issues/1612"", ""label"": ""#1612""}, {""href"": ""https://github.com/simonw/datasette/issues/1603"", ""label"": ""#1603""}, {""href"": ""https://github.com/simonw/datasette/issues/1587"", ""label"": ""#1587""}, {""href"": ""https://github.com/simonw/datasette/issues/1601"", ""label"": ""#1601""}, {""href"": ""https://github.com/simonw/datasette/issues/1576"", ""label"": ""#1576""}, {""href"": ""https://github.com/simonw/datasette/issues/957"", ""label"": ""#957""}, {""href"": ""https://github.com/simonw/datasette/issues/1607"", ""label"": ""#1607""}, {""href"": ""https://datasette.io/tutorials"", ""label"": ""Datasette Tutorials""}, {""href"": ""https://github.com/simonw/datasette/pull/1649"", ""label"": ""#1649""}, {""href"": ""https://github.com/simonw/datasette/issues/1545"", ""label"": ""#1545""}, {""href"": ""https://github.com/simonw/datasette/issues/1228"", ""label"": ""#1228""}]" changelog:id183,changelog,id183,0.13 (2017-11-24),"Search now applies to current filters. Combined search into the same form as filters. Closes #133 Much tidier design for table view header. Closes #147 Added ?column__not=blah filter. Closes #148 Row page now resolves foreign keys. Closes #132 Further tweaks to select/input filter styling. Refs #86 - thanks for the help, @natbat! Show linked foreign key in table cells. Added UI for editing table filters. Refs #86 Hide FTS-created tables on index pages. Closes #129 Add publish to heroku support [Jacob Kaplan-Moss] datasette publish heroku mydb.db Pull request #104 Initial implementation of ?_group_count=column . URL shortcut for counting rows grouped by one or more columns. ?_group_count=column1&_group_count=column2 works as well. SQL generated looks like this: select ""qSpecies"", count(*) as ""count"" from Street_Tree_List group by ""qSpecies"" order by ""count"" desc limit 100 Or for two columns like this: select ""qSpecies"", ""qSiteInfo"", count(*) as ""count"" from Street_Tree_List group by ""qSpecies"", ""qSiteInfo"" order by ""count"" desc limit 100 Refs #44 Added --build=master option to datasette publish and package. The datasette publish and datasette package commands both now accept an optional --build argument. If provided, this can be used to specify a branch published to GitHub that should be built into the container. This makes it easier to test code that has not yet been officially released to PyPI, e.g.: datasette publish now mydb.db --branch=master Implemented ?_search=XXX + UI if a FTS table is detected. Closes #131 Added datasette --version support. Table views now show expanded foreign key references, if possible. If a table has foreign key columns, and those foreign key tables have label_columns , the TableView will now query those other tables for the corresponding values and display those values as links in the corresponding table cells. label_columns are currently detected by the inspect() function, which looks for any table that has just two columns - an ID column and one other - and sets the label_column to be that second non-ID column. Don't prevent tabbing to ""Run SQL"" button ( #117 ) [Robert Gieseke] See comment in #115 Add keyboard shortcut to execute SQL query ( #115 ) [Robert Gieseke] Allow --load-extension to be set via environment variable. Add support for ?field__isnull=1 ( #107 ) [Ray N] Add spatialite, switch to debian and local build ( #114 ) [Ariel Núñez] Added --load-extension argument to datasette serve. Allows loading of SQLite extensions. Refs #110 .","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/133"", ""label"": ""#133""}, {""href"": ""https://github.com/simonw/datasette/issues/147"", ""label"": ""#147""}, {""href"": ""https://github.com/simonw/datasette/issues/148"", ""label"": ""#148""}, {""href"": ""https://github.com/simonw/datasette/issues/132"", ""label"": ""#132""}, {""href"": ""https://github.com/simonw/datasette/issues/86"", ""label"": ""#86""}, {""href"": ""https://github.com/simonw/datasette/issues/86"", ""label"": ""#86""}, {""href"": ""https://github.com/simonw/datasette/issues/129"", ""label"": ""#129""}, {""href"": ""https://github.com/simonw/datasette/issues/104"", ""label"": ""#104""}, {""href"": ""https://github.com/simonw/datasette/issues/44"", ""label"": ""#44""}, {""href"": ""https://github.com/simonw/datasette/issues/131"", ""label"": ""#131""}, {""href"": ""https://github.com/simonw/datasette/issues/117"", ""label"": ""#117""}, {""href"": ""https://github.com/simonw/datasette/issues/115"", ""label"": ""#115""}, {""href"": ""https://github.com/simonw/datasette/issues/115"", ""label"": ""#115""}, {""href"": ""https://github.com/simonw/datasette/issues/107"", ""label"": ""#107""}, {""href"": ""https://github.com/simonw/datasette/issues/114"", ""label"": ""#114""}, {""href"": ""https://github.com/simonw/datasette/issues/110"", ""label"": ""#110""}]" changelog:id19,changelog,id19,0.60.2 (2022-02-07),Fixed a bug where Datasette would open the same file twice with two different database names if you ran datasette file.db file.db . ( #1632 ),"[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1632"", ""label"": ""#1632""}]" changelog:id198,changelog,id198,0.12 (2017-11-16),"Added __version__ , now displayed as tooltip in page footer ( #108 ). Added initial docs, including a changelog ( #99 ). Turned on auto-escaping in Jinja. Added a UI for editing named parameters ( #96 ). You can now construct a custom SQL statement using SQLite named parameters (e.g. :name ) and datasette will display form fields for editing those parameters. Here’s an example which lets you see the most popular names for dogs of different species registered through various dog registration schemes in Australia. Pin to specific Jinja version. ( #100 ). Default to 127.0.0.1 not 0.0.0.0. ( #98 ). Added extra metadata options to publish and package commands. ( #92 ). You can now run these commands like so: datasette now publish mydb.db \ --title=""My Title"" \ --source=""Source"" \ --source_url=""http://www.example.com/"" \ --license=""CC0"" \ --license_url=""https://creativecommons.org/publicdomain/zero/1.0/"" This will write those values into the metadata.json that is packaged with the app. If you also pass --metadata=metadata.json that file will be updated with the extra values before being written into the Docker image. Added production-ready Dockerfile ( #94 ) [Andrew Cutler] New ?_sql_time_limit_ms=10 argument to database and table page ( #95 ) SQL syntax highlighting with Codemirror ( #89 ) [Tom Dyson]","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/108"", ""label"": ""#108""}, {""href"": ""https://github.com/simonw/datasette/issues/99"", ""label"": ""#99""}, {""href"": ""https://github.com/simonw/datasette/issues/96"", ""label"": ""#96""}, {""href"": ""https://australian-dogs.now.sh/australian-dogs-3ba9628?sql=select+name%2C+count%28*%29+as+n+from+%28%0D%0A%0D%0Aselect+upper%28%22Animal+name%22%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2013%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2014%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28Animal_Name%29+as+name+from+%5BAdelaide-City-Council-dog-registrations-2015%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22AnimalName%22%29+as+name+from+%5BCity-of-Port-Adelaide-Enfield-Dog_Registrations_2016%5D+where+AnimalBreed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5BMitcham-dog-registrations-2015%5D+where+Breed+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22DOG_NAME%22%29+as+name+from+%5Bburnside-dog-registrations-2015%5D+where+DOG_BREED+like+%3Abreed%0D%0A%0D%0Aunion+all+%0D%0A%0D%0Aselect+upper%28%22Animal_Name%22%29+as+name+from+%5Bcity-of-playford-2015-dog-registration%5D+where+Breed_Description+like+%3Abreed%0D%0A%0D%0Aunion+all%0D%0A%0D%0Aselect+upper%28%22Animal+Name%22%29+as+name+from+%5Bcity-of-prospect-dog-registration-details-2016%5D+where%22Breed+Description%22+like+%3Abreed%0D%0A%0D%0A%29+group+by+name+order+by+n+desc%3B&breed=pug"", ""label"": ""Here’s an example""}, {""href"": ""https://github.com/simonw/datasette/issues/100"", ""label"": ""#100""}, {""href"": ""https://github.com/simonw/datasette/issues/98"", ""label"": ""#98""}, {""href"": ""https://github.com/simonw/datasette/issues/92"", ""label"": ""#92""}, {""href"": ""https://github.com/simonw/datasette/issues/94"", ""label"": ""#94""}, {""href"": ""https://github.com/simonw/datasette/issues/95"", ""label"": ""#95""}, {""href"": ""https://github.com/simonw/datasette/issues/89"", ""label"": ""#89""}]" changelog:id2,changelog,id2,0.64.6 (2023-12-22),Fixed a bug where CSV export with expanded labels could fail if a foreign key reference did not correctly resolve. ( #2214 ),"[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/2214"", ""label"": ""#2214""}]" changelog:id20,changelog,id20,0.60.1 (2022-01-20),"Fixed a bug where installation on Python 3.6 stopped working due to a change to an underlying dependency. This release can now be installed on Python 3.6, but is the last release of Datasette that will support anything less than Python 3.7. ( #1609 )","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1609"", ""label"": ""#1609""}]" changelog:id208,changelog,id208,0.11 (2017-11-14),"Added datasette publish now --force option. This calls now with --force - useful as it means you get a fresh copy of datasette even if Now has already cached that docker layer. Enable --cors by default when running in a container.","[""Changelog""]",[] changelog:id209,changelog,id209,0.10 (2017-11-14),"Fixed #83 - 500 error on individual row pages. Stop using sqlite WITH RECURSIVE in our tests. The version of Python 3 running in Travis CI doesn't support this.","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/83"", ""label"": ""#83""}]" changelog:id21,changelog,id21,0.60 (2022-01-13),,"[""Changelog""]",[] changelog:id211,changelog,id211,0.9 (2017-11-13),"Added --sql_time_limit_ms and --extra-options . The serve command now accepts --sql_time_limit_ms for customizing the SQL time limit. The publish and package commands now accept --extra-options which can be used to specify additional options to be passed to the datasite serve command when it executes inside the resulting Docker containers.","[""Changelog""]",[] changelog:id212,changelog,id212,0.8 (2017-11-13),"V0.8 - added PyPI metadata, ready to ship. Implemented offset/limit pagination for views ( #70 ). Improved pagination. ( #78 ) Limit on max rows returned, controlled by --max_returned_rows option. ( #69 ) If someone executes 'select * from table' against a table with a million rows in it, we could run into problems: just serializing that much data as JSON is likely to lock up the server. Solution: we now have a hard limit on the maximum number of rows that can be returned by a query. If that limit is exceeded, the server will return a ""truncated"": true field in the JSON. This limit can be optionally controlled by the new --max_returned_rows option. Setting that option to 0 disables the limit entirely.","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/70"", ""label"": ""#70""}, {""href"": ""https://github.com/simonw/datasette/issues/78"", ""label"": ""#78""}, {""href"": ""https://github.com/simonw/datasette/issues/69"", ""label"": ""#69""}]" changelog:id22,changelog,id22,0.59.4 (2021-11-29),"Fixed bug where columns with a leading underscore could not be removed from the interactive filters list. ( #1527 ) Fixed bug where columns with a leading underscore were not correctly linked to by the ""Links from other tables"" interface on the row page. ( #1525 ) Upgraded dependencies aiofiles , black and janus .","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1527"", ""label"": ""#1527""}, {""href"": ""https://github.com/simonw/datasette/issues/1525"", ""label"": ""#1525""}]" changelog:id23,changelog,id23,0.59.3 (2021-11-20),"Fixed numerous bugs when running Datasette behind a proxy with a prefix URL path using the base_url setting. A live demo of this mode is now available at datasette-apache-proxy-demo.datasette.io/prefix/ . ( #1519 , #838 ) ?column__arraycontains= and ?column__arraynotcontains= table parameters now also work against SQL views. ( #448 ) ?_facet_array=column no longer returns incorrect counts if columns contain the same value more than once.","[""Changelog""]","[{""href"": ""https://datasette-apache-proxy-demo.datasette.io/prefix/"", ""label"": ""datasette-apache-proxy-demo.datasette.io/prefix/""}, {""href"": ""https://github.com/simonw/datasette/issues/1519"", ""label"": ""#1519""}, {""href"": ""https://github.com/simonw/datasette/issues/838"", ""label"": ""#838""}, {""href"": ""https://github.com/simonw/datasette/issues/448"", ""label"": ""#448""}]" changelog:id24,changelog,id24,0.59.2 (2021-11-13),"Column names with a leading underscore now work correctly when used as a facet. ( #1506 ) Applying ?_nocol= to a column no longer removes that column from the filtering interface. ( #1503 ) Official Datasette Docker container now uses Debian Bullseye as the base image. ( #1497 ) Datasette is four years old today! Here's the original release announcement from 2017.","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1506"", ""label"": ""#1506""}, {""href"": ""https://github.com/simonw/datasette/issues/1503"", ""label"": ""#1503""}, {""href"": ""https://github.com/simonw/datasette/issues/1497"", ""label"": ""#1497""}, {""href"": ""https://simonwillison.net/2017/Nov/13/datasette/"", ""label"": ""original release announcement""}]" changelog:id25,changelog,id25,0.59.1 (2021-10-24),"Fix compatibility with Python 3.10. ( #1482 ) Documentation on how to use Named parameters with integer and floating point values. ( #1496 )","[""Changelog""]","[{""href"": ""https://github.com/simonw/datasette/issues/1482"", ""label"": ""#1482""}, {""href"": ""https://github.com/simonw/datasette/issues/1496"", ""label"": ""#1496""}]" changelog:id26,changelog,id26,0.59 (2021-10-14),"Columns can now have associated metadata descriptions in metadata.json , see Column descriptions . ( #942 ) New register_commands() plugin hook allows plugins to register additional Datasette CLI commands, e.g. datasette mycommand file.db . ( #1449 ) Adding ?_facet_size=max to a table page now shows the number of unique values in each facet. ( #1423 ) Upgraded dependency httpx 0.20 - the undocumented allow_redirects= parameter to datasette.client is now follow_redirects= , and defaults to False where it previously defaulted to True . ( #1488 ) The --cors option now causes Datasette to return the Access-Control-Allow-Headers: Authorization header, in addition to Access-Control-Allow-Origin: * . ( #1467 ) Code that figures out which named parameters a SQL query takes in order to display form fields for them is no longer confused by strings that contain colon characters. ( #1421 ) Renamed --help-config option to --help-settings . ( #1431 ) datasette.databases property is now a documented API. ( #1443 ) The base.html template now wraps everything other than the