File System Bridge to facilitate working with files on Micropython devices
Project description
📂 MPBridge

CLI tool to synchronise and manage files on a MicroPython running device.
📥 Installation
mpbridge must be installed with sudo or administrator level of permission in order to be accessible in terminal:
- Windows : Open
cmd.exeas administrator and runpip install -U mpbridge - Linux / MacOS : Run
sudo pip install -U mpbridge
🪄 How to use
You can use mpbridge in several ways based on your needs:
⚜️ Bridge Mode
- Run
mpbridge bridge <PORT> - This mode copies all files and folders from your
MicroPythonboard into a temporary directory on your local device and listens for any filesystem events on local directory to apply them on your board. It keeps raw repl open, so you cannot use serial port in other applications simultaneously.
⚜️ Sync Directory
- Run
mpbridge sync <PORT> <DIR_PARH> - This command syncs a specified local directory with a
MicroPythonboard. The sync process will push all modified files and folders into board and also pull changes from board and exits. - If a conflict occurs,
mpbridgewill choose the local version of file automatically and overwrites it on connected board.
⚜️ Development Mode
- Run
mpbridge dev <PORT> <DIR_PARH> - This mode repeats a loop of tasks in specified directory on
MicroPythondevice as below :- Sync files → Wait for changes (Develop your project) → Sync files → Start MicroPython REPL
- This mode is useful when you keep switching between different tools to flash and run new codes repeatedly.
You can specify your project directory as
DIR_PATHandmpbridgewill take care of changes when you are developing your project in your desired IDE. You can switch toMicroPython REPLanytime you wish to run the updated code on your board.
Note : <PORT> can be the full port path or one of the short forms below :
c[n]forCOM[n](c3is equal toCOM3)u[n]for/dev/ttyUSB[n](u3is equal to/dev/ttyUSB3)a[n]for/dev/ttyACM[n](a3is equal to/dev/ttyACM3)
👀 Ignore files
You can inform mpbridge to ignore syncing specific files or directories. This is useful when you don't want to sync
some directories like .git/ or venv/ with your board. To use this feature create a file named mpbridge.ignore in
your project directory and specify list of files and directories:
.git/
venv/
tests/test_1.py
tests/test_2.py
mpbridge.ignoresyntax is not as same as.gitignorefiles.- At this time
mpbridge.ignoreonly supports specifying file and directory paths directly. - You should add a slash at the end of directory names:
dir1/
✅ Supported platforms
- Windows
- MacOS
- Linux
- FreeBSD/BSD
📦 Dependencies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mpbridge-1.1.tar.gz.
File metadata
- Download URL: mpbridge-1.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b8a740f8641a8817b76ff2035b521d9c459b25c859e6343cd1caced1b79e802
|
|
| MD5 |
de9b943ced47bf27cafa0317d48c1859
|
|
| BLAKE2b-256 |
cf5b317662d6811a4437f7dccf2ac8031461869f559ea7e0ad94788e63967197
|
File details
Details for the file mpbridge-1.1-py3-none-any.whl.
File metadata
- Download URL: mpbridge-1.1-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
771e8666903369bd7129d5a0cfed8ae1e955b439f35391d8763114c899f860e1
|
|
| MD5 |
c89ffafb071b73615115fa4eb056457b
|
|
| BLAKE2b-256 |
5b189045755aa428f5f12a67f09f27811a53b550a3665c57f69653c98f24504e
|