tycmd-wrapper


Nametycmd-wrapper JSON
Version 0.2.1 PyPI version JSON
download
home_pageNone
SummaryA python wrapper for tycmd
upload_time2024-08-06 12:48:50
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords tycmd teensy firmware
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            tycmd-wrapper
=============

A Python wrapper for [tycmd](https://koromix.dev/tytools) by 
[Niels Martignène](https://github.com/Koromix/) - a tool for managing 
[Teensy USB Development Boards](https://www.pjrc.com/teensy/) by PJRC.


Examples
--------

### Identifying a firmware file

To identify which models are compatible with a specific firmware file, use the `identify()` method.

```python
import tycmd
compatible_models = tycmd.identify('blink.hex')
```

Models compatible with the firmware file will be returned as a list of strings:
```python
['Teensy 4.0', 'Teensy 4.0 (beta 1)']
```

### List Available Boards
To list all available boards, use the `list_boards()` method.

```python
import tycmd
boards = list_boards()
```

Details for the available boards will be returned as a list of python dictionaries.
```python
[
    {
        'action': 'add',
        'tag': '3576040-Teensy',
        'serial': '3576040',
        'description': 'USB Serial',
        'model': 'Teensy 3.1',
        'location': 'usb-1-4',
        'capabilities': ['unique', 'run', 'reboot', 'serial'],
        'interfaces': [['Serial', '/dev/ttyACM1']],
    },
    {
        'action': 'add',
        'tag': '14014980-Teensy',
        'serial': '14014980',
        'description': 'USB Serial',
        'model': 'Teensy 4.0',
        'location': 'usb-1-3',
        'capabilities': ['unique', 'run', 'rtc', 'reboot', 'serial'],
        'interfaces': [['Serial', '/dev/ttyACM0']],
    },
]
```

### Uploading a firmware file

To upload a firmware file to a board, use the `upload()` method.
You can specify a board by its port or by its serial number.

```python
import tycmd
import logging

logging.basicConfig(level=logging.INFO)
tycmd.upload('blink.hex', port='/dev/ttyACM0')
```

The upload progress will be logged:
```
INFO:tycmd:Uploading to board '14014980-Teensy' (Teensy 4.0)
INFO:tycmd:Triggering board reboot
INFO:tycmd:Firmware: blink40.hex
INFO:tycmd:Flash usage: 19 kiB (1.0%)
INFO:tycmd:Uploading...
INFO:tycmd:Sending reset command (with RTC)
```

Full Documentation
------------------

The full API documentation is available [here](https://int-brain-lab.github.io/tycmd-wrapper).

![License](https://img.shields.io/github/license/int-brain-lab/tycmd-wrapper)
[![Coverage](https://img.shields.io/coverallsCoverage/github/int-brain-lab/tycmd-wrapper)](https://coveralls.io/github/int-brain-lab/tycmd-wrapper)
[![CI](https://github.com/int-brain-lab/tycmd-wrapper/actions/workflows/testing.yaml/badge.svg)](https://github.com/int-brain-lab/tycmd-wrapper/actions)
[![PyPI](https://img.shields.io/pypi/v/tycmd-wrapper)](https://pypi.org/project/tycmd-wrapper/)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tycmd-wrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "tycmd, teensy, firmware",
    "author": null,
    "author_email": "Florian Rau <bimac@users.noreply.github.com>",
    "download_url": null,
    "platform": null,
    "description": "tycmd-wrapper\n=============\n\nA Python wrapper for [tycmd](https://koromix.dev/tytools) by \n[Niels Martign\u00e8ne](https://github.com/Koromix/) - a tool for managing \n[Teensy USB Development Boards](https://www.pjrc.com/teensy/) by PJRC.\n\n\nExamples\n--------\n\n### Identifying a firmware file\n\nTo identify which models are compatible with a specific firmware file, use the `identify()` method.\n\n```python\nimport tycmd\ncompatible_models = tycmd.identify('blink.hex')\n```\n\nModels compatible with the firmware file will be returned as a list of strings:\n```python\n['Teensy 4.0', 'Teensy 4.0 (beta 1)']\n```\n\n### List Available Boards\nTo list all available boards, use the `list_boards()` method.\n\n```python\nimport tycmd\nboards = list_boards()\n```\n\nDetails for the available boards will be returned as a list of python dictionaries.\n```python\n[\n    {\n        'action': 'add',\n        'tag': '3576040-Teensy',\n        'serial': '3576040',\n        'description': 'USB Serial',\n        'model': 'Teensy 3.1',\n        'location': 'usb-1-4',\n        'capabilities': ['unique', 'run', 'reboot', 'serial'],\n        'interfaces': [['Serial', '/dev/ttyACM1']],\n    },\n    {\n        'action': 'add',\n        'tag': '14014980-Teensy',\n        'serial': '14014980',\n        'description': 'USB Serial',\n        'model': 'Teensy 4.0',\n        'location': 'usb-1-3',\n        'capabilities': ['unique', 'run', 'rtc', 'reboot', 'serial'],\n        'interfaces': [['Serial', '/dev/ttyACM0']],\n    },\n]\n```\n\n### Uploading a firmware file\n\nTo upload a firmware file to a board, use the `upload()` method.\nYou can specify a board by its port or by its serial number.\n\n```python\nimport tycmd\nimport logging\n\nlogging.basicConfig(level=logging.INFO)\ntycmd.upload('blink.hex', port='/dev/ttyACM0')\n```\n\nThe upload progress will be logged:\n```\nINFO:tycmd:Uploading to board '14014980-Teensy' (Teensy 4.0)\nINFO:tycmd:Triggering board reboot\nINFO:tycmd:Firmware: blink40.hex\nINFO:tycmd:Flash usage: 19 kiB (1.0%)\nINFO:tycmd:Uploading...\nINFO:tycmd:Sending reset command (with RTC)\n```\n\nFull Documentation\n------------------\n\nThe full API documentation is available [here](https://int-brain-lab.github.io/tycmd-wrapper).\n\n![License](https://img.shields.io/github/license/int-brain-lab/tycmd-wrapper)\n[![Coverage](https://img.shields.io/coverallsCoverage/github/int-brain-lab/tycmd-wrapper)](https://coveralls.io/github/int-brain-lab/tycmd-wrapper)\n[![CI](https://github.com/int-brain-lab/tycmd-wrapper/actions/workflows/testing.yaml/badge.svg)](https://github.com/int-brain-lab/tycmd-wrapper/actions)\n[![PyPI](https://img.shields.io/pypi/v/tycmd-wrapper)](https://pypi.org/project/tycmd-wrapper/)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python wrapper for tycmd",
    "version": "0.2.1",
    "project_urls": {
        "Changelog": "https://github.com/int-brain-lab/tycmd-wrapper/blob/main/CHANGELOG.md",
        "Documentation": "https://int-brain-lab.github.io/tycmd-wrapper/",
        "Homepage": "https://github.com/int-brain-lab/tycmd-wrapper/",
        "Issues": "https://github.com/int-brain-lab/tycmd-wrapper/issues",
        "Repository": "https://github.com/int-brain-lab/tycmd-wrapper.git"
    },
    "split_keywords": [
        "tycmd",
        " teensy",
        " firmware"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "07ace5af5ef1d88c0290bde40776e1217189a0269ee16041a281e949cc286e58",
                "md5": "faee48647204a92597e2ce5ee7c158b9",
                "sha256": "b0db3787a9c85a2f79b7b9b867d5cec8c64bde54de3fdc13cb54243ff5aeaf2e"
            },
            "downloads": -1,
            "filename": "tycmd_wrapper-0.2.1-py3-none-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "faee48647204a92597e2ce5ee7c158b9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 65815,
            "upload_time": "2024-08-06T12:48:50",
            "upload_time_iso_8601": "2024-08-06T12:48:50.885406Z",
            "url": "https://files.pythonhosted.org/packages/07/ac/e5af5ef1d88c0290bde40776e1217189a0269ee16041a281e949cc286e58/tycmd_wrapper-0.2.1-py3-none-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "075b8cb3caaa401539bd83562d42f345d77c4afba6c862a9776137eb0fad83f7",
                "md5": "eaee5ef8d17cfdc7a4f3f835744b2177",
                "sha256": "3730db1e9f066afbecc494eca6bb0bc98e318f9dab0d528a82636eeb2b825818"
            },
            "downloads": -1,
            "filename": "tycmd_wrapper-0.2.1-py3-none-manylinux_2_35_x86_64.whl",
            "has_sig": false,
            "md5_digest": "eaee5ef8d17cfdc7a4f3f835744b2177",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 62986,
            "upload_time": "2024-08-06T12:48:52",
            "upload_time_iso_8601": "2024-08-06T12:48:52.126173Z",
            "url": "https://files.pythonhosted.org/packages/07/5b/8cb3caaa401539bd83562d42f345d77c4afba6c862a9776137eb0fad83f7/tycmd_wrapper-0.2.1-py3-none-manylinux_2_35_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ceb5b0a185ba79417bbf1e4d81349f9486b47b7e5148eb6a7ed8217febf0a50d",
                "md5": "ee25fca937cbd9a92fadab645d45c9d1",
                "sha256": "73c17d7c6d073d7dd2b050731988a5fabb3be69ec339c3ef5fcfaae42eefe090"
            },
            "downloads": -1,
            "filename": "tycmd_wrapper-0.2.1-py3-none-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "ee25fca937cbd9a92fadab645d45c9d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 321702,
            "upload_time": "2024-08-06T12:48:54",
            "upload_time_iso_8601": "2024-08-06T12:48:54.138885Z",
            "url": "https://files.pythonhosted.org/packages/ce/b5/b0a185ba79417bbf1e4d81349f9486b47b7e5148eb6a7ed8217febf0a50d/tycmd_wrapper-0.2.1-py3-none-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-06 12:48:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "int-brain-lab",
    "github_project": "tycmd-wrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "tycmd-wrapper"
}
        
Elapsed time: 0.35346s