A Python program that makes it easy to manage modules on a CircuitPython device!
Run main.py to start the program. Make sure that bundle_tools and gui_tools is in the same directory and that all requirements are met! Note: This will create a bunch of files and directories, so I recommend placing this in its own directory and adding a shortcut or a symlink to the desktop or something like that.
Sooner or later, I will get binaries for Windows and Linux. (Sorry macOS users - I don't have a macOS computer!) For now, you are going to have to install everything manually.
- Download and install Git. It does not matter what editor you use for Git's default.
- Or...download this repo via the
Download ZIPoption under the greenCodebutton.
- Or...download this repo via the
- Download and install Python 3. (Here is Python 3.9 on the Microsoft Store) Theoretically, you can use a version as early as 3.6, but I only tested this on 3.7 and 3.9.
- Make sure to check
Add Python 3.x to PATH! - Make sure to also install Tk/Tcl support! If you can access the IDLE, then Tk/Tcl is installed!
- Make sure to check
- If you are on Windows, I would also install the Windows Terminal while you are at it.
- If you installed Git,
cdinto a convenient directory (like the home directory or the desktop) and run:git clone https://github.com/UnsignedArduino/CircuitPython-Bundle-Manager cd CircuitPython-Bundle-Manager- If you downloaded the ZIP, move the downloaded ZIP to somewhere convenient (ex. home directory or desktop), extract it, open a terminal and
cdinto the extracted directory.
- If you downloaded the ZIP, move the downloaded ZIP to somewhere convenient (ex. home directory or desktop), extract it, open a terminal and
- If you run
dir(orlson Mac and Linux) you should get something like this:dir(Windows):
01/18/2021 08:11 PM <DIR> . 01/18/2021 08:11 PM <DIR> .. 01/18/2021 08:11 PM <DIR> bundle_tools 01/18/2021 08:11 PM 39,625 gui.py 01/18/2021 08:11 PM <DIR> gui_tools 01/18/2021 08:11 PM 329 main.py 01/18/2021 08:11 PM 1,949 README.md 01/18/2021 08:11 PM 18 requirements.txt 4 File(s) 41,921 bytes 4 Dir(s) x bytes freels(macOS and Linux):
bundle_tools gui.py gui_tools main.py README.md requirements.txt - If you are going to use a virtual environment, run the following commands:
- Windows:
python -m venv .venv ".venv/Scripts/activate.bat"- macOS and Linux:
python3 -m venv source .venv/bin/activate - Install the packages:
- Windows:
pip install -r requirements.txt- macOS and Linux:
pip3 install -r requirements.txt - You should now be able to run it!
- Windows:
python main.py- macOS and Linux:
python3 main.py
If you are not using a virtual environment, then you can just create a .bat file containing python \path\to\the\main.py (python3, forward slashes, and use .sh for the extension on macOS and Linux) on the desktop for convenience. Otherwise, you will need to re-activate the virtual environment everytime you want to run it. I highly recommend using these shell scripts:
- Windows:
:: Replace this with the path to the directory of the CircuitPython Bundle Manager, should have main.py in it cd path\to\the\CircuitPython-Bundle-Manager :: You can use python.exe or pythonw.exe - the w one will just supress output of the program ".venv\Scripts\pythonw.exe" main.py- macOS and Linux:
# Replace with the path to the CircuitPython Bundle Manager cd path/to/the/CircuitPython-Bundle-Manager .venv/bin/python3 main.pyDon't forget to give the .sh file execute permission! (chmod +x shell_file.sh)
You can find these options in config.json, which is in the same directory as main.py, and should be auto-generated upon first run. In case it does not happen, this is the default JSON file:
{ "last_auth_method_used": "username and password", "last_circuit_python_bundle_version": "6", "show_traceback_in_error_messages": "false", "unix_drive_mount_point": "/media" }last_auth_method_usedshould be a string ofusername and password,access token, orenterprise. This is the last method of authentication you used.last_circuitpython_bundle_versionshould be a string of a number. This is the last CircuitPython version you used.show_traceback_in_error_messagesshould be a string of a bool. (Like1,true,yesforTrueand anything else forFalse) This will control whether stack traces will appear in error messages.unix_drive_mount_pointshould be a string of a path that points to the place where your distro automatically mounts drives. Only applies to Unix-based systems.