Skip to main content

A command-line tool for uploading and running code on CircuitPython devices

Project description

circremote

A command-line tool for uploading and running Python code on CircuitPython devices via serial or Web Workflow websocket connections, with support for dependency management and sensor libraries.

A few examples:

# simple I2C scanner on locally connected device
circremote /dev/ttyUSB0 scan-i2c

# show the contents of settings.toml on a Web Workflow device
circremote 192.168.1.23:8080 -p PASSWORD cat settings.toml

# run Adafruit's I2C scanner on a device with the nickname feather-s3
circremote feather-s3 https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/I2C_Scanners/circuitpython/code.py

# help
circremote -h

Overview

circremote is a utility program that allows you to easily upload and run code on a CircuitPython device without disturbing code.py.

It works with devices connected over USB and over a network connection to devices that support and are configured for the Web Workflow.

It includes a library of small programs ("commands") which perform utility functions like scanning the I2C bus or cleaning up undesired files from the internal flash filesystem, as well as example programs that work with a variety of sensors and other devices.

It can run the commands included with it, your own commands from anywhere in the filesystem, and commands that it loads over HTTP/HTTPS. It can easily execute example programs from Github.

Commands can include a requirements.txt file and circup will automatically be run to install them. Commands can also take arguments, so you can (for instance) pass the I2C SDA and SCL pins to a command, or specify the address of a sensor.

For your convenience you can also configure aliases for devices and commands. It can also pull code from a web server, so you can run Adafruit example code directly from Github if you want.

It does not currently support Microsoft Windows. I do not have a Windows machine and have no way to test it with Windows. I understand that a lot of people use Windows and that the lack of support means that a lot of people who might benefit from circremote won't be able to use it. While I'm happy to spend some time and resources on continuing to develop circremote and support users, I don't have the time, energy or desire to bring up a new platform and get it working on it. If a motivated co-maintainer comes along who'd like to get circremote working properly with Windows and then support it, I'd be happy to bring someone like that onto the project.

Rough Edges

There are still some rough edges in dealing with program termination and resuming code.py (the "double exit" mode). Programs can continue running indefinitely, which may or may not be desired. Many commands are untested because I either don't have the hardware or haven't had the time to get to them.

Getting Help

If you run into problems, first - if you're using Microsoft Windows, this is currently unsupported and we cannot help you.

Please review the FAQ.

If you're unable to resolve the problem with circremote file an issue here on Github.

General CircuitPython help is available at [#help-with-circuitpython on Adafruit's Discord server[(https://discord.com/channels/327254708534116352/537365702651150357) and at r/circuitpython on Reddit.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • CircuitPython community for the excellent ecosystem
  • Adafruit for the sensor libraries
  • Python community for, well... Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circremote-0.10.1.tar.gz (116.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

circremote-0.10.1-py3-none-any.whl (151.7 kB view details)

Uploaded Python 3

File details

Details for the file circremote-0.10.1.tar.gz.

File metadata

  • Download URL: circremote-0.10.1.tar.gz
  • Upload date:
  • Size: 116.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for circremote-0.10.1.tar.gz
Algorithm Hash digest
SHA256 3ab37aa57664db61e66950eae1d9b219b544340c5afc95ab5b0fb1e3d2a69373
MD5 e6df4a3f28dd5dfc5a85c97ddfeee54e
BLAKE2b-256 02664f3b9339fd93e6e016f57fceca4515ab3200c7f3b1a8bb7598956a796a23

See more details on using hashes here.

File details

Details for the file circremote-0.10.1-py3-none-any.whl.

File metadata

  • Download URL: circremote-0.10.1-py3-none-any.whl
  • Upload date:
  • Size: 151.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for circremote-0.10.1-py3-none-any.whl
Algorithm Hash digest
SHA256 345d80d8cc8a53aba9d20ab95b3277623a4ac23c4e905084399c80beeb765215
MD5 85441f908554f38dc9d39366723b236f
BLAKE2b-256 776282ae4326a56d1170101024759e668f983afd182936f26e30bf5a45aa313d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page