Skip to content

Commit

Permalink
How to use the datasette-plugin template, refs #687, closes #855
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 22, 2020
1 parent 751e7b4 commit 74889aa
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions docs/writing_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,19 @@ Now you can navigate to http://localhost:8001/mydb and run this SQL::

To see the output of your plugin.

Writing an installable plugin
-----------------------------

Plugins that can be installed should be written as Python packages using a ``setup.py`` file.

The easiest way to start writing one an installable plugin is to use the `datasette-plugin <https://github.com/simonw/datasette-plugin>`__ cookiecutter template. This creates a new plugin structure for you complete with an example test and GitHub Actions workflows for testing and publishing your plugin.

`Install cookiecutter <https://cookiecutter.readthedocs.io/en/1.7.2/installation.html>`__ and then run this command to start building a plugin using the template::

cookiecutter gh:simonw/datasette-plugin

Read `a cookiecutter template for writing Datasette plugins <https://simonwillison.net/2020/Jun/20/cookiecutter-plugins/>`__ for more information about this template.

Packaging a plugin
------------------

Expand Down

0 comments on commit 74889aa

Please sign in to comment.