xmodem
XMODEM protocol implementation.
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 xmodemuv
uv add xmodempoetry
poetry add xmodemInstalling 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
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
pexpect-serialExtends pexpect to work with serial ports by…
permissive · top 15,000 on PyPI
PyLinkPyLink provides a unified file-like interface…
permissive · top 15,000 on PyPI
serialxSerialx provides synchronous and native…
permissive · top 15,000 on PyPI
magic-wormholeMagic Wormhole transfers files, directories,…
permissive · top 15,000 on PyPI
scpProvides file transfer over SSH using the SCP…
copyleft · top 5,000 on PyPI
pysftppysftp provides a high-level Python interface…
permissive · top 5,000 on PyPI
pyaehw4a1Provides a Python interface to control Hisense…
permissive · top 15,000 on PyPI
pyftdiPyFtdi provides a pure-Python user-space driver…
permissive · top 15,000 on PyPI
minimalmodbusMinimalmodbus provides a Python interface to…
permissive · top 15,000 on PyPI
pymodbusPyModbus is a complete Modbus protocol…
permissive · top 5,000 on PyPI