Utils

transmission_rpc.utils.format_size(size: int) Tuple[float, str][source]

Format byte size into IEC prefixes, B, KiB, MiB …

Parameters:

size (int)

Return type:

Tuple[float, str]

transmission_rpc.utils.format_speed(size: int) Tuple[float, str][source]

Format bytes per second speed into IEC prefixes, B/s, KiB/s, MiB/s …

Parameters:

size (int)

Return type:

Tuple[float, str]

transmission_rpc.utils.format_timedelta(delta: timedelta) str[source]

Format datetime.timedelta into <days> <hours>:<minutes>:<seconds>.

Parameters:

delta (timedelta)

Return type:

str

transmission_rpc.utils.get_torrent_arguments(rpc_version: int) List[str][source]

Get torrent arguments for method in specified Transmission RPC version.

Parameters:

rpc_version (int)

Return type:

List[str]