first save

This commit is contained in:
tiijay
2025-10-19 18:29:10 +02:00
commit b5a30adb27
1303 changed files with 234711 additions and 0 deletions

View File

@@ -0,0 +1,105 @@
Metadata-Version: 2.4
Name: mpremote
Version: 1.26.1
Summary: Tool for interacting remotely with MicroPython devices
Project-URL: Homepage, https://github.com/micropython/micropython
Author-email: Damien George <damien@micropython.org>
License: MIT
License-File: LICENSE
Keywords: hardware,micropython
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: System :: Hardware
Requires-Python: >=3.4
Requires-Dist: importlib-metadata>=1.4; python_version < '3.8'
Requires-Dist: platformdirs>=4.3.7
Requires-Dist: pyserial>=3.3
Description-Content-Type: text/markdown
# mpremote -- MicroPython remote control
This CLI tool provides an integrated set of utilities to remotely interact with
and automate a MicroPython device over a serial connection.
The simplest way to use this tool is:
mpremote
This will automatically connect to a USB serial port and provide an interactive REPL.
The full list of supported commands are:
mpremote connect <device> -- connect to given device
device may be: list, auto, id:x, port:x
or any valid device name/path
mpremote disconnect -- disconnect current device
mpremote mount <local-dir> -- mount local directory on device
mpremote eval <string> -- evaluate and print the string
mpremote exec <string> -- execute the string
mpremote run <file> -- run the given local script
mpremote fs <command> <args...> -- execute filesystem commands on the device
command may be: cat, ls, cp, rm, mkdir, rmdir, sha256sum
use ":" as a prefix to specify a file on the device
mpremote repl -- enter REPL
options:
--capture <file>
--inject-code <string>
--inject-file <file>
mpremote mip install <package...> -- Install packages (from micropython-lib or third-party sources)
options:
--target <path>
--index <url>
--no-mpy
mpremote help -- print list of commands and exit
Multiple commands can be specified and they will be run sequentially. Connection
and disconnection will be done automatically at the start and end of the execution
of the tool, if such commands are not explicitly given. Automatic connection will
search for the first available serial device. If no action is specified then the
REPL will be entered.
Shortcuts can be defined using the macro system. Built-in shortcuts are:
- a0, a1, a2, a3: connect to `/dev/ttyACM?`
- u0, u1, u2, u3: connect to `/dev/ttyUSB?`
- c0, c1, c2, c3: connect to `COM?`
- cat, ls, cp, rm, mkdir, rmdir, df: filesystem commands
- reset: reset the device
- bootloader: make the device enter its bootloader
Any user configuration, including user-defined shortcuts, can be placed in
.config/mpremote/config.py. For example:
# Custom macro commands
commands = {
"c33": "connect id:334D335C3138",
"bl": "bootloader",
"double x=4": {
"command": "eval x*2",
"help": "multiply by two"
}
}
Examples:
mpremote
mpremote a1
mpremote connect /dev/ttyUSB0 repl
mpremote ls
mpremote a1 ls
mpremote exec "import micropython; micropython.mem_info()"
mpremote eval 1/2 eval 3/4
mpremote mount .
mpremote mount . exec "import local_script"
mpremote ls
mpremote cat boot.py
mpremote cp :main.py .
mpremote cp main.py :
mpremote cp -r dir/ :
mpremote sha256sum :main.py
mpremote mip install aioble
mpremote mip install github:org/repo@branch
mpremote mip install gitlab:org/repo@branch

View File

@@ -0,0 +1,30 @@
../../../bin/mpremote,sha256=bxRhc--5JOlFN19yFeyBH9VXJIkmYE0TRc6U9CnmTA4,294
mpremote-1.26.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
mpremote-1.26.1.dist-info/METADATA,sha256=XiPdewkwrkIupLuKevz-YxqgbKpoZgy1aj7CzhavNa8,4271
mpremote-1.26.1.dist-info/RECORD,,
mpremote-1.26.1.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
mpremote-1.26.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
mpremote-1.26.1.dist-info/entry_points.txt,sha256=sgvfZwY5hhV3pe7WBKbJX-A3K4rPSalISc2Et9J5488,48
mpremote-1.26.1.dist-info/licenses/LICENSE,sha256=t5Ak-wggyYkaKWW9RhUOoCxzdThAgY9_-bVQ0fauFuU,1088
mpremote/__init__.py,sha256=uCMjbbM9nO3VqYqqvGIZIzXy3juW1hHD8b4LrW0mWiQ,438
mpremote/__main__.py,sha256=4uulmJ59a37e2DlZJwGhd0wmwvK1KHTbeDnhBWqpFtQ,84
mpremote/__pycache__/__init__.cpython-312.pyc,,
mpremote/__pycache__/__main__.cpython-312.pyc,,
mpremote/__pycache__/commands.cpython-312.pyc,,
mpremote/__pycache__/console.cpython-312.pyc,,
mpremote/__pycache__/main.cpython-312.pyc,,
mpremote/__pycache__/mip.cpython-312.pyc,,
mpremote/__pycache__/mp_errno.cpython-312.pyc,,
mpremote/__pycache__/repl.cpython-312.pyc,,
mpremote/__pycache__/romfs.cpython-312.pyc,,
mpremote/__pycache__/transport.cpython-312.pyc,,
mpremote/__pycache__/transport_serial.cpython-312.pyc,,
mpremote/commands.py,sha256=qMNSaRwLm_HQJhPcIOzZubtqGgAU1Zq2M0z_CdXlRhs,26587
mpremote/console.py,sha256=doc59IfVkosiqlexQlZrLRsQmtzFb5hrm7q2HabKnMU,5280
mpremote/main.py,sha256=7JS0_t8fKCwISGX9k4vxojWEGFYqVla9U5A4PPzVF8I,19305
mpremote/mip.py,sha256=IRQeQ0jkYxvo0EPVCaEHVoP5xSZ8JPT8qDdVBoE-Pko,7380
mpremote/mp_errno.py,sha256=xlupFzO1KKSe_nN9ogUIUZzJsCJKcsf0TyUyCDG5bvw,1280
mpremote/repl.py,sha256=-qEslvMdWDfGgbglvIqdT6zgwbtXeK_m_x2pGvODflo,4679
mpremote/romfs.py,sha256=j-aCEzxWg4kryrRDgO_mETEyg2xpZyxOnpS1mcVDmbU,4966
mpremote/transport.py,sha256=rTtyBJDYfzTPpLkcAJ30avaql6Ak055ekR513SURza0,7608
mpremote/transport_serial.py,sha256=Q3jFpmZIUBi1RLDBbU83EjnMD3lcAN2O8696Q-6fNTg,33927

View File

@@ -0,0 +1,4 @@
Wheel-Version: 1.0
Generator: hatchling 1.27.0
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,2 @@
[console_scripts]
mpremote = mpremote.main:main

View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2021-2022 Damien P. George
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.