clutch.method package¶
Submodules¶
clutch.method.method module¶
- class clutch.method.method.MethodNamespace(client=None)¶
Bases:
object
clutch.method.misc module¶
- class clutch.method.misc.MiscellaneousMethods(client=None)¶
Bases:
MethodNamespace- bandwidth_groups(group=None, tag=None)¶
Query for bandwidth groups.
- Parameters:
group (
str|list[str] |None)tag (
int|None)
- Return type:
Response[BandwidthGroupResponse]
- blocklist_update(tag=None)¶
Trigger an update of the client blocklist.
- Parameters:
tag (
int|None)- Return type:
Response[BlocklistResponse]
- free_space(path, tag=None)¶
Query for available free-space in the specified path.
- Parameters:
path (
str)tag (
int|None)
- Return type:
Response[FreeSpaceResponse]
- port_test(ip_protocol=None, tag=None)¶
Test the client to see if the port settings are open for connections.
- Parameters:
ip_protocol (
IpProtocol|None)tag (
int|None)
- Return type:
Response[PortTestResponse]
clutch.method.queue module¶
- class clutch.method.queue.QueueMethods(client=None)¶
Bases:
MethodNamespace- move(movement, ids, tag=None)¶
Change the position of one or more torrents in the queue.
- Parameters:
movement (
QueueMovement)ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active']])tag (
int|None)
- Return type:
clutch.method.session module¶
- class clutch.method.session.SessionMethods(client=None)¶
Bases:
MethodNamespace- accessor(fields=None, tag=None)¶
Retrieve information about one or more torrents.
- Parameters:
fields (
Optional[Set[Literal['alt_speed_down','alt_speed_enabled','alt_speed_time_begin','alt_speed_time_day','alt_speed_time_enabled','alt_speed_time_end','alt_speed_up','blocklist_enabled','blocklist_size','blocklist_url','cache_size_mb','config_dir','default_trackers','dht_enabled','download_dir','download_queue_enabled','download_queue_size','encryption','idle_seeding_limit_enabled','idle_seeding_limit','incomplete_dir_enabled','incomplete_dir','lpd_enabled','peer_limit_global','peer_limit_per_torrent','peer_port_random_on_start','peer_port','pex_enabled','port_forwarding_enabled','queue_stalled_enabled','queue_stalled_minutes','rename_partial_files','reqq','rpc_version_minimum','rpc_version_semver','rpc_version','script_torrent_added_enabled','script_torrent_added_filename','script_torrent_done_enabled','script_torrent_done_filename','script_torrent_done_seeding_enabled','script_torrent_done_seeding_filename','seed_queue_enabled','seed_queue_size','seed_ratio_limit','seed_ratio_limited','session_id','speed_limit_down_enabled','speed_limit_down','speed_limit_up_enabled','speed_limit_up','start_added_torrents','trash_original_torrent_files','units','utp_enabled','version']]])tag (
int|None)
- Return type:
Response[SessionAccessor]
- mutator(arguments, tag=None)¶
Set a property of one or more torrents.
- Parameters:
arguments (
SessionMutatorArguments)tag (
int|None)
- Return type:
- stats(tag=None)¶
Retrieve all session statistics.
- Parameters:
tag (
int|None)- Return type:
Response[SessionStats]
clutch.method.torrent module¶
- class clutch.method.torrent.TorrentMethods(client=None)¶
Bases:
MethodNamespace- accessor(fields=None, *, all_fields=False, ids=None, response_format=None, tag=None)¶
Retrieve information about one or more torrents.
- Parameters:
fields (
Optional[Set[Literal['activity_date','added_date','availability','bandwidth_priority','comment','corrupt_ever','creator','date_created','desired_available','done_date','download_dir','downloaded_ever','download_limit','download_limited','edit_date','error','error_string','eta','eta_idle','file_count','files','file_stats','group','hash_string','have_unchecked','have_valid','honors_session_limits','id','is_finished','is_private','is_stalled','labels','left_until_done','magnet_link','manual_announce_time','max_connected_peers','metadata_percent_complete','name','peer_limit','peers','peers_connected','peers_from','peers_getting_from_us','peers_sending_to_us','percent_complete','percent_done','pieces','piece_count','piece_size','priorities','primary_mime_type','queue_position','rate_download','rate_upload','recheck_progress','seconds_downloading','seconds_seeding','seed_idle_limit','seed_idle_mode','seed_ratio_limit','seed_ratio_mode','sequential_download','size_when_done','start_date','status','trackers','tracker_list','tracker_stats','total_size','torrent_file','uploaded_ever','upload_limit','upload_limited','upload_ratio','wanted','webseeds','webseeds_sending_to_us']]])all_fields (
bool)ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active'],None])response_format (
Optional[Literal['objects','table']])tag (
int|None)
- Return type:
Response[TorrentAccessorResponse]
- action(method, ids=None, tag=None)¶
Start, stop, verify or reannounce a torrent.
- Parameters:
method (
TorrentActionMethod)ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active'],None])tag (
int|None)
- Return type:
- add(arguments, tag=None)¶
Add a new torrent.
- Parameters:
arguments (
Union[TorrentAddByFilenameArguments,TorrentAddByMetainfoArguments])tag (
int|None)
- Return type:
Response[TorrentAdd]
- move(ids, location, move=False, tag=None)¶
Change the storage location of a torrent.
- Parameters:
ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active']])location (
str)move (
bool)tag (
int|None)
- Return type:
- mutator(ids=None, arguments=None, tag=None)¶
Set a property of one or more torrents.
- Parameters:
ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active'],None])arguments (
TorrentMutatorArguments|None)tag (
int|None)
- Return type:
- remove(ids, delete_local_data=False, tag=None)¶
Remove one or more torrents.
- Parameters:
ids (
Union[int,Iterable[Union[int,str]],Iterable[int],Iterable[str],Literal['recently_active']])delete_local_data (
bool)tag (
int|None)
- Return type:
- rename(ids, path, name, tag=None)¶
Rename a file or directory in a torrent.
- Parameters:
ids (
Sequence[Union[str,int]])path (
str)name (
str)tag (
int|None)
- Return type:
Response[TorrentRename]