Pure Python 3 implementation of the X-, Y-, and Z-Modem file transfer protocols
Project description
Yesterwind XYZ-modem
Pure-Python async implementation of the X-, Y-, and Z-Modem file transfer protocols. No subprocesses, no external tools — everything is implemented in Python 3.9+.
Installation
pip install yesterwind-xyzmodem
Usage
ZModem receive (from any transport)
from yesterwind_xyzmodem.transport import StreamTransport
from yesterwind_xyzmodem.zmodem import ZModem
transport = StreamTransport(reader, writer)
zmodem = ZModem(transport)
received_paths = await zmodem.receive("./downloads")
ZModem send
zmodem = ZModem(transport)
await zmodem.send(["file1.bin", "file2.txt"])
XModem / YModem
from yesterwind_xyzmodem.xmodem import XModem
from yesterwind_xyzmodem.ymodem import YModem
xmodem = XModem(transport)
await xmodem.send("file.bin")
await xmodem.receive("file.bin")
ymodem = YModem(transport)
await ymodem.send(["a.bin", "b.txt"])
paths = await ymodem.receive("./downloads")
Progress callbacks
from yesterwind_xyzmodem.callbacks import EventType
def on_progress(p):
if p.event == EventType.BLOCK_RECEIVED:
print(f"{p.filename}: {p.bytes_transferred}/{p.total_bytes}")
zmodem = ZModem(transport, callback=on_progress)
Demos
rz — download via ZModem over TCP
Equivalent to rz --tcp-client, works against sz --tcp-server:
# On the sending machine (using our sz demo):
uv run demos/sz.py myfile.bin
# Prints the port, e.g.: Listening on 0.0.0.0:12345
# Or using the reference implementation:
sz --tcp-server myfile.bin
# On the receiving machine:
uv run demos/rz.py <host> <PORT> [-d download_dir]
sz — ZModem TCP server (send files to any rz client)
Sends one or more files to any connecting ZModem receiver. Mirrors
sz --tcp-server. The OS assigns a free port automatically unless
you specify one with --port.
# Single-shot: accept one client, send file, exit
uv run demos/sz.py myfile.bin
# Serve forever: keep listening, handle clients in parallel
uv run demos/sz.py --serve-forever -p 12345 file1.bin file2.bin
# Connect with the reference rz or our own client:
rz --tcp-client <host>:12345
uv run demos/rz.py <host> 12345
bbs — telnet BBS client with auto ZModem receive
Connects to any telnet BBS. ZModem transfers are detected automatically and a retro progress panel appears, just like PCPlus or XTalk4:
uv run demos/bbs.py bbs.fozztexx.com
uv run demos/bbs.py bbs.fozztexx.com 23 -d ~/Downloads/bbs
Press Ctrl+] to disconnect.
Development
uv sync
uv run pytest
Tests require 100% branch coverage.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yesterwind_xyzmodem-0.1.2.tar.gz.
File metadata
- Download URL: yesterwind_xyzmodem-0.1.2.tar.gz
- Upload date:
- Size: 44.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76abd1fa75fc03fd134e613cf4fb39769436dbf9a3f25e4903a2f28836c2b611
|
|
| MD5 |
4583c7bf29fd1ce776b853ff86d00b5f
|
|
| BLAKE2b-256 |
0ecd02a0302212c1df2ddcb10badc5b48f237ccfa841d3870d86321d9390017a
|
Provenance
The following attestation bundles were made for yesterwind_xyzmodem-0.1.2.tar.gz:
Publisher:
publish.yml on ehwio/yesterwind-xyzmodem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yesterwind_xyzmodem-0.1.2.tar.gz -
Subject digest:
76abd1fa75fc03fd134e613cf4fb39769436dbf9a3f25e4903a2f28836c2b611 - Sigstore transparency entry: 1808191041
- Sigstore integration time:
-
Permalink:
ehwio/yesterwind-xyzmodem@0b1819940612a8ab6ecb715f6ac745d88f6194f7 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ehwio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b1819940612a8ab6ecb715f6ac745d88f6194f7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yesterwind_xyzmodem-0.1.2-py3-none-any.whl.
File metadata
- Download URL: yesterwind_xyzmodem-0.1.2-py3-none-any.whl
- Upload date:
- Size: 31.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37de09daf67591669282718f09f9e019b40216456996c97da02f7845b67be343
|
|
| MD5 |
8d6f3d930c963a6c092c026787440bdf
|
|
| BLAKE2b-256 |
819cb5c83c84264523aa4cf19bb491b2422486d4fa5b5c89298f0150bc95223b
|
Provenance
The following attestation bundles were made for yesterwind_xyzmodem-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on ehwio/yesterwind-xyzmodem
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yesterwind_xyzmodem-0.1.2-py3-none-any.whl -
Subject digest:
37de09daf67591669282718f09f9e019b40216456996c97da02f7845b67be343 - Sigstore transparency entry: 1808191050
- Sigstore integration time:
-
Permalink:
ehwio/yesterwind-xyzmodem@0b1819940612a8ab6ecb715f6ac745d88f6194f7 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ehwio
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0b1819940612a8ab6ecb715f6ac745d88f6194f7 -
Trigger Event:
push
-
Statement type: