cpremote


Namecpremote JSON
Version 1.0.3 PyPI version JSON
download
home_pageNone
Summarycpremote is a command line tool for interacting with a CircuitPython remote filesystem access using the web based workflow
upload_time2024-10-19 18:17:40
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License
keywords circuitpython
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cpremote
cpremote is a command line tool for interacting with a CircuitPython remote filesystem using the web based workflow

# description
This command line tool implements the CircuitPython [web based workflow](https://docs.circuitpython.org/en/latest/docs/workflows.html#web) and is great for
* CircuitPython boards that do not support native USB
* CircuitPython boards that are remote
* Workflows in which a CircuitPython project is kept external from the CircuitPython board such as on a host computer

I use `cpremote`, [`circup`](https://github.com/adafruit/circup) and [`CircuitPython for Visual Studio Code`](https://marketplace.visualstudio.com/items?itemName=joedevivo.vscode-circuitpython)with all of my CircuitPython projects.

# install
```sh
pip install cpremote
```

# environment variables
cpremote will look for a `.env` file in the current directory which can contain the CircuitPython host name, password and/or file size units use with `ls`
```sh
# IP address recommended for better performance
CPREMOTE_HOST=http://192.168.1.90
# remote password
CPREMOTE_PASSWORD=mypassword
# file size units for 'ls' command: 'b' - bytes, 'kb' - kilobytes or 'blocks'
CPREMOTE_UNITS=kb
```

# example command usage

## ls
Show the root directory on the remote filesystem
```sh
cpremote ls
```

## get
Copy `code.py` from the remote filesystem to the console
```sh
cpremote get code.py
```

## put
Copy `code.py` from the local filesystem to the remote filesystem. Note that the CircuitPython board's hostname and password can be set in `.env`, or can be overriden on the command line
```sh
cpremote --host http://1.2.3.4 --password mypassword put code.py
```

## repl
The `repl` command will launch a basic web repl using the default system browser

## help
Full help. Also, note that help for individual command line options is available using `-h` or `--help` before a command
```
cpremote --help
usage: cpremote [-h] [--host HOST] [--password PASSWORD] [--units {b,kb,blocks}] [-v] {devices,diskinfo,get,ls,mkdir,mv,put,repl,rm,rmdir,version} ...

CircuitPython remote filesystem access for web based workflow

positional arguments:
  {devices,diskinfo,get,ls,mkdir,mv,put,repl,rm,rmdir,version}
                        command help
    devices             show info about CircuitPython devices on the local network
    diskinfo            show disk info about the remote filesystem
    get                 get a file from remote filesystem
    ls                  list a directory on the remote filesystem
    mkdir               make a directory on the remote filesystem
    mv                  move (rename) a file or directory on the remote filesystem
    put                 put a file on the remote filesystem
    repl                start Web REPL
    rm                  remove a file on the remote filesystem
    rmdir               remove the directory and all of its contents on the remote filesystem
    version             returns information about the device

optional arguments:
  -h, --help            show this help message and exit
  --host HOST           CircuitPython host name. Overrides CPREMOTE_HOST environment variable
  --password PASSWORD   CircuitPython password.Overrides CPREMOTE_PASSWORD environment variable
  --units {b,kb,blocks}
                        file size units. Overrides CPREMOTE_UNIT environment variable
  -v, --version         show program's version number and exit
```

# IP addresses vs mDNS local host names
In my experience, using IP addresses seems to be more performant than mDNS local host names when accessing a CircuitPython board. However, this may be an issue in my local network so your experience may be different

# Attribution
CircuitPython is created by Adafruit Industries.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cpremote",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "CircuitPython",
    "author": null,
    "author_email": "dzlucha <dszlucha@duck.com>",
    "download_url": "https://files.pythonhosted.org/packages/ed/78/8ddd6a9d74851d8bfd213627dc0e01c1ae69fbe7105360e705ca501013b7/cpremote-1.0.3.tar.gz",
    "platform": null,
    "description": "# cpremote\ncpremote is a command line tool for interacting with a CircuitPython remote filesystem using the web based workflow\n\n# description\nThis command line tool implements the CircuitPython [web based workflow](https://docs.circuitpython.org/en/latest/docs/workflows.html#web) and is great for\n* CircuitPython boards that do not support native USB\n* CircuitPython boards that are remote\n* Workflows in which a CircuitPython project is kept external from the CircuitPython board such as on a host computer\n\nI use `cpremote`, [`circup`](https://github.com/adafruit/circup) and [`CircuitPython for Visual Studio Code`](https://marketplace.visualstudio.com/items?itemName=joedevivo.vscode-circuitpython)with all of my CircuitPython projects.\n\n# install\n```sh\npip install cpremote\n```\n\n# environment variables\ncpremote will look for a `.env` file in the current directory which can contain the CircuitPython host name, password and/or file size units use with `ls`\n```sh\n# IP address recommended for better performance\nCPREMOTE_HOST=http://192.168.1.90\n# remote password\nCPREMOTE_PASSWORD=mypassword\n# file size units for 'ls' command: 'b' - bytes, 'kb' - kilobytes or 'blocks'\nCPREMOTE_UNITS=kb\n```\n\n# example command usage\n\n## ls\nShow the root directory on the remote filesystem\n```sh\ncpremote ls\n```\n\n## get\nCopy `code.py` from the remote filesystem to the console\n```sh\ncpremote get code.py\n```\n\n## put\nCopy `code.py` from the local filesystem to the remote filesystem. Note that the CircuitPython board's hostname and password can be set in `.env`, or can be overriden on the command line\n```sh\ncpremote --host http://1.2.3.4 --password mypassword put code.py\n```\n\n## repl\nThe `repl` command will launch a basic web repl using the default system browser\n\n## help\nFull help. Also, note that help for individual command line options is available using `-h` or `--help` before a command\n```\ncpremote --help\nusage: cpremote [-h] [--host HOST] [--password PASSWORD] [--units {b,kb,blocks}] [-v] {devices,diskinfo,get,ls,mkdir,mv,put,repl,rm,rmdir,version} ...\n\nCircuitPython remote filesystem access for web based workflow\n\npositional arguments:\n  {devices,diskinfo,get,ls,mkdir,mv,put,repl,rm,rmdir,version}\n                        command help\n    devices             show info about CircuitPython devices on the local network\n    diskinfo            show disk info about the remote filesystem\n    get                 get a file from remote filesystem\n    ls                  list a directory on the remote filesystem\n    mkdir               make a directory on the remote filesystem\n    mv                  move (rename) a file or directory on the remote filesystem\n    put                 put a file on the remote filesystem\n    repl                start Web REPL\n    rm                  remove a file on the remote filesystem\n    rmdir               remove the directory and all of its contents on the remote filesystem\n    version             returns information about the device\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --host HOST           CircuitPython host name. Overrides CPREMOTE_HOST environment variable\n  --password PASSWORD   CircuitPython password.Overrides CPREMOTE_PASSWORD environment variable\n  --units {b,kb,blocks}\n                        file size units. Overrides CPREMOTE_UNIT environment variable\n  -v, --version         show program's version number and exit\n```\n\n# IP addresses vs mDNS local host names\nIn my experience, using IP addresses seems to be more performant than mDNS local host names when accessing a CircuitPython board. However, this may be an issue in my local network so your experience may be different\n\n# Attribution\nCircuitPython is created by Adafruit Industries.\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "cpremote is a command line tool for interacting with a CircuitPython remote filesystem access using the web based workflow",
    "version": "1.0.3",
    "project_urls": {
        "Homepage": "https://github.com/dszlucha/cpremote",
        "Issues": "https://github.com/dszlucha/cpremote/issues"
    },
    "split_keywords": [
        "circuitpython"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73a2198c8431e43ee444714224da14da9cc1e8ab403927cd45c3253a5674cefc",
                "md5": "c8ed4a5ed1b197479ba867c41a438100",
                "sha256": "c7eab0571b2b9d5b5241ce93a398123a9abea11f0d2137ad4761127b47ce1af0"
            },
            "downloads": -1,
            "filename": "cpremote-1.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c8ed4a5ed1b197479ba867c41a438100",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 7168,
            "upload_time": "2024-10-19T18:17:38",
            "upload_time_iso_8601": "2024-10-19T18:17:38.793591Z",
            "url": "https://files.pythonhosted.org/packages/73/a2/198c8431e43ee444714224da14da9cc1e8ab403927cd45c3253a5674cefc/cpremote-1.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ed788ddd6a9d74851d8bfd213627dc0e01c1ae69fbe7105360e705ca501013b7",
                "md5": "1c19ca5be43d83a7cce6218b21075718",
                "sha256": "a128c430a566ed65c4eee636740f2aae523c48a1bdd4c9e861f3d0333ffdc468"
            },
            "downloads": -1,
            "filename": "cpremote-1.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "1c19ca5be43d83a7cce6218b21075718",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6031,
            "upload_time": "2024-10-19T18:17:40",
            "upload_time_iso_8601": "2024-10-19T18:17:40.044357Z",
            "url": "https://files.pythonhosted.org/packages/ed/78/8ddd6a9d74851d8bfd213627dc0e01c1ae69fbe7105360e705ca501013b7/cpremote-1.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 18:17:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dszlucha",
    "github_project": "cpremote",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "cpremote"
}
        
Elapsed time: 0.33732s