• Stars
    star
    124
  • Rank 288,207 (Top 6 %)
  • Language
    Python
  • License
    MIT License
  • Created about 5 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CircuitPython library updater.

CircUp

Documentation Status Discord Build Status Code Style: Black

A tool to manage and update libraries (modules) on a CircuitPython device.

Circup requires Python 3.5 or higher.

In a virtualenv, pip install circup should do the trick. This is the simplest way to make it work.

If you have no idea what a virtualenv is, try the following command, pip3 install --user circup.

Note

If you use the pip3 command to install CircUp you must make sure that your path contains the directory into which the script will be installed. To discover this path,

  • On Unix-like systems, type python3 -m site --user-base and append bin to the resulting path.
  • On Windows, type the same command, but append Scripts to the resulting path.

Each CircuitPython library on the device usually has a version number as metadata within the module.

This utility looks at all the libraries on the device and checks if they are the most recent (compared to the versions found in the most recent version of the Adafruit CircuitPython Bundle and Circuitpython Community Bundle). If the libraries are out of date, the utility helps you update them.

The Adafruit CircuitPython Bundle can be found here:

https://github.com/adafruit/Adafruit_CircuitPython_Bundle/releases/latest

Full details of these libraries, what they're for and how to get them, can be found here:

https://circuitpython.org/libraries

The Circuitpython Community Bundle can be found here:

https://github.com/adafruit/CircuitPython_Community_Bundle/releases/latest

If you need more detailed help using Circup see the Learn Guide article "Use CircUp to easily keep your CircuitPython libraries up to date".

First, plug in a device running CircuiPython. This should appear as a mounted storage device called CIRCUITPY.

To get help, just type the command:

$ circup
Usage: circup [OPTIONS] COMMAND [ARGS]...

  A tool to manage and update libraries on a CircuitPython device.

Options:
  --verbose           Comprehensive logging is sent to stdout.
  --path DIRECTORY    Path to CircuitPython directory. Overrides automatic
                      path detection.
  --host TEXT         Hostname or IP address of a device. Overrides automatic
                      path detection.
  --password TEXT     Password to use for authentication when --host is used.
  --board-id TEXT     Manual Board ID of the CircuitPython device. If provided
                      in combination with --cpy-version, it overrides the
                      detected board ID.
  --cpy-version TEXT  Manual CircuitPython version. If provided in combination
                      with --board-id, it overrides the detected CPy version.
  --version           Show the version and exit.
  --help              Show this message and exit.

Commands:
  bundle-add     Add bundles to the local bundles list, by "user/repo"...
  bundle-remove  Remove one or more bundles from the local bundles list.
  bundle-show    Show the list of bundles, default and local, with URL,...
  freeze         Output details of all the modules found on the connected...
  install        Install a named module(s) onto the device.
  list           Lists all out of date modules found on the connected...
  show           Show a list of available modules in the bundle.
  uninstall      Uninstall a named module(s) from the connected device.
  update         Update modules on the device. Use --all to automatically
                 update all modules without Major Version warnings.

To automatically install all modules imported by code.py, $ circup install --auto:

$ circup install --auto
Found device at /Volumes/CIRCUITPY, running CircuitPython 7.0.0-alpha.5.
Searching for dependencies for: ['adafruit_bmp280']
Ready to install: ['adafruit_bmp280', 'adafruit_bus_device', 'adafruit_register']

Installed 'adafruit_bmp280'.
Installed 'adafruit_bus_device'.
Installed 'adafruit_register'.

To search for a specific module containing the name bme: $ circup show bme:

$ circup show bme
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.1.0-beta.2.
adafruit_bme280
adafruit_bme680
2 shown of 257 packages.

To show version information for all the modules currently on a connected CIRCUITPYTHON device:

$ circup freeze
adafruit_binascii==v1.0
adafruit_bme280==2.3.1
adafruit_ble==1.0.2

With $ circup freeze -r, Circup will save, in the current working directory, a requirements.txt file with a list of all modules currently installed on the connected device.

To list all the modules that require an update:

$ circup list
The following modules are out of date or probably need an update.

Module             Version  Latest
------------------ -------- --------
adafruit_binascii  v1.0     1.0.1
adafruit_ble       1.0.2    4.0

To interactively update the out-of-date modules:

