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.0.tar.gz (115.4 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.0-py3-none-any.whl (151.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: circremote-0.10.0.tar.gz
  • Upload date:
  • Size: 115.4 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.0.tar.gz
Algorithm Hash digest
SHA256 a13bbcc66f316a1a6ce4d73c13f0223080dc904c00751f90aca1b9249199d550
MD5 6e321e800cebb4e99b6c3e575b4053ef
BLAKE2b-256 dad68a911b8d02a298c15db84b16fa31e88046e54081f4ed7fc968912c52f396

See more details on using hashes here.

File details

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

File metadata

  • Download URL: circremote-0.10.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 354ed847216fbf6cfcf1b4c3ca0f577e27127538faccf070a88a0f00ab3c0701
MD5 b3d68febf7efb9d72c6e371ed5ba82c8
BLAKE2b-256 3d89d0b2ccfa4a91e5e842af75fce0769779dd29aa341df4e4b0252af318fbd4

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