Data loves metadata. Any time you run Datasette you can optionally include a JSON file with metadata about your databases and tables. Datasette will then display that information in the web UI.
The above metadata will be displayed on the index page of your Datasette-powered site. The source and license information will also be included in the footer of every page served by Datasette.
Any special HTML characters in description will be escaped. If you want to include HTML in your description, you can use a description_html property instead.
Metadata at the top level of the JSON will be shown on the index page and in the footer on every page of the site. The license and source is expected to apply to all of your data.
Each of the top-level metadata fields can be used at the database and table level.
Datasette supports attaching units to a column, which will be used when displaying values from that column. SI prefixes will be used where appropriate.
This will restrict sorting of example_table to just the height and weight columns.
Datasette’s HTML interface attempts to display foreign key references as labelled hyperlinks. By default, it looks for referenced tables that only have two columns: a primary key column and one other. It assumes that the second column should be used as the link label.
You can replace any of the null values with a JSON string to populate that piece of metadata.
© Copyright 2018, Simon Willison Revision 11b352b4.