Registry / http-networking / transmission-rpc

transmission-rpc

JSON →
library7.0.11pypypi✓ verified 85d ago

Python module that implements the Transmission BitTorrent client JSON-RPC protocol. Current stable version is 7.0.11, requires Python ~=3.8. Pre-release version 8.0.0a4 is available with breaking changes. Maintained by Trim21. Active development.

pip install transmission-rpc
INSTALL
IMPORT
SIG · TRANSMISSION-RPC
T
transmission-rpc
http-networkingpythonv7.0.11
Install
2.2s avg
Import
696ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v7.0.11 · 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.742s · 21.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.2s · import 0.650s · 22MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from transmission_rpc import Client
from transmissionrpc import Client
Old package name 'transmissionrpc' is deprecated; use 'transmission_rpc'
Torrent
from transmission_rpc import Torrent

Connect to Transmission and list torrents. Auth via environment variables.

from transmission_rpc import Client c = Client(host='localhost', port=9091, username=os.environ.get('TR_USER', ''), password=os.environ.get('TR_PASS', '')) torrents = c.get_torrents() for t in torrents: print(t.name, t.percent_done)
Debug
Known issues
breakingVersion 8.0.0a0+ removed the 'requests' library dependency and changed '.pieces' from base64 string to BitMap object. Code relying on old .pieces format will break.
fix
Use 'bytes(pieces)' or access BitMap methods. See changelog for migration path.
affects: >=8.0.0a0
deprecatedThe old import 'import transmissionrpc' (no underscore) is deprecated and will be removed. Always use 'transmission_rpc'.
fix
Replace 'import transmissionrpc' with 'import transmission_rpc'.
affects: >=7.0.0
gotchaWhen calling change_torrent(tracker_list=...), setting tiers correctly requires a specific list format. Passing a flat list may not preserve tiers.
fix
Use a list of lists: [[tracker1, tracker2], [tracker3]] for two tiers.
affects: >=7.0.0
breakingIn version 8.0.0a3, return types for 'peers' and 'peers_from' changed. Code expecting old types may break.
fix
Update type annotations and attribute access accordingly.
affects: >=8.0.0a3
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'transmissionrpc'
Using old deprecated package name with underscore missing.
fix
Install transmission-rpc and use 'from transmission_rpc import Client'.
transmission_rpc.error.TransmissionError: Couldn't connect to server
Incorrect host, port, or authentication credentials, or Transmission RPC not enabled.
fix
Verify Transmission settings: enable 'rpc-whitelist' and set 'rpc-port'. Check host, port, username, password.
AttributeError: 'Torrent' object has no attribute 'pieces'
Using v8.0.0a0+ where .pieces returns a BitMap instead of base64 string; property name may have changed.
fix
If on v8+, use 'bytes(t.pieces)' or check for 'bitfield' attribute. Use older v7 if compatibility needed.
Upgrade
Version history
7.0.11latest on PyPI · released Aug 20, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
transmission-rpc — pip install transmission-rpc · libregistry