CircuitPython Manager#

PyPI Status Python Version License

Read the documentation at https://circman.readthedocs.io/ Tests Codecov

pre-commit Black

CircuitPython Manager helps with deploying projects to CircuitPython devices.

Features#

  • Automatically detects CircuitPython device path.

  • Backs up the CircuitPython device before deploying to allow recovery.

  • Simple command to restore a backup to the CircuitPython device in case something goes wrong.

Requirements#

  • Linux. May work elsewhere but not tested.

Installation#

You can install CircuitPython Manager via pip from PyPI:

$ pip install circman

Quick Start#

Connect your CircuitPython device to your computer using USB and wait for the mount to appear.

Change to the directory of your CircuitPython project. The default is for the project source code to be in src/ relative to the project directory.

Then run the deploy.

$ circman deploy

A backup of the CircuitPython device will be created and then the project source code will be copied to the CircuitPython device.

If you need to restore the code from before the deploy use the restore command.

$ circman restore

To list all available backups:

$ circman list

If you made a change directly on the CircuitPython device you can copy it back to the project source directory. The default destination directory is src/. No backup of the destination is created prior to copying so use with caution. Ideally the destination directory is under version control to identify changes and restore if needed.

$ circman sync

Usage#

Please see the Command-line Reference for details.

Contributing#

Contributions are very welcome. To learn more, see the Contributor Guide.

License#

Distributed under the terms of the MIT license, CircuitPython Manager is free and open source software.

Issues#

If you encounter any problems, please file an issue along with a detailed description.

Credits#

Device path detection code (find_device()) was copied from Adafruit’s circup project.

This project was generated from @cjolowicz’s Hypermodern Python Cookiecutter template.