$ circup update
Found 3 module[s] needing update.
Please indicate which modules you wish to update:

Update 'adafruit_binascii'? [y/N]: Y
OK
Update 'adafruit_ble'? [y/N]: Y
OK

Install a module or modules onto the connected device with:

$ circup install adafruit_thermal_printer
Installed 'adafruit_thermal_printer'.

$ circup install adafruit_thermal_printer adafruit_bus_io
Installed 'adafruit_thermal_printer'.
Installed 'adafruit_bus_io'.

If you need to work with the original .py version of a module, use the --py flag.

$ circup install --py adafruit_thermal_printer Installed 'adafruit_thermal_printer'.

You can also install a list of modules from a requirements.txt file in the current working directory with:

$ circup install -r requirements.txt
Installed 'adafruit_bmp280'.
Installed 'adafruit_lis3mdl'.
Installed 'adafruit_lsm6ds'.
Installed 'adafruit_sht31d'.
Installed 'neopixel'.

Uninstall a module or modules like this:

$ circup uninstall adafruit_thermal_printer
Uninstalled 'adafruit_thermal_printer'.

$ circup uninstall adafruit_thermal_printer adafruit_bus_io
Uninstalled 'adafruit_thermal_printer'.
Uninstalled 'adafruit_bus_io'.

Use the --verbose flag to see the logs as the command is working:

$ circup --verbose freeze
Logging to /home/ntoll/.cache/circup/log/circup.log

10/18/2020 00:54:43 INFO: ### Started Circup ###
10/18/2020 00:54:43 INFO: Found device: /Volumes/CIRCUITPY
Found device at /Volumes/CIRCUITPY, running CircuitPython 6.0.0-alpha.1-1352-gf0b37313c.
10/18/2020 00:54:44 INFO: Freeze
10/18/2020 00:54:44 INFO: Found device: /Volumes/CIRCUITPY
... etc ...

The --path flag let's you pass in a different path to the CircuitPython mounted volume. This is helpful when you have renamed or have more than one CircuitPython devices attached:

$ circup --path /run/media/user/CIRCUITPY1 list

The --version flag will tell you the current version of the circup command itself:

$ circup --version
CircUp, A CircuitPython module updater. Version 0.0.1

To use circup via the Web Workflow. on devices that support it. Use the --host and --password arguments before your circup command.:

$ circup --host 192.168.1.119 --password s3cr3t install adafruit_hid
$ circup --host cpy-9573b2.local --password s3cr3t install adafruit_hid

That's it!

When enabled, circup will autocomplete library names, simliar to other command line tools.

For example:

circup install n + tab -circup install neopixel (+tab: offers neopixel and neopixel_spi completions)

circup install a + tab -circup install adafruit\_ + m a g + tab -circup install adafruit_magtag

In order to activate shell completion, you need to inform your shell that completion is available for your script. Any Click application automatically provides support for that.

For Bash, add this to ~/.bashrc:

eval "$(_CIRCUP_COMPLETE=bash_source circup)"

For Zsh, add this to ~/.zshrc:

eval "$(_CIRCUP_COMPLETE=zsh_source circup)"

For Fish, add this to ~/.config/fish/completions/foo-bar.fish:

eval (env _CIRCUP_COMPLETE=fish_source circup)

Open a new shell to enable completion. Or run the eval command directly in your current shell to enable it temporarily. ### Activation Script

The above eval examples will invoke your application every time a shell is started. This may slow down shell startup time significantly.

Alternatively, export the generated completion code as a static script to be executed. You can ship this file with your builds; tools like Git do this. At least Zsh will also cache the results of completion files, but not eval scripts.

For Bash:

_CIRCUP_COMPLETE=bash_source circup circup-complete.sh

For Zsh:

_CIRCUP_COMPLETE=zsh_source circup circup-complete.sh

For Fish:

_CIRCUP_COMPLETE=fish_source circup circup-complete.sh

In .bashrc or .zshrc, source the script instead of the eval command:

. /path/to/circup-complete.sh

For Fish, add the file to the completions directory:

_CIRCUP_COMPLETE=fish_source circup ~/.config/fish/completions/circup-complete.fish

Note

If you find a bug, or you want to suggest an enhancement or new feature feel free to create an issue or submit a pull request here:

https://github.com/adafruit/circup

