Common Components
These components are available on all Arr clients (Sonarr, Radarr, Lidarr, etc.).
Backup
- class pyarr._sync.common.backup.Backup(handler: RequestHandler)[source]
Backup actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of available backups or a specific backup by ID.
- Parameters:
item_id (int | None, optional) – ID of the backup to return. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
Blocklist
- class pyarr._sync.common.blocklist.Blocklist(handler: RequestHandler)[source]
Blocklist actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of blocklists or a specific blocklist by ID.
- Parameters:
item_id (int | None, optional) – ID of the blocklist to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
Calendar
- class pyarr._sync.common.calendar.Calendar(handler: RequestHandler)[source]
Calendar actions for Arr clients.
- get(start_date: datetime | None = None, end_date: datetime | None = None, unmonitored: bool = True) list[dict[str, Any]][source]
Gets upcoming releases.
- Parameters:
start_date (datetime | None, optional) – Start datetime. Defaults to None.
end_date (datetime | None, optional) – End datetime. Defaults to None.
unmonitored (bool, optional) – Include unmonitored items. Defaults to True.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
Command
- class pyarr._sync.common.command.Command(handler: RequestHandler)[source]
Command actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Queries the status of a previously started command, or all currently started commands.
- Parameters:
item_id (int | None, optional) – Database ID of the command. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
Download Client
- class pyarr._sync.common.download_client.DownloadClient(handler: RequestHandler)[source]
Download client actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of download clients or a specific client by ID.
- Parameters:
item_id (int | None, optional) – ID of the download client to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
- get_schema(implementation: str | None = None) list[dict[str, Any]][source]
Gets the schemas for the different download clients.
- Parameters:
implementation (str | None, optional) – Client implementation name. Defaults to None.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
- add(data: dict[str, Any]) dict[str, Any][source]
Add a download client.
- Parameters:
data (JsonObject) – Dictionary with download client schema and settings.
- Returns:
Dictionary of added item.
- Return type:
JsonObject
History
- class pyarr._sync.common.history.History(handler: RequestHandler)[source]
History actions for Arr clients.
- get(page: int | None = None, page_size: int | None = None, sort_key: Literal['id', 'date', 'eventType', 'series.title', 'movieFile.relativePath', 'sourceTitle', 'status'] | None = None, sort_dir: Literal['ascending', 'default', 'descending'] | None = None) dict[str, Any][source]
Gets history (grabs/failures/completed).
- Parameters:
page (int | None, optional) – Page number to return. Defaults to None.
page_size (int | None, optional) – Number of items per page. Defaults to None.
sort_key (PyarrHistorySortKey | None, optional) – Field to sort by. Defaults to None.
sort_dir (PyarrSortDirection | None, optional) – Direction to sort the items. Defaults to None.
- Returns:
Dictionary with items.
- Return type:
JsonObject
Import List
- class pyarr._sync.common.import_list.ImportList(handler: RequestHandler)[source]
Import list actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of import lists or a specific list by ID.
- Parameters:
item_id (int | None, optional) – ID of the import list to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
- get_schema(implementation: str | None = None) list[dict[str, Any]][source]
Gets the schemas for the different import lists.
- Parameters:
implementation (str | None, optional) – Client implementation name. Defaults to None.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
- add(data: dict[str, Any]) dict[str, Any][source]
Add an import list.
- Parameters:
data (JsonObject) – Dictionary with import list schema and settings.
- Returns:
Dictionary of added item.
- Return type:
JsonObject
Indexer
- class pyarr._sync.common.indexer.Indexer(handler: RequestHandler)[source]
Indexer actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of indexers or a specific indexer by ID.
- Parameters:
item_id (int | None, optional) – ID of the indexer to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
- get_schema(implementation: str | None = None) list[dict[str, Any]][source]
Gets the schemas for the different indexers.
- Parameters:
implementation (str | None, optional) – Indexer implementation name. Defaults to None.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
Log
- class pyarr._sync.common.log.Log(handler: RequestHandler)[source]
Log actions for Arr clients.
- get(page: int | None = None, page_size: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, filter_key: str | None = None, filter_value: str | None = None) dict[str, Any][source]
Gets logs from instance.
- Parameters:
page (int | None, optional) – Specify page to return. Defaults to None.
page_size (int | None, optional) – Number of items per page. Defaults to None.
sort_key (str | None, optional) – Field to sort by. Defaults to None.
sort_dir (str | None, optional) – Direction to sort. Defaults to None.
filter_key (str | None, optional) – Key to filter by. Defaults to None.
filter_value (str | None, optional) – Value of the filter. Defaults to None.
- Returns:
Dictionary with items.
- Return type:
JsonObject
Metadata
- class pyarr._sync.common.metadata.Metadata(handler: RequestHandler)[source]
Metadata actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of metadata consumer settings or a specific record by ID.
- Parameters:
item_id (int | None, optional) – ID for specific metadata record. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
Notification
- class pyarr._sync.common.notification.Notification(handler: RequestHandler)[source]
Notification actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of notification services or a specific service by ID.
- Parameters:
item_id (int | None, optional) – ID of the notification to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
- get_schema(implementation: str | None = None) list[dict[str, Any]][source]
Gets the schemas for the different notification services.
- Parameters:
implementation (str | None, optional) – Notification implementation name. Defaults to None.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
- add(data: dict[str, Any]) dict[str, Any][source]
Add a notification service.
- Parameters:
data (JsonObject) – Dictionary with notification schema and settings.
- Returns:
Dictionary of added item.
- Return type:
JsonObject
Quality Definition
- class pyarr._sync.common.quality_definition.QualityDefinition(handler: RequestHandler)[source]
Quality definition actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of quality definitions or a specific definition by ID.
- Parameters:
item_id (int | None, optional) – ID of the quality definition to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
Quality Profile
- class pyarr._sync.common.quality_profile.QualityProfile(handler: RequestHandler)[source]
Quality profile actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of quality profiles or a specific profile by ID.
- Parameters:
item_id (int | None, optional) – ID of the quality profile to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
- get_schema() list[dict[str, Any]] | dict[str, Any][source]
Gets the schemas for quality profiles.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(data: dict[str, Any]) dict[str, Any][source]
Add a new quality profile.
- Parameters:
data (JsonObject) – Dictionary with quality profile settings.
- Returns:
Dictionary of added item.
- Return type:
JsonObject
Queue
- class pyarr._sync.common.queue.Queue(handler: RequestHandler)[source]
Queue actions for Arr clients.
- get(page: int | None = None, page_size: int | None = None, sort_key: str | None = None, sort_dir: str | None = None, **kwargs) dict[str, Any][source]
Returns the list of items in the queue.
- Parameters:
page (int | None, optional) – Page number to return. Defaults to None.
page_size (int | None, optional) – Number of items per page. Defaults to None.
sort_key (str | None, optional) – Field to sort by. Defaults to None.
sort_dir (str | None, optional) – Direction to sort the items. Defaults to None.
**kwargs – Additional parameters for specific clients.
- Returns:
Dictionary with items.
- Return type:
JsonObject
- delete(item_id: int, remove_from_client: bool | None = None, blocklist: bool | None = None, skip_redundant_dictionary_check: bool | None = None, mark_as_failed: bool | None = None, message: str | None = None) None[source]
Remove an item from the queue.
- Parameters:
item_id (int) – ID of the item to be removed.
remove_from_client (bool | None, optional) – Remove the item from the client. Defaults to None.
blocklist (bool | None, optional) – Add the item to the blocklist. Defaults to None.
skip_redundant_dictionary_check (bool | None, optional) – Skip redundant dictionary check. Defaults to None.
mark_as_failed (bool | None, optional) – Mark the item as failed (Sonarr v5). Defaults to None.
message (str | None, optional) – Message for failure (Sonarr v5). Defaults to None.
- bulk_delete(item_ids: list[int], remove_from_client: bool | None = None, blocklist: bool | None = None) None[source]
Remove multiple items from the queue.
- Parameters:
item_ids (list[int]) – List of IDs to be removed.
remove_from_client (bool | None, optional) – Remove the items from the client. Defaults to None.
blocklist (bool | None, optional) – Add the items to the blocklist. Defaults to None.
Remote Path Mapping
- class pyarr._sync.common.remote_path_mapping.RemotePathMapping(handler: RequestHandler)[source]
Remote path mapping actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of remote path mappings or a specific mapping by ID.
- Parameters:
item_id (int | None, optional) – ID of the mapping to return. Defaults to None.
- Returns:
The response data.
- Return type:
JsonArray | JsonObject
Root Folder
- class pyarr._sync.common.root_folder.RootFolder(handler: RequestHandler)[source]
Root folder actions for Arr clients.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Returns the list of root folders or a specific root folder by ID.
- Parameters:
item_id (int | None, optional) – ID of the root folder to return. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(path: str, name: str | None = None, default_quality_profile_id: int | None = None, default_metadata_profile_id: int | None = None, default_tags: list[int] | None = None) dict[str, Any][source]
Adds a new root folder.
- Parameters:
path (str) – The directory path.
name (str | None, optional) – Name for this root folder (Lidarr). Defaults to None.
default_quality_profile_id (int | None, optional) – Default quality profile ID (Lidarr). Defaults to None.
default_metadata_profile_id (int | None, optional) – Default metadata profile ID (Lidarr). Defaults to None.
default_tags (list[int] | None, optional) – List of default tag IDs (Lidarr). Defaults to None.
- Returns:
Dictionary containing path details.
- Return type:
JsonObject
System
- class pyarr._sync.common.system.System(handler: RequestHandler)[source]
System actions for Arr clients.
- get_status() dict[str, Any][source]
Gets system status.
- Returns:
Dictionary with items.
- Return type:
JsonObject
- get_health() list[dict[str, Any]][source]
Get health information.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
- get_diskspace() list[dict[str, Any]][source]
Get diskspace information.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray
- get_task(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]
Get task information.
- Parameters:
item_id (int | None, optional) – Get specific task by ID. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- request_restart() dict[str, Any][source]
Request system restart.
- Returns:
The response data.
- Return type:
JsonObject
- request_shutdown() dict[str, Any][source]
Request system shutdown.
- Returns:
The response data.
- Return type:
JsonObject
Tag
- class pyarr._sync.common.tag.Tag(handler: RequestHandler)[source]
Tag actions for Arr clients.
- get(item_id: int | None = None) Any[source]
Returns the list of added tags or a specific tag by ID.
- Parameters:
item_id (int | None, optional) – ID of the tag to return. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
Any
- get_detail(item_id: int | None = None) Any[source]
Returns detailed information about a specific tag or all tags.
- Parameters:
item_id (int | None, optional) – ID of the tag to return. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
Any
- create(label: str) dict[str, Any][source]
Adds a new tag.
- Parameters:
label (str) – Tag name / label.
- Returns:
Dictionary of added item.
- Return type:
JsonObject