Skip to main content

mwrsync

Micropython WebREPL based file sync tool.

This tool will sync your Micropython project directory to your Micropython device over WiFi. This is much faster than serial, and requires no additional code on the device (since it uses Micropython’s built-in WebREPL).

Install

pip install mwrsync

On your device, enable WebREPL by running import webrepl_setup or adding this to your boot.py:

import webrepl
webrepl.start(password='secret')

Usage

mwrsync <directory> <host>[:<port>] [--port <int>] [-p|--password <value>] [--dry_run] [-v|--verbose]

Example:

$ mwrsync esp32/ 10.0.0.128 -v
Password:
Remote WebREPL version: (1, 19, 1)
copying: test.py
Sent 5 of 5 bytes

--dry-run will compute changes but not modify the files on the device. --verbose will tell you what it’s doing.

Ignoring Files

Add a file .mwrsyncignore to the directory you’re syncing. It follows .gitignore syntax. It will neither copy or delete files that match.

WARNING: If you set up WebREPL with import webrepl_setup, don’t forget to add webrepl_cfg.py to .mwrsyncignore (or copy it to your project directory). Otherwise you’ll disable WebREPL on your next reset.

Speed

On an ESP32 this will hash files at about 272kb/s (on the device). It will transfer changed files at about 110kb/s. Most of the time a sync takes me about 4 seconds.

How It Works

This tool will compute a SHA1 hash of your local files, a SHA1 hash of any files on your device, and copy or remove files until the two match. It only ever modifies files on the device, never locally.

Security

WebREPL sends everything over clear-text (including the password 😓).

Metadata

Release files for mwrsync 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mwrsync 0.1.2
File Size Uploaded Provenance Actions
mwrsync-0.1.2.tar.gz 19.2 kB Without provenance Details for mwrsync-0.1.2.tar.gz

Release files / mwrsync-0.1.2.tar.gz

Download URL mwrsync-0.1.2.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b714f47c34a1cd2a08b8e4fa371fd6d0019f4c22d5244ab1de5b813abe241581
BLAKE2b-256 checksum
How to use checksums
aadb5874fd0e17f06c91fa2f803cd8669ef6cb12da1d65189a730eedbb55558c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Security for mwrsync 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page