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() method.
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() method.
import tycmd
boards = 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() method.
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.3.1
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.3.1.tar.gz | 41.2 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| tycmd_wrapper-0.3.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| tycmd_wrapper-0.3.1-py3-none-manylinux_2_28_x86_64.whl | Python 3 | none | Linux glibc 2.28+ x86-64 | Details |
| tycmd_wrapper-0.3.1-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details |
| tycmd_wrapper-0.3.1-py3-none-macosx_11_0_x86_64.whl | Python 3 | none | macOS 11.0+ x86-64 | Details |
| tycmd_wrapper-0.3.1-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 991.0 kB
Release files / tycmd_wrapper-0.3.1.tar.gz
| Download URL | tycmd_wrapper-0.3.1.tar.gz |
|---|---|
| Size | 41.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7b875b6d6cacff466e960de2a14b7ba88e3516825fcfafca30281c7076f1b8a
|
|
BLAKE2b-256 checksum How to use checksums |
e93687ace8ff1b3f2b61cd178e6e9ba0c62a5a478faaf3cf3be4cd96ce7ead5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.3.1-py3-none-win_amd64.whl
| Download URL | tycmd_wrapper-0.3.1-py3-none-win_amd64.whl |
|---|---|
| Size | 340.8 kB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
4345fe2e97dba9ff4a036bfeca84760bebda622fad657909c55e2c4d4f1b8f3b
|
|
BLAKE2b-256 checksum How to use checksums |
15281ae7c02987f11a5473b06ea5a95ab214034867a8cea5acba069f74fd6027
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.3.1-py3-none-manylinux_2_28_x86_64.whl
| Download URL | tycmd_wrapper-0.3.1-py3-none-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 238.7 kB |
| Tags | Linux glibc 2.28+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
c58524eb23e38d4c1dd655e6da798a299583216beb76f6fda4dec3e24af3ec76
|
|
BLAKE2b-256 checksum How to use checksums |
53ee3bd7b3e3a42bb023419c51e9b38a89207bce78569ab4ec0ccdcda4a5df1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.3.1-py3-none-manylinux_2_28_aarch64.whl
| Download URL | tycmd_wrapper-0.3.1-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 240.0 kB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
2e3ee50f3a6a2ee7caf251e8f79b48cd98b55a79f75461f3c6da346181d1c238
|
|
BLAKE2b-256 checksum How to use checksums |
354592a626f537398ebb4358dfe59286375713a1b22ccfcf1d250533693d3597
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.3.1-py3-none-macosx_11_0_x86_64.whl
| Download URL | tycmd_wrapper-0.3.1-py3-none-macosx_11_0_x86_64.whl |
|---|---|
| Size | 66.2 kB |
| Tags | Python 3 macOS 11.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
1298e32e9fbdeb8023771d5e5ff0abf0e8ddb437a00f0b421dc6bd4822c1e979
|
|
BLAKE2b-256 checksum How to use checksums |
b14d8379faa9b0cd2b43220f6d8d44054a9889c7480104da881c73a2c5da59aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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.3.1-py3-none-macosx_11_0_arm64.whl
| Download URL | tycmd_wrapper-0.3.1-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 64.1 kB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9fa47bd7a1aa444228509fe1a215ed86fce98b88493788c588991777ed70cbd5
|
|
BLAKE2b-256 checksum How to use checksums |
e763c4cb500a7a40da2ffb5c3b6786675ed169e10fcc8019620b2377caa055b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","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}
|