Skip to content

GitHub template repository for creating new Datasette plugins, using the simonw/datasette-plugin cookiecutter template

Notifications You must be signed in to change notification settings

simonw/datasette-plugin-template-repository

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

Template repository for creating new Datasette plugins

This GitHub template repository can be used to create a new repository with the skeleton of a Datasette plugin, based on the datasette-plugin cookiecutter.

Start here: https://github.com/simonw/datasette-plugin-template-repository/generate

Call your new repository datasette-something - where the `something' describes your new plugin. You can use additional hyphens - examples of valid plugin repository names include:

  • datasette-places-on-a-map
  • datasette-emoji

Add a one-line description of your repository, then click "Create repository from template".

Screenshot of the create repository form

Once created, your new repository will execute a GitHub Actions workflow that uses cookiecutter to rewrite the repository to the desired state. This make take 30 seconds or so.

You can see an example of a repository generated using this template here:

GitHub Actions setup by this repository

The test.yml GitHub Actions workflow will run your tests automatically any time you push a change to the repo.

The publish.yml Action runs when you create a new GitHub release. It will build and upload your package to PyPI.

For this to work, you need to create an environment in your GitHub repository called release. You then need to configure PyPI with a new "pending publisher" with the following settings:

  • PyPI Project Name: datasette-name-of-your-plugin
  • Owner: Your GitHub username or organization
  • Repository name: The name of your repository
  • Workflow name: publish.yml
  • Environment name: release

See Publish releases to PyPI from GitHub Actions without a password or token for details.

About

GitHub template repository for creating new Datasette plugins, using the simonw/datasette-plugin cookiecutter template

Resources

Stars

Watchers

Forks

Sponsor this project