Readarrο
Note
An asynchronous version of this client is available as AsyncReadarr.
The API is identical, but all methods are coroutines and must be awaited.
- class pyarr._sync.readarr.Readarr(host: str, api_key: str, port: int = 8787, tls: bool = True, base_path: str = '', request_timeout: int | None = None, api_ver: str | None = None)[source]ο
Readarr API client.
Bookο
- class pyarr._sync.readarr.book.Book(handler: RequestHandler)[source]ο
Book actions for Readarr.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]ο
Returns books by ID or all books.
- Parameters:
item_id (int | None, optional) β Database ID for book. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(book: dict[str, Any], root_dir: str, quality_profile_id: int, metadata_profile_id: int, monitored: bool = True, search_for_new_book: bool = False, author_monitor: str = 'all', author_search_for_missing_books: bool = False) dict[str, Any][source]ο
Add a new book and its associated author.
- Parameters:
book (JsonObject) β A book object from lookup().
root_dir (str) β The root directory for the books to be saved.
quality_profile_id (int) β Quality profile ID.
metadata_profile_id (int) β Metadata profile ID.
monitored (bool, optional) β Monitor the book. Defaults to True.
search_for_new_book (bool, optional) β Look for new books. Defaults to False.
author_monitor (str, optional) β Author monitor type. Defaults to βallβ.
author_search_for_missing_books (bool, optional) β Search missing books. Defaults to False.
- Returns:
A copy of the added book.
- Return type:
JsonObject
- update(book: dict[str, Any], editions: list[dict[str, Any]]) dict[str, Any][source]ο
Update the given book.
- Parameters:
book (JsonObject) β All parameters to update book.
editions (JsonArray) β List of editions to update.
- Returns:
Dictionary with updated record.
- Return type:
JsonObject
- monitor(book_ids: list[int], monitored: bool = True) list[dict[str, Any]][source]ο
Update book monitored status.
- Parameters:
book_ids (list[int]) β All book IDs to be updated.
monitored (bool, optional) β True or False. Defaults to True.
- Returns:
list of dictionaries containing updated records.
- Return type:
JsonArray
- delete(item_id: int, delete_files: bool = False, import_list_exclusion: bool = False) None[source]ο
Delete the book with the given ID.
- Parameters:
item_id (int) β Database ID for book.
delete_files (bool, optional) β Delete folder and files. Defaults to False.
import_list_exclusion (bool, optional) β Add exclusion. Defaults to False.
Editionο
Metadata Profileο
- class pyarr._sync.readarr.metadata_profile.MetadataProfile(handler: RequestHandler)[source]ο
Metadata profile actions for Readarr.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]ο
Returns metadata profiles by ID or all profiles.
- Parameters:
item_id (int | None, optional) β Database ID for profile. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(name: str, min_popularity: int, skip_missing_date: bool, skip_missing_isbn: bool, skip_parts_and_sets: bool, skip_series_secondary: bool, allowed_languages: str, min_pages: int) dict[str, Any][source]ο
Add a metadata profile.
- Parameters:
name (str) β Name of the profile.
min_popularity (int) β Minimum popularity.
skip_missing_date (bool) β Skip missing dates.
skip_missing_isbn (bool) β Skip missing ISBN.
skip_parts_and_sets (bool) β Skip parts and sets.
skip_series_secondary (bool) β Skip series secondary.
allowed_languages (str) β List of allowed languages.
min_pages (int) β Minimum pages.
- Returns:
Dictionary of added record.
- Return type:
JsonObject
Release Profileο
- class pyarr._sync.readarr.release_profile.ReleaseProfile(handler: RequestHandler)[source]ο
Release profile actions for Readarr.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]ο
Returns release profiles by ID or all profiles.
- Parameters:
item_id (int | None, optional) β Database ID for profile. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(ignored: list, required: list, indexer_id: int = 0, tags: list[int] | None = None, enabled: bool = True, include_preferred_when_renaming: bool = False) dict[str, Any][source]ο
Add a release profile.
- Parameters:
ignored (list) β List of terms to ignore.
required (list) β List of terms required.
indexer_id (int, optional) β ID for preferred indexer. Defaults to 0.
tags (list[int] | None, optional) β List of tag IDs. Defaults to None.
enabled (bool, optional) β Enable profile. Defaults to True.
include_preferred_when_renaming (bool, optional) β Include preferred when renaming. Defaults to False.
- Returns:
Dictionary of added record.
- Return type:
JsonObject
Delay Profileο
- class pyarr._sync.readarr.delay_profile.DelayProfile(handler: RequestHandler)[source]ο
Delay profile actions for Readarr.
- get(item_id: int | None = None) list[dict[str, Any]] | dict[str, Any][source]ο
Returns delay profiles by ID or all profiles.
- Parameters:
item_id (int | None, optional) β Database ID for profile. Defaults to None.
- Returns:
List of dictionaries with items or a single dictionary.
- Return type:
JsonArray | JsonObject
- add(tags: list[int], preferred_protocol: str = 'usenet', usenet_delay: int = 0, torrent_delay: int = 0, bypass_if_highest_quality: bool = False, bypass_if_above_custom_format_score: bool = False, minimum_custom_format_score: int = 0) dict[str, Any][source]ο
Add a delay profile.
- Parameters:
tags (list[int]) β List of tag IDs.
preferred_protocol (str, optional) β Preferred protocol. Defaults to βusenetβ.
usenet_delay (int, optional) β Usenet delay. Defaults to 0.
torrent_delay (int, optional) β Torrent delay. Defaults to 0.
bypass_if_highest_quality (bool, optional) β Bypass if highest quality. Defaults to False.
bypass_if_above_custom_format_score (bool, optional) β Bypass if above score. Defaults to False.
minimum_custom_format_score (int, optional) β Minimum score. Defaults to 0.
- Returns:
Dictionary of added record.
- Return type:
JsonObject
Manual Importο
- class pyarr._sync.readarr.manual_import.ManualImport(handler: RequestHandler)[source]ο
Manual import actions for Readarr.
- get(folder: str, download_id: str | None = None, author_id: int | None = None, filter_existing_files: bool = True, replace_existing_files: bool = True) list[dict[str, Any]][source]ο
Gets a manual import list.
- Parameters:
folder (str) β Folder name.
download_id (str | None, optional) β Download ID. Defaults to None.
author_id (int | None, optional) β Author Database ID. Defaults to None.
filter_existing_files (bool, optional) β Filter files. Defaults to True.
replace_existing_files (bool, optional) β Replace files. Defaults to True.
- Returns:
List of dictionaries with items.
- Return type:
JsonArray