datasette-pins — a new Datasette plugin for pinning tables and queries

datasette-pins is a new Datasette plugin that allows you to "pin" specific databases, tables, and queries to your Datasette homepage. It's part of a much larger redesign of the Datasette experience. Try it out!

datasette-pins is a new open-source Datasette plugin that allows you to "pin" items like databases, tables, and queries to your Datasette homepage.

Usually, the Datasette homepage only shows top-level databases and a few tables. But that's not very friendly or easy to use! Typically, you only care about a specific table or query at a time, so we hope these pins can act like shortcuts to get you where you want faster.

datasette-pins can be configured to give specific users "write" permissions, allowing them to pin items. This option can be found in the database, table, and query action menus:

How datasette-pins works

This plugin uses the new internal database to store pinned items. This means pins persistent across restarts, as long as you provide a path to an internal database at startup like so:

bash datasette my_data.db --internal internal.db

Pinned items will be stored in datasette_pins_* tables inside internal.db. You will never have to manually edit these tables, the plugin will do all the work for you! This internal database feature is only a part of Datasette 1.0 alpha releases.

We use the new top_homepage() "template slot" to inject new content on top section of the homepage. This is a new plugin hook only available in recent Datasette 1.0 alpha releases.

Let us know what you think!

Try it out and tell us what you think! We eventually want to add more features, like "personal" pins and pinning plugin pages, and customizing how your pins appear. File an issue on GitHub with any bugs or ideas you come up with.