skillfed

xmodem

XMODEM protocol implementation.

xmodem v0.5.0 536.4K downloads/30d#6,126 on PyPI112
Permissive license MIT Active released

What it is and what it does

xmodem is a pure-Python implementation of the XMODEM file transfer protocol, a legacy standard for transferring binary files over serial connections and similar character-based channels. It provides a simple API: you supply callback functions to read from and write to your communication channel, then call send() or recv() to transfer a file. The protocol handles framing, checksums or CRC validation, retries, and flow control—all the low-level details of reliable block-based transfer.

The package has no external runtime dependencies and supports Python 3.6 and later. It is commonly used in embedded systems development, firmware updates, and legacy equipment integration where XMODEM remains the standard or only available transfer method. Recent versions have addressed timing issues and improved retry semantics.

Use it for:

  • Upload firmware or configuration files to embedded devices or microcontrollers that speak XMODEM.
  • Download diagnostic logs or data from legacy industrial equipment over serial connections.
  • Implement file transfer in Python-based device management or terminal tools.
  • Test or validate XMODEM protocol implementations in other systems.
  • Integrate file transfer capability into embedded projects without external runtime dependencies.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Implements the XMODEM file transfer protocol for sending and receiving files over character-based communication channels.

Yes. xmodem is a stable, actively maintained, dependency-free implementation of a protocol you need if working with serial devices or legacy systems. MIT license, low install friction, and no known vulnerabilities make it a straightforward choice for projects requiring XMODEM support.

Install

xmodem on PyPI

pip

pip install xmodem

uv

uv add xmodem

poetry

poetry add xmodem

Installing xmodem

Before you install

Low install friction with no runtime dependencies. Active maintenance as of 2026-03-04, with recent bug fixes and enhancements addressing timing and retry logic.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal obligations—suitable for commercial and proprietary projects.

Quickstart

from xmodem import XMODEM

def getc(size, timeout=1):
    return data_source.read(size) or None

def putc(data, timeout=1):
    return data_sink.write(data)

modem = XMODEM(getc, putc)
with open('file.bin', 'rb') as f:
    modem.send(f)

Requires a communication channel (typically serial port) and external library to provide getc/putc callbacks for reading and writing character data.

Verify before relying

  • Whether the package supports XMODEM-1K or only standard 128-byte blocks.
  • Performance characteristics on high-speed or modern communication interfaces.
  • Availability of active community support or response time for bug reports.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 163 days since the last release
Last repo commit
First released
Downloads 536,368/month — #6,126 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: xmodem-0.5.0-py3-none-any.whl

Keywords: xmodem, protocol

Tags

xmodem file transferserial protocol implementationbinary file transfer protocolxmodem send receivecharacter stream protocolembedded device file transfermodem protocol python
serial-protocolembedded-systemslegacy-support

More Networking packages