🚀 Quick Start

This quick start guide will take you through the easiest way to get up and running.

Installation

This package is distributed on PyPI and can be installed with pip:

1 pip install pyarr

To use the package in your Python project, you will need to import the required modules from below:

1 from pyarr import Sonarr, Radarr, Readarr, Lidarr, Prowlarr, Bazarr, Whisparr, Dispatcharr

All of the library modules are based on the same format. The below example shows how to use Sonarr:

Synchronous Usage

 1 # Import Sonarr Class
 2 from pyarr import Sonarr
 3
 4 # Set Host, API-Key and Port
 5 host = 'your-domain.com'
 6 api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 7 port = 8989
 8
 9 # Instantiate Sonarr Object
10 sonarr = Sonarr(host, api_key, port)
11
12 # Get and print TV Shows using the series component
13 print(sonarr.series.get())

Asynchronous Usage

 1 import asyncio
 2 # Import AsyncSonarr Class
 3 from pyarr import AsyncSonarr
 4
 5 async def main():
 6     # Set Host, API-Key and Port
 7     host = 'your-domain.com'
 8     api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
 9     port = 8989
10
11     # Instantiate AsyncSonarr Object
12     async with AsyncSonarr(host, api_key, port) as sonarr:
13         # Get and print TV Shows using the series component
14         print(await sonarr.series.get())
15
16 asyncio.run(main())

Composition-based Architecture

The new version of PyArr uses a composition-based architecture. Instead of a flat list of methods, functionality is grouped into components:

  • client.series: Manage TV series (Sonarr, Bazarr)

  • client.movie: Manage movies (Radarr, Bazarr, Whisparr)

  • client.system: System status, health, and operations

  • client.tag: Manage tags

  • client.queue: Monitor and manage the download queue

  • client.history: View activity history

  • … and many more.

This structure makes the library more intuitive and easier to maintain.