mpremote


Namempremote JSON
Version 1.22.0 PyPI version JSON
download
home_page
SummaryTool for interacting remotely with MicroPython devices
upload_time2023-12-27 06:07:08
maintainer
docs_urlNone
author
requires_python>=3.4
licenseMIT
keywords hardware micropython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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
                                         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 mip install aioble
    mpremote mip install github:org/repo@branch

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "mpremote",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.4",
    "maintainer_email": "",
    "keywords": "hardware,micropython",
    "author": "",
    "author_email": "Damien George <damien@micropython.org>",
    "download_url": "https://files.pythonhosted.org/packages/b6/9d/4239159d51c92eac521062b081467d7321b5611fe39f9c6f29d6be337c8d/mpremote-1.22.0.tar.gz",
    "platform": null,
    "description": "# mpremote -- MicroPython remote control\n\nThis CLI tool provides an integrated set of utilities to remotely interact with\nand automate a MicroPython device over a serial connection.\n\nThe simplest way to use this tool is:\n\n    mpremote\n\nThis will automatically connect to a USB serial port and provide an interactive REPL.\n\nThe full list of supported commands are:\n\n    mpremote connect <device>         -- connect to given device\n                                         device may be: list, auto, id:x, port:x\n                                         or any valid device name/path\n    mpremote disconnect               -- disconnect current device\n    mpremote mount <local-dir>        -- mount local directory on device\n    mpremote eval <string>            -- evaluate and print the string\n    mpremote exec <string>            -- execute the string\n    mpremote run <file>               -- run the given local script\n    mpremote fs <command> <args...>   -- execute filesystem commands on the device\n                                         command may be: cat, ls, cp, rm, mkdir, rmdir\n                                         use \":\" as a prefix to specify a file on the device\n    mpremote repl                     -- enter REPL\n                                         options:\n                                             --capture <file>\n                                             --inject-code <string>\n                                             --inject-file <file>\n    mpremote mip install <package...> -- Install packages (from micropython-lib or third-party sources)\n                                         options:\n                                             --target <path>\n                                             --index <url>\n                                             --no-mpy\n    mpremote help                     -- print list of commands and exit\n\nMultiple commands can be specified and they will be run sequentially.  Connection\nand disconnection will be done automatically at the start and end of the execution\nof the tool, if such commands are not explicitly given.  Automatic connection will\nsearch for the first available serial device.  If no action is specified then the\nREPL will be entered.\n\nShortcuts can be defined using the macro system.  Built-in shortcuts are:\n\n- a0, a1, a2, a3: connect to `/dev/ttyACM?`\n- u0, u1, u2, u3: connect to `/dev/ttyUSB?`\n- c0, c1, c2, c3: connect to `COM?`\n- cat, ls, cp, rm, mkdir, rmdir, df: filesystem commands\n- reset: reset the device\n- bootloader: make the device enter its bootloader\n\nAny user configuration, including user-defined shortcuts, can be placed in\n.config/mpremote/config.py.  For example:\n\n    # Custom macro commands\n    commands = {\n        \"c33\": \"connect id:334D335C3138\",\n        \"bl\": \"bootloader\",\n        \"double x=4\": {\n            \"command\": \"eval x*2\",\n            \"help\": \"multiply by two\"\n        }\n    }\n\nExamples:\n\n    mpremote\n    mpremote a1\n    mpremote connect /dev/ttyUSB0 repl\n    mpremote ls\n    mpremote a1 ls\n    mpremote exec \"import micropython; micropython.mem_info()\"\n    mpremote eval 1/2 eval 3/4\n    mpremote mount .\n    mpremote mount . exec \"import local_script\"\n    mpremote ls\n    mpremote cat boot.py\n    mpremote cp :main.py .\n    mpremote cp main.py :\n    mpremote cp -r dir/ :\n    mpremote mip install aioble\n    mpremote mip install github:org/repo@branch\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Tool for interacting remotely with MicroPython devices",
    "version": "1.22.0",
    "project_urls": {
        "Homepage": "https://github.com/micropython/micropython"
    },
    "split_keywords": [
        "hardware",
        "micropython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b0149fc125518888f3cef00cd4638ebb1c48bde41b7b9c64fabc11a76f8cc5b4",
                "md5": "2afd41d717a43eda6a9b26f2d5a77d4c",
                "sha256": "e89750702bd0b1ce8b58101777f379986ffffe3915632cf1a9010309f01efcc6"
            },
            "downloads": -1,
            "filename": "mpremote-1.22.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2afd41d717a43eda6a9b26f2d5a77d4c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.4",
            "size": 27863,
            "upload_time": "2023-12-27T06:07:05",
            "upload_time_iso_8601": "2023-12-27T06:07:05.792334Z",
            "url": "https://files.pythonhosted.org/packages/b0/14/9fc125518888f3cef00cd4638ebb1c48bde41b7b9c64fabc11a76f8cc5b4/mpremote-1.22.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b69d4239159d51c92eac521062b081467d7321b5611fe39f9c6f29d6be337c8d",
                "md5": "d636eac55ec91864fac910bc86805c8e",
                "sha256": "dbde10972819c1e0491d883adb8cbd17288246739adabddbf4a172e61ae00220"
            },
            "downloads": -1,
            "filename": "mpremote-1.22.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d636eac55ec91864fac910bc86805c8e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.4",
            "size": 24042,
            "upload_time": "2023-12-27T06:07:08",
            "upload_time_iso_8601": "2023-12-27T06:07:08.848162Z",
            "url": "https://files.pythonhosted.org/packages/b6/9d/4239159d51c92eac521062b081467d7321b5611fe39f9c6f29d6be337c8d/mpremote-1.22.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-27 06:07:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "micropython",
    "github_project": "micropython",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "mpremote"
}
        
Elapsed time: 0.17949s