Session#
- class transmission_rpc.session.Session[source]#
Session is a class holding the session data for a Transmission daemon.
Access the session field can be done through attributes. The attributes available are the same as the session arguments in the Transmission RPC specification, but with underscore instead of hyphen.
get
'download-dir'
withsession.download_dir
.session = Client().get_session() current = session.download_dir
https://github.com/transmission/transmission/blob/main/docs/rpc-spec.md#41-session-arguments
Warning
setter on session’s properties has been removed, please use
Client().set_session()
instead- property alt_speed_down: int#
max global download speed (KBps)
- property alt_speed_enabled: bool#
- property alt_speed_time_begin: int#
minutes after midnight)
- Type:
when to turn on alt speeds (units
- property alt_speed_time_day: int#
what day(s) to turn on alt speeds (look at tr_sched_day)
- property alt_speed_time_enabled: bool#
true means the scheduled on/off times are used
- property alt_speed_time_end: int#
same)
- Type:
when to turn off alt speeds (units
- property alt_speed_up: int#
max global upload speed (KBps)
- property blocklist_enabled: bool#
true means enabled
- property blocklist_size: int#
int of rules in the blocklist
- property blocklist_url: str#
location of the blocklist to use for blocklist-update
- property cache_size_mb: int#
maximum size of the disk cache (MB)
- property config_dir: str#
location of transmission’s configuration directory
- property default_trackers: list | None#
list of default trackers to use on public torrents new at rpc-version 17
- property dht_enabled: bool#
true means allow dht in public torrents
- property download_dir: str#
default path to download torrents
- property download_dir_free_space: int#
DEPRECATED Use the free-space method instead.
- property download_queue_enabled: bool#
if true, limit how many torrents can be downloaded at once
- property download_queue_size: int#
max int of torrents to download at once (see download-queue-enabled)
- property encryption: Literal['required', 'preferred', 'tolerated']#
- fields: Dict[str, Any]#
raw fields
- get(key: str, default: T | None = None) Any #
get the raw value by the raw rpc response key
- Parameters:
key (str) –
default (T | None) –
- Return type:
Any
- property idle_seeding_limit: int#
torrents we’re seeding will be stopped if they’re idle for this long
- property idle_seeding_limit_enabled: bool#
true if the seeding inactivity limit is honored by default
- property incomplete_dir: str#
path for incomplete torrents, when enabled
- property incomplete_dir_enabled: bool#
true means keep torrents in incomplete-dir until done
- property lpd_enabled: bool#
true means allow Local Peer Discovery in public torrents
- property peer_limit_global: int#
maximum global int of peers
- property peer_limit_per_torrent: int#
maximum global int of peers
- property peer_port: int#
port int
- property peer_port_random_on_start: bool#
true means pick a random peer port on launch
- property pex_enabled: bool#
true means allow pex in public torrents
- property port_forwarding_enabled: bool#
true means ask upstream router to forward the configured peer port to transmission using UPnP or NAT-PMP
- property queue_stalled_enabled: bool#
whether or not to consider idle torrents as stalled
- property queue_stalled_minutes: int#
torrents that are idle for N minutes aren’t counted toward seed-queue-size or download-queue-size
- property rename_partial_files: bool#
true means append .part to incomplete files
- property rpc_version: int#
the current RPC API version
- property rpc_version_minimum: int#
the minimum RPC API version supported
- property rpc_version_semver: str | None#
the current RPC API version in a semver-compatible str new at rpc-version 17
- property script_torrent_added_enabled: bool | None#
whether or not to call the added script new at rpc-version 17
- property script_torrent_added_filename: str | None#
filename of the script to run new at rpc-version 17
- property script_torrent_done_enabled: bool#
whether or not to call the done script
- property script_torrent_done_filename: str#
filename of the script to run
- property script_torrent_done_seeding_enabled: bool | None#
whether or not to call the seeding-done script new at rpc-version 17
- property script_torrent_done_seeding_filename: str | None#
filename of the script to run new at rpc-version 17
- property seedRatioLimit: float#
the default seed ratio for torrents to use
- property seedRatioLimited: bool#
true if seedRatioLimit is honored by default
- property seed_queue_enabled: bool#
if true, limit how many torrents can be uploaded at once
- property seed_queue_size: int#
max int of torrents to uploaded at once (see seed-queue-enabled)
- property seed_ratio_limit: float#
the default seed ratio for torrents to use
- property seed_ratio_limited: bool#
true if seedRatioLimit is honored by default
- property speed_limit_down: int#
max global download speed (KBps)
- property speed_limit_down_enabled: bool#
true means enabled
- property speed_limit_up: int#
max global upload speed (KBps)
- property speed_limit_up_enabled: bool#
true means enabled
- property start_added_torrents: bool#
true means added torrents will be started right away
- property trash_original_torrent_files: bool#
true means the .torrent file of added torrents will be deleted
- property units: Units#
- property utp_enabled: bool#
true means allow utp
- property version: str#
long version str $version ($revision)
- class transmission_rpc.session.SessionStats[source]#
- property active_torrent_count: int#
- property cumulative_stats: Stats#
- property current_stats: Stats#
- property download_speed: int#
- fields: Dict[str, Any]#
raw fields
- get(key: str, default: T | None = None) Any #
get the raw value by the raw rpc response key
- Parameters:
key (str) –
default (T | None) –
- Return type:
Any
- property paused_torrent_count: int#
- property torrent_count: int#
- property upload_speed: int#