Instructions on how build and deploy picozero.


To build and deploy picozero, you need to install the dependencies

pip3 install twine sphinx


  1. Update version numbers in the, picozero/, and docs/ files

  2. Add release to docs/changelog.rst

  3. Run and create a source distribution

    python3 sdist
  4. Upload to PyPI

    twine upload dist/*
  5. Push all changes to master branch

  6. Create a release in github and upload picozero-#-#-#.tar.gz source file to the release


The documentation site is built using Sphinx.

Install sphinx using

pip3 install sphinx

To test the documentation build, run the following command from the docs directory

$ ./make html

The website will be built in the directory docs/_build/html.

Documentation can be viewed at and is automatically built and deployed on push to github.


The tests are designed to be run on a Raspberry Pi Pico.

  1. Install the picozero package

  2. Install the micropython-unittest package

  3. Copy the file to the Pico

  4. Run the file

If a test fails, it is helpful to be able to see verbose error messages. To see error messages, you need to modify the lib/ file on the Pico.

Locate the following code in the run_class function:

# Uncomment to investigate failure in detail

Uncomment raise:

# Uncomment to investigate failure in detail