pymboot-rs

raw JSON →
0.2.0 verified Fri May 01 auth: no python

Python bindings for McuBoot implementation in Rust, providing high-performance communication with NXP MCU bootloader. Current version is 0.2.0, requires Python >=3.9. Release cadence is irregular as it's a new project.

pip install pymboot-rs
error ImportError: No module named 'pymboot-rs'
cause Trying to import with hyphens instead of underscores.
fix
Use from pymboot_rs import McuBoot (underscores).
error pymboot_rs._McuBoot: Failed to open device
cause Device not found or permissions issue. Often on Linux if udev rules not set.
fix
Set up udev rules for NXP HID devices or run with sudo.
gotcha The library uses underscores in import (pymboot_rs) but the PyPI package name uses hyphens (pymboot-rs). Installation via pip with hyphens vs import with underscores is a common confusion.
fix Install using pip install pymboot-rs, but import as from pymboot_rs import ...
deprecated The Rust backend is still evolving; APIs may change without major version bump in early releases (0.x).
fix Pin dependency to a specific minor version, e.g., pymboot-rs>=0.2,<0.3

Connect to an NXP MCU bootloader via USB HID, ping, and read flash.

from pymboot_rs import McuBoot, BootMode
import os

# Connect to device (e.g., USB HID)
device = McuBoot(port='hid', baudrate=115200)

# Ping the device
print(device.ping())

# Read a flash region
import sys
data = device.read_memory(address=0x0, length=256)
sys.stdout.buffer.write(data)