Skip to main content

Typed sync + async Python client for Radarr v3 and Sonarr v3 APIs

Project description

arr-py-client

Typed synchronous and asynchronous Python client for Radarr and Sonarr v3 APIs.

CI PyPI Python Coverage License

Features

  • Pydantic v2 models for every request and response
  • Sync (RadarrClient, SonarrClient) and async (AsyncRadarrClient, AsyncSonarrClient) clients sharing the same API
  • Full v3 endpoint coverage for both apps, generated from upstream OpenAPI specs
  • Typed exceptions (ArrNotFoundError, ArrValidationError, etc.) with validation-detail parsing
  • Env / .env fallback for credentials via pydantic-settings
  • Configurable retry policy (idempotent GET only by default)
  • Ships py.typed (PEP 561) — IDEs and type checkers just work
  • Python 3.11–3.14

Install

pip install arr-py-client

Quickstart

from arr_py_client import RadarrClient

with RadarrClient(base_url="http://radarr:7878", api_key="YOUR_KEY") as client:
    movies = client.movies.list()
    for m in movies[:5]:
        print(m.id, m.title, m.year)

Or via environment variables — set RADARR_BASE_URL and RADARR_API_KEY and:

from arr_py_client import RadarrClient

with RadarrClient() as client:
    print(len(client.movies.list()))

Async mirrors the sync API:

from arr_py_client import AsyncRadarrClient

async def main() -> None:
    async with AsyncRadarrClient() as client:
        movies = await client.movies.list()
        print(len(movies))

The client also exposes auto-generated wrappers for every OpenAPI tag — for example client.tag.list_(), client.queue.list_(), client.system.list_status(). Method names follow <verb>[_<distinguisher>] (e.g., list_, get_by_id, create, update_by_id, delete_by_id).

Compared to pyarr

arr-py-client pyarr
Pydantic v2 models yes no (returns dicts)
Async support yes no
Full Radarr/Sonarr v3 coverage yes yes
Lidarr/Readarr/Prowlarr not yet yes
Ships py.typed yes no

Documentation

API reference: https://allada-homelab.github.io/arr-py-client/

Development

git clone https://github.com/allada-homelab/arr-py-client
cd arr-py-client
uv sync --all-groups
just test

Integration tests (require Docker):

just test-int

Regenerate clients from upstream specs:

just gen-radarr <radarr-tag>
just gen-sonarr <sonarr-tag>

Contributing

See CONTRIBUTING.md for setup, common recipes, and the release process.

License

MIT. See LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arr_py_client-0.2.1.tar.gz (144.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

arr_py_client-0.2.1-py3-none-any.whl (231.2 kB view details)

Uploaded Python 3

File details

Details for the file arr_py_client-0.2.1.tar.gz.

File metadata

  • Download URL: arr_py_client-0.2.1.tar.gz
  • Upload date:
  • Size: 144.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arr_py_client-0.2.1.tar.gz
Algorithm Hash digest
SHA256 6ef9ecaf0b55445e01bb24f5de63c46ff1ab40ee0c7c030696d29f26ad701dc6
MD5 407ed3eb169fc05ef4b5bd7f2f4c52c3
BLAKE2b-256 e28afc2fada45420650b89694d74220626853b0083fa2e843e4a5124b9aabaa9

See more details on using hashes here.

Provenance

The following attestation bundles were made for arr_py_client-0.2.1.tar.gz:

Publisher: release.yml on allada-homelab/arr-py-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arr_py_client-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: arr_py_client-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 231.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for arr_py_client-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8983776ec7a3f6650e1de18ea7cf19734230cac281df30b7edfe752bb4e4461
MD5 239f2f5ecf3c2c2ec675159d955e93a7
BLAKE2b-256 edd744152c356bca3a429ad71c73be7ebb65e4e53aa7bfa611db782400b5182f

See more details on using hashes here.

Provenance

The following attestation bundles were made for arr_py_client-0.2.1-py3-none-any.whl:

Publisher: release.yml on allada-homelab/arr-py-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page