stats ¤
This module defines the Stats class.
It holds information retrieved with the get_global_stat
method of the client.
Classes:
-
Stats
–This class holds information retrieved with the
get_global_stat
method of the client.
Stats ¤
Stats(struct: dict)
This class holds information retrieved with the get_global_stat
method of the client.
Parameters:
-
struct
(dict
) –A dictionary Python object returned by the JSON-RPC client.
Methods:
-
download_speed_string
–Return the download speed as string.
-
upload_speed_string
–Return the upload speed as string.
Attributes:
-
download_speed
(int
) –Overall download speed (byte/sec).
-
num_active
(int
) –Return the number of active downloads.
-
num_stopped
(int
) –Return the number of stopped downloads in the current session.
-
num_stopped_total
(int
) –Return the number of stopped downloads in the current session.
-
num_waiting
(int
) –Return the number of waiting downloads.
-
upload_speed
(int
) –Overall upload speed (byte/sec).
Source code in src/aria2p/stats.py
14 15 16 17 18 19 20 |
|
num_stopped property
¤
num_stopped: int
Return the number of stopped downloads in the current session.
This value is capped by the --max-download-result
option.
Returns:
-
int
–The number of stopped downloads in the current session (capped).
num_stopped_total property
¤
num_stopped_total: int
Return the number of stopped downloads in the current session.
This value is not capped by the --max-download-result
option.
Returns:
-
int
–The number of stopped downloads in the current session (not capped).
download_speed_string ¤
Return the download speed as string.
Parameters:
-
human_readable
(bool
, default:True
) –Return in human readable format or not.
Returns:
-
str
–The download speed string.
Source code in src/aria2p/stats.py
31 32 33 34 35 36 37 38 39 40 41 42 |
|
upload_speed_string ¤
Return the upload speed as string.
Parameters:
-
human_readable
(bool
, default:True
) –Return in human readable format or not.
Returns:
-
str
–The upload speed string.
Source code in src/aria2p/stats.py
53 54 55 56 57 58 59 60 61 62 63 64 |
|