Tiny BitTorrent client rewritten in Python 3. It mirrors the behaviour of the original Go implementation described in https://blog.jse.li/posts/torrent/.
- Python 3.11+
- Ability to open outbound TCP connections to trackers/peers
python -m venv .venv
. .venv/bin/activate
python -m pip install --upgrade pip
python main.py debian-13.2.0-amd64-netinst.iso.torrent debian.isoLogging is verbose/colorful by default. Pass -q/--quiet to reduce output.
python -m unittest discover -s tests- Only supports
.torrentfiles (no magnet links) - Only supports HTTP trackers that return compact peer lists
- Single-file torrents only
- Download-only (does not upload pieces to peers)