Discussion of this tool happens on the Adafruit CircuitPython Discord channel.

More Repositories

1

Adafruit_NeoPixel

Arduino library for controlling single-wire LED pixels (NeoPixel, WS2812, etc.)
C++
2,862
star
2

Adafruit-GFX-Library

Adafruit GFX graphics core Arduino library, this is the 'core' class that all our other graphics libraries derive from
C
2,111
star
3

DHT-sensor-library

Arduino library for DHT11, DHT22, etc Temperature & Humidity Sensors
C++
1,835
star
4

Fritzing-Library

Adafruit parts, components, breakouts, etc...in Fritzable format!
1,605
star
5

Adafruit_SSD1306

Arduino library for SSD1306 monochrome 128x64 and 128x32 OLEDs
C++
1,587
star
6

Adafruit-Raspberry-Pi-Python-Code

Adafruit library code for Raspberry Pi
1,414
star
7

Adafruit_Python_DHT

Python library to read the DHT series of humidity and temperature sensors on a Raspberry Pi or Beaglebone Black.
C
1,091
star
8

Adafruit-Eagle-Library

Slowly building up a collection of parts we use here ... This file includes some library parts from microbuilder.eu Most of 'em are either Eagle parts that I've changed a little to make them easier to solder, some are 'handmade' and a few are from microbuilder.eu Its released into the Public Domain - that means you can do whatever you want. We'd like it if you kept the author email/url in the part description, just so we can be alerted if there are errors. Enjoy!
1,005
star
9

Adafruit_Learning_System_Guides

Programs and scripts to display "inline" in Adafruit Learning System guides
C
990
star
10

Adafruit_Sensor

Common sensor library
C++
887
star
11

Adafruit-Pi-Finder

Find and set up your brand new Raspberry Pi
JavaScript
844
star
12

Adafruit_CAD_Parts

CAD files for various boards, components and parts
SMT
829
star
13

RTClib

A fork of Jeelab's fantastic RTC Arduino library
C++
760
star
14

Adafruit_CircuitPython_Bundle

A bundle of useful CircuitPython libraries ready to use from the filesystem.
Shell
737
star
15

awesome-circuitpython

A curated list of awesome CircuitPython guides, videos, libraries, frameworks, software and resources.
620
star
16

Adafruit_nRF52_Arduino

Adafruit code for the Nordic nRF52 BLE SoC on Arduino
C
608
star
17

Adafruit_MQTT_Library

Arduino library for MQTT support
C++
541
star
18

Adafruit_Python_SSD1306

Python library to use SSD1306-based 128x64 or 128x32 pixel OLED displays with a Raspberry Pi or Beaglebone Black.
Python
519
star
19

Adafruit-ST7735-Library

This is a library for the Adafruit 1.8" SPI display http://www.adafruit.com/products/358 and http://www.adafruit.com/products/618
C++
495
star
20

Adafruit_TinyUSB_Arduino

Arduino library for TinyUSB
C
483
star
21

Adafruit-WebIDE

This is a simple editor to be used on the Raspberry Pi (or anywhere?).
JavaScript
474
star
22

adafruit-beaglebone-io-python

Adafruit's BeagleBone IO Python Library
C
465
star
23

Adafruit_GPS

An interrupt-based GPS Arduino library for no-parsing-required use
C++
450
star
24

pi_video_looper

Application to turn your Raspberry Pi into a dedicated looping video playback device, good for art installations, information displays, or just playing cat videos all day.
Python
442
star
25

Adafruit_nRF52_Bootloader

USB-enabled bootloaders for the nRF52 BLE SoC chips
C
437
star
26

Adafruit-PWM-Servo-Driver-Library

Adafruit PWM Servo Driver Library
C++
436
star
27

Adafruit-PN532

Arduino library for SPI and I2C access to the PN532 RFID/Near Field Communication chip
C++
397
star
28

Adafruit_Python_GPIO

DEPRECATED! Please use Adafruit Blinka instead (was: Library to provide a cross-platform GPIO interface on the Raspberry Pi and Beaglebone Black using the RPi.GPIO and Adafruit_BBIO libraries.)
Python
393
star
29

Adafruit_Python_BluefruitLE

Python library to simplify access to Bluetooth low energy devices and services on Linux (using bluez) and Mac OSX.
Python
390
star
30

