Registry / serialization / py3createtorrent

py3createtorrent

JSON →
library1.2.1pypypi✓ verified 85d ago

Command-line tool and Python module for creating torrent files. Version 1.2.1 supports multithreading, trackerless torrents, and bestN trackers shortcut. Requires Python 3.5-3.11. Active development on GitHub.

pip install py3createtorrent
INSTALL
IMPORT
SIG · PY3CREATETORRENT
P
py3createtorrent
serializationpythonv1.2.1
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18MB
glibc
py 3.103.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.
fix
No 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.
fix
Install 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.
fix
Upgrade 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.
fix
Review 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.
fix
Update 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.

Agent activity
9 hits · last 30 days
node
8
Resources
py3createtorrent — pip install py3createtorrent · libregistry