Install & Compatibility
Where this runs
tested against v1.2.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
create_torrent
✓ from py3createtorrent import create_torrent
✗ from py3createtorrent import createTorrent
Config
✓ from py3createtorrent import Config
bencode
✓ from py3createtorrent import bencode
Create a torrent file with trackers.
from py3createtorrent import createTorrent
createTorrent(
source='/path/to/files',
output='/path/to/output.torrent',
trackers=['udp://tracker.opentrackr.org:1337/announce'],
name='My Torrent'
)
py3createtorrent --version
Debug
Known issues
breakingLicense changed from GPL to LGPL in v1.2.0. If you relied on GPL, check compatibility.fixNo action needed unless license compliance is an issue; LGPL is more permissive.
affects: >=1.2.0
gotchaPython 3.7 and earlier require typing-extensions. Without it, import may fail.fixInstall typing-extensions: pip install typing-extensions or upgrade to Python 3.8+.
affects: <1.2.1, Python <3.8
gotchaUnicodeEncodeError when printing paths with rare characters. Fixed in v1.2.1b1.fixUpgrade to py3createtorrent>=1.2.1 or set PYTHONIOENCODING=utf-8.
affects: <1.2.1
deprecatedOld default piece size maximum (16 MiB) increased to 64 MiB in v1.2.0. Torrents created with older version may have different piece sizes.fixReview piece size if backward compatibility needed; use --piece-size-min/--piece-size-max to override.
affects: >=1.2.0
breakingSpecifying trackers became optional (--trackers flag) in v1.0.0; trackerless torrents now possible.fixUpdate scripts that always passed trackers; now you can omit them.
affects: >=1.0.0
Upgrade
Version history
1.2.1latest on PyPI · released Jun 8, 2024
Audit
Dependencies
No dependency data recorded yet.