Copier template for a Mopidy extension.
The template sets up a project with:
-
README.md
: a readme explaining how to install and configure the extension, as well as how to contribute to the project, -
LICENSE
: the Apache License, Version 2.0, -
src/
: the skeleton of a Mopidy extension, -
tests/
: the skeleton of a test suite, -
pyproject.toml
: configuration for all of the development tools:- packaging and distribution with setuptools,
- testing with pytest,
- type checking with Pyright,
- formatting and linting with Ruff,
- multi-environment testing with tox,
-
.github/workflows/ci.yml
: a GitHub Actions workflow for continuous integration, running all the tox environments, with test coverage reporting to Codecov, -
.github/workflows/release.yml
: a GitHub Actions workflow for automatically publishing the extension to PyPI when a GitHub Release is created.
-
Create a new empty Git repo for your Mopidy extension:
mkdir mopidy-foobar cd mopidy-foobar git init
-
Generate the skeleton of a new Mopidy extension by using uv to run Copier with this extension template:
uvx copier copy gh:mopidy/cookiecutter-mopidy-ext .
-
Make your Mopidy extension do something. To learn more about creating Mopidy extensions, please read the docs on extension development.
-
Release the extension to PyPI by following the instructions in the generated
README.md
file.
When this template is updated, you can update your extension to the latest tagged version of this template by running:
cd mopidy-foobar
uvx copier update .
For details on how this works, see Copier's update documentation .