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.
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 /
.envfallback for credentials viapydantic-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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arr_py_client-0.3.0.tar.gz.
File metadata
- Download URL: arr_py_client-0.3.0.tar.gz
- Upload date:
- Size: 177.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffde56c2e0e28fb67f32b9297aeafaf92f0e38b3ee1d695b67e21c01990258ea
|
|
| MD5 |
7789fcfa94df8763c9f0be0580043ce1
|
|
| BLAKE2b-256 |
d3f90bb3a90a58f33f31db370f7c22b77218de19e96e1623063a36f30cf21082
|
Provenance
The following attestation bundles were made for arr_py_client-0.3.0.tar.gz:
Publisher:
release.yml on allada-homelab/arr-py-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arr_py_client-0.3.0.tar.gz -
Subject digest:
ffde56c2e0e28fb67f32b9297aeafaf92f0e38b3ee1d695b67e21c01990258ea - Sigstore transparency entry: 1344139340
- Sigstore integration time:
-
Permalink:
allada-homelab/arr-py-client@53ec9cbb398e88c7e3967114364226f8b6122854 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/allada-homelab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@53ec9cbb398e88c7e3967114364226f8b6122854 -
Trigger Event:
push
-
Statement type:
File details
Details for the file arr_py_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: arr_py_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 271.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aeff07401fe570b97aead593a1fcc4d387da5b201e76aeae6a9ede1511375cdb
|
|
| MD5 |
e150a670e2df649c32b4b761cd63ee68
|
|
| BLAKE2b-256 |
a763b349320672d01f163131e385297bb75f0a434f36d2e7f8710e9bf4df4f6f
|
Provenance
The following attestation bundles were made for arr_py_client-0.3.0-py3-none-any.whl:
Publisher:
release.yml on allada-homelab/arr-py-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arr_py_client-0.3.0-py3-none-any.whl -
Subject digest:
aeff07401fe570b97aead593a1fcc4d387da5b201e76aeae6a9ede1511375cdb - Sigstore transparency entry: 1344139435
- Sigstore integration time:
-
Permalink:
allada-homelab/arr-py-client@53ec9cbb398e88c7e3967114364226f8b6122854 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/allada-homelab
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
self-hosted -
Publication workflow:
release.yml@53ec9cbb398e88c7e3967114364226f8b6122854 -
Trigger Event:
push
-
Statement type: