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

delete(item_id: int) dict[str, Any][source]

Delete a backup by ID.

Parameters:

item_id (int) – The ID of the backup to delete.

Returns:

The response data.

Return type:

JsonObject

create() dict[str, Any][source]

Creates a backup.

Returns:

An item including the backup information.

Return type:

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

delete(item_id: int) None[source]

Delete a blocklist by its database id.

Parameters:

item_id (int) – Database id of blocklist.

bulk_delete(item_ids: list[int]) None[source]

Delete blocklists in bulk.

Parameters:

item_ids (list[int]) – List of blocklist IDs.

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

execute(name: str, **kwargs) dict[str, Any][source]

Performs any of the predetermined command routines.

Parameters:
  • name (str) – Command name that should be executed.

  • **kwargs – Additional parameters for specific commands.

Returns:

Dictionary of command run.

Return type:

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit a download client by database id.

Parameters:
  • item_id (int) – Download client database id.

  • data (JsonObject) – Data to be updated within download client.

Returns:

Dictionary of updated item.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete a download client by ID.

Parameters:

item_id (int) – The ID of the download client to delete.

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit an import list by database id.

Parameters:
  • item_id (int) – Import list database id.

  • data (JsonObject) – Data to be updated within import list.

Returns:

Dictionary of updated item.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete an import list by ID.

Parameters:

item_id (int) – The ID of the import list to delete.

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit an indexer by database id.

Parameters:
  • item_id (int) – Indexer database id.

  • data (JsonObject) – Data to be updated within indexer.

Returns:

Dictionary of updated record.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete an indexer by ID.

Parameters:

item_id (int) – The ID of the indexer to delete.

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit a notification service by database id.

Parameters:
  • item_id (int) – Notification database id.

  • data (JsonObject) – Data to be updated within notification.

Returns:

Dictionary of updated item.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete a notification service by ID.

Parameters:

item_id (int) – The ID of the notification to delete.

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit a quality definition by database id.

Parameters:
  • item_id (int) – Quality definition database id.

  • data (JsonObject) – Data to be updated within quality definition.

Returns:

Dictionary of updated item.

Return type:

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

update(item_id: int, data: dict[str, Any]) dict[str, Any][source]

Edit a quality profile by database id.

Parameters:
  • item_id (int) – Quality profile database id.

  • data (JsonObject) – Data to be updated within quality profile.

Returns:

Dictionary of updated item.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete a quality profile by ID.

Parameters:

item_id (int) – The ID of the quality profile to delete.

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

delete(item_id: int) None[source]

Delete a root folder by ID.

Parameters:

item_id (int) – The ID of the root folder to delete.

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

get_routes() dict[str, Any][source]

Gets system routes.

Returns:

dict with all routes.

Return type:

JsonObject

get_routes_duplicate() dict[str, Any][source]

Gets system routes duplicate.

Returns:

dict with routes duplicate.

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

update(item_id: int, label: str) dict[str, Any][source]

Updates a tag by database id.

Parameters:
  • item_id (int) – Database id of tag.

  • label (str) – New label for the tag.

Returns:

Dictionary of updated item.

Return type:

JsonObject

delete(item_id: int) None[source]

Delete a tag by its database id.

Parameters:

item_id (int) – Database id of tag.

Update

class pyarr._sync.common.update.Update(handler: RequestHandler)[source]

Update actions for Arr clients.

get() list[dict[str, Any]][source]

Returns the list of available updates.

Returns:

List of dictionaries with items.

Return type:

JsonArray