Adafruit-PCD8544-Nokia-5110-LCD-library

Arduino driver for PC8544, most commonly found in small Nokia 5110's
C++
385
star
31

Adafruit_Blinka

Add CircuitPython hardware API and libraries to MicroPython & CPython devices
Python
384
star
32

Adafruit_CircuitPython_HID

USB Human Interface Device drivers.
Python
374
star
33

Adafruit-Fingerprint-Sensor-Library

Arduino library for interfacing to the fingerprint sensor in the Adafruit shop
C++
364
star
34

Adafruit_ILI9341

Library for Adafruit ILI9341 displays
C++
357
star
35

Adafruit-Retrogame

Raspberry Pi GPIO-to-virtual-keyboard utility for classic game emulators
C
348
star
36

Raspberry-Pi-Installer-Scripts

Shell
348
star
37

Adafruit-Motor-Shield-library

Adafruit Motor shield V1 firmware with basic Microstepping support. Works with all Arduinos and the Mega
C++
329
star
38

Adafruit-MCP23017-Arduino-Library

Arduino Library for Adafruit MCP23017
C++
322
star
39

Adafruit_BME280_Library

Arduino Library for BME280 sensors
C++
312
star
40

Adafruit_BNO055

Unified sensor driver for the Adafruit BNO055 orientation sensor breakout
C++
308
star
41

TFTLCD-Library

Arduino library for 8-bit TFT LCDs such as ILI9325, ILI9328, etc
C
301
star
42

Adafruit-Thermal-Printer-Library

Arduino Library for Small Thermal Printers
C++
300
star
43

Reference-Cards

Business card-sized references for Arduino and basic electronics
294
star
44

Adafruit_LED_Backpack

Adafruit LED Backpack Library for our various LED backpacks.
C++
286
star
45

Adafruit_CircuitPython_NeoPixel

CircuitPython drivers for neopixels.
Python
277
star
46

RGB-matrix-Panel

Arduino library and example code for the 16x32 RGB matrix panels in the shop
C++
275
star
47

Adafruit_CC3000_Library

Library code for Adafruit's CC3000 WiFi breakouts &c
C++
270
star
48

Adafruit_ADS1X15

Driver for TI's ADS1015: 12-bit Differential or Single-Ended ADC with PGA and Comparator
C++
268
star
49

Adafruit_Python_PCA9685

Python code to use the PCA9685 PWM servo/LED controller with a Raspberry Pi or BeagleBone black.
Python
258
star
50

Adafruit_TouchScreen

Arduino library for 4-wire resistive touchscreens
C++
251
star
51

Adafruit_CircuitPython_SSD1306

Adafruit CircuitPython framebuf driver for SSD1306 or SSD1305 OLED displays. Not for use with displayio. See README.
Python
249
star
52

Adafruit_BMP280_Library

Arduino Library for BMP280 sensors
C++
230
star
53

Adafruit-BMP085-Library

A powerful but easy to use BMP085/BMP180 Arduino library
C++
223
star
54

Adafruit_SleepyDog

Arduino library to use the watchdog timer for system reset and low power sleep.
C++
218
star
55

Python-Thermal-Printer

Python
213
star
56

Adafruit_IO_Python

Adafruit IO Python Client Library
Python
213
star
57

LPD8806

Arduino library for LED strips and pixels using LPD8806 (and probably LPD8803/LPD8809)
C++
210
star
58

Adalight

Processing
210
star
59

Adafruit_Python_CharLCD

Python library for accessing Adafruit character LCDs from a Raspberry Pi or BeagleBone Black.
Python
208
star
60

Adafruit_FONA

Arduino library for the Adafruit FONA
C++
206
star
61

Adafruit_BusIO

Arduino library for I2C & SPI abstractions
C++
206
star
62

Adafruit-Trinket-USB

Arduino libraries allowing Trinket to act as USB devices
C
205
star
63

Bluefruit_LE_Connect

iOS app for use with Bluefruit Bluetooth LE breakout board
Swift
203
star
64

Adafruit_Floppy

C++
199
star
65

TinyWireM

I2C library for Trinket and Gemma, adapted from BroHogan's code on Arduino Playground
C++
196
star
66

Adafruit_BluefruitLE_nRF51

