Access a CircuitPython / MicroPython device's filesystem over the serial REPL. Ideal for boards without native USB (original ESP32, ESP32-C3, ESP32-C6 and others using USB-UART CP2102/CH340/CH9102...). Exposed three ways:
| Tool | Protocol | Use it for |
|---|---|---|
circuitpython_fuse.py |
FUSE / WinFsp | Mount as a real drive (Z:) — any app works natively |
circuitpython_ftp.py |
FTP | Cross-platform / remote access (FileZilla, WinSCP, …) |
circuitpython_webdav.py |
WebDAV | Mount over HTTP (Explorer / Finder / Nautilus) |
All three sit on the shared library cpfs.py (raw-REPL transport + a
filesystem API). cpfs.py is also usable directly and as a small CLI.
Heavily inspired by the Thonny editor
pip install -r requirements.txt
Per-bridge extras:
- FUSE:
pip install refuse+ a FUSE driver — Windows:winget install WinFsp.WinFsp· Linux:apt install fuse3· macOS: macFUSE.
# Mount as drive Z: (Windows)
python circuitpython_fuse.py -p COM12 -m Z:
# FTP server on :2121
python circuitpython_ftp.py -p COM12 --ftp-port 2121
# WebDAV server on :8080
python circuitpython_webdav.py -p COM12 --http-port 8080
# One-off CLI
python cpfs.py -p COM12 ls :/
python cpfs.py -p COM12 cp ./local.py :/code.py # upload
python cpfs.py -p COM12 cp :/code.py ./backup.py # download
Common flags: -p/--port, -b/--baudrate (default 115200), -v/--verbose,
--fast. FUSE adds -m/--mount and --cache-ttl SECONDS.
The serial link is the bottleneck. At 115200 baud expect roughly ~4 KB/s write, ~8–30 KB/s read.
--fast optionaly lowers the serial timings (~20–40 % faster), but it can cause silent
data corruption on some boards