tycmd-wrapper
A thin Python wrapper for tycmd by Niels Martignène - a tool for managing Teensy USB Development Boards by PJRC.
Installation
pip install tycmd-wrapper
This will install tycmd-wrapper along with the necessary tycmd binary for your system.
tycmd-wrapper requires Python 3.10 or later. Supported platforms are:
- Linux (x86_64, arm64)
- macOS (Intel, Apple Silicon)
- Windows (x86_64)
Examples
Identifying a firmware file
To identify which models are compatible with a specific firmware file, use the identify() function.
import tycmd
compatible_models = tycmd.identify('blink.hex')
Models compatible with the firmware file will be returned as a list of strings:
['Teensy 4.0', 'Teensy 4.0 (beta 1)']
List Available Boards
To list all available boards, use the list_boards() function.
import tycmd
boards = tycmd.list_boards()
Details for the available boards will be returned as a list of python dictionaries.
[
{
'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() function.
You can specify a board by its port or by its serial number.
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.
Metadata
Release files for tycmd-wrapper 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tycmd_wrapper-0.4.0.tar.gz | 49.3 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tycmd_wrapper-0.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| tycmd_wrapper-0.4.0-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| tycmd_wrapper-0.4.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 1.0 MB
Release files / tycmd_wrapper-0.4.0.tar.gz
| Download URL | tycmd_wrapper-0.4.0.tar.gz |
|---|---|
| Size | 49.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6a53af8b050c6dcabdd656daba74550636543eaa04c941941e525e0e4c2e4ef7
|
|
BLAKE2b-256 checksum How to use checksums |
e0899a662dfa02faf92827dac3cdbdc8ff8771305e2cd5e84c214e1376bb8442
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tycmd_wrapper-0.4.0-py3-none-win_amd64.whl
| Download URL | tycmd_wrapper-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 343.3 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
a95dd5342173bc3f9d6bcd1c629d1832720a7afd16dd494f643a8fefa57f8856
|
|
BLAKE2b-256 checksum How to use checksums |
ee4a020756235fbe06430f82f5573cd855bf694f58854ae593a4bfb91255c19f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_x86_64.whl
| Download URL | tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 241.1 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
7cff1c23e1b3c2565f0748253822c5178ec14715f296beb7df33207af68f1553
|
|
BLAKE2b-256 checksum How to use checksums |
47e8ce40d71bb3679c3f317c8ada8ffe222e565344c65f0427394786a59a9f81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | tycmd_wrapper-0.4.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 242.4 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
7309f876ca252eb75c29d6c743d7c3b5622614e178882381c6126094ca0e422d
|
|
BLAKE2b-256 checksum How to use checksums |
e9c2b007e526daf8a1ab902dc804c50506b6f2d3530cbc5d420e91cbefc4fe7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tycmd_wrapper-0.4.0-py3-none-macosx_11_0_x86_64.whl
| Download URL | tycmd_wrapper-0.4.0-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 68.7 kB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
9131fc83e524612b94442e659a644543a7dffca0c5e7f781e6f64567c3d9d23e
|
|
BLAKE2b-256 checksum How to use checksums |
2b83d6edaf7969bf2c0050d13b06f569dab492b2478d1a5caa69d5cda717e55a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / tycmd_wrapper-0.4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | tycmd_wrapper-0.4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 66.6 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
1ff8df59865f279a48faa34fe7fec98a6757263cba5dc5f1d81cdf6801b69f03
|
|
BLAKE2b-256 checksum How to use checksums |
74bb655dd46c6a2f72b1ac93ccf10b6b09321927eee8460a023b7f1bde8bcc63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.24 {"installer":{"name":"uv","version":"0.12.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|