Arduino library for nRF51822-based Adafruit Bluefruit LE modules
C++
190
star
67

Adafruit_IO_Arduino

Arduino library to access Adafruit IO from WiFi, cellular, and ethernet modules.
C++
188
star
68

Adafruit-WS2801-Library

Arduino library for controlling strips/pixels using WS2801 driver chips
C++
185
star
69

Adafruit_INA219

INA219 Current Sensor
C++
181
star
70

Adafruit_AHRS

Arduino library for AHRS (Attitude and Heading Reference System) for Adafruit motion sensors
C++
175
star
71

Adafruit_Motor_Shield_V2_Library

Arduino library for Adafruit Motor Shield v2!
C++
171
star
72

AccelStepper

A small fork of AccelStepper v1.3 with AF_motor (Adafruit motor shield) support!
C++
167
star
73

Adafruit_NeoMatrix

Adafruit_GFX-compatible library for NeoPixel grids
C++
167
star
74

SD

fixes & updates to the Arduino SD library - totally in progress. works but in beta
C++
166
star
75

Adafruit_ESP8266

Example code for ESP8266 chipset
C++
165
star
76

RadioHead

A github'ified version of http://www.airspayce.com/mikem/arduino/RadioHead/
C++
164
star
77

Adafruit_CircuitPlayground

library for Circuit Playground board
C++
159
star
78

Raw-IR-decoder-for-Arduino

Take raw IR signal from a remote receiver and print out pulse lengths
C++
158
star
79

circuitpython-org

CircuitPython's website
HTML
153
star
80

Bluefruit_LE_Connect_v2

iOS app for use with Bluefruit Bluetooth LE modules and dev boards from Adafruit (v2.0)
Swift
152
star
81

MAX6675-library

Arduino library for interfacing with MAX6675 thermocouple amplifier
C++
136
star
82

CircuitPython_Community_Bundle

A bundle of useful CircuitPython libraries from the CircuitPython community.
Shell
134
star
83

Adafruit_TCS34725

Arduino library driver for Adafruit's TCS34725 RGB Color Sensor Breakout
C++
133
star
84

Adafruit-VC0706-Serial-Camera-Library

Library for VC0706-based Serial JPEG Cameras
C++
132
star
85

adafruit-bluefruit-le-desktop

Desktop application to interact with Bluefruit LE and other Bluetooth low energy devices on Mac OSX, Windows, and Linux.
JavaScript
131
star
86

Adafruit_VL53L0X

Arduino library for Adafruit VL53L0X
C++
131
star
87

Adafruit_NFCShield_I2C

I2C Driver for Adafruit's PN532-based NFC Shield
C++
128
star
88

awesome-feather

A curated list of awesome Feather form factor boards, guides, videos, libraries, software and resources.
127
star
89

Adafruit_CircuitPython_ADS1x15

CircuitPython drivers for the ADS1x15 series of ADCs.
Python
127
star
90

Adafruit_CircuitPython_BLE

Bluetooth Low Energy (BLE) library for CircuitPython
Python
126
star
91

Adafruit_SPIFlash

Arduino library for external (Q)SPI flash device
C++
124
star
92

Adafruit_VS1053_Library

This is a Arduino library for the Adafruit VS1053 Codec Breakout and Music Maker Shields
C++
124
star
93

FreqShow

Raspberry Pi & PiTFT-based RTL-SDR frequency scanning and display tool.
Python
123
star
94

Adafruit_Adalink

Python wrapper for Segger's J-Link Commander & STMicro STLink V2 to flash various ARM MCUs
Python
122
star
95

FifteenStep

A general purpose Arduino MIDI sequencer library
C++
121
star
96

TV-B-Gone-kit

*Pew* *Pew* TV's are toast!
C
120
star
97

Adafruit-MLX90614-Library

Arduino library for the MLX90614 sensors in the Adafruit shop
C++
117
star
98

Bluefruit_LE_Connect_Android

Android port of Adafruit's Bluefruit LE Connect app
Java
117
star
99

Adafruit_Python_BME280

Python Driver for the Adafruit BME280 Breakout
Python
116
star
100

Adafruit_Python_ADS1x15

Python code to use the ADS1015 and ADS1115 analog to digital converters with a Raspberry Pi or BeagleBone black.
Python
114
star