File: README.md

package info (click to toggle)
python-aiopyarr 23.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 2,300 kB
  • sloc: python: 25,335; makefile: 22; javascript: 11
file content (50 lines) | stat: -rw-r--r-- 1,545 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# aiopyarr

[![codecov](https://codecov.io/gh/tkdrob/aiopyarr/branch/master/graph/badge.svg)](https://codecov.io/gh/tkdrob/aiopyarr)
![python version](https://img.shields.io/badge/Python-3.9=><=3.10-blue.svg)
[![PyPI](https://img.shields.io/pypi/v/aiopyarr)](https://pypi.org/project/aiopyarr)
![Actions](https://github.com/tkdrob/aiopyarr/workflows/Actions/badge.svg?branch=master)

_Python API client for Lidarr/Radarr/Readarr/Sonarr._

## Installation

```bash
python3 -m pip install aiopyarr
```

## Example usage

More examples can be found in the `tests` directory.

```python
"""Example usage of aiopyarr."""
import asyncio
from aiopyarr.models.host_configuration import PyArrHostConfiguration
from aiopyarr.radarr_client import RadarrClient

IP = "192.168.100.3"
TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"


async def async_example():
    """Example usage of aiopyarr."""
    host_configuration = PyArrHostConfiguration(ipaddress=IP, api_token=TOKEN)
    async with RadarrClient(host_configuration=host_configuration) as client:
        print(await client.async_get_system_status())

asyncio.get_event_loop().run_until_complete(async_example())
```

## Contribute

**All** contributions are welcome!

1. Fork the repository
2. Clone the repository locally and open the devcontainer or use GitHub codespaces
3. Do your changes
4. Lint the files with `make lint`
5. Ensure all tests passes with `make test`
6. Ensure 100% coverage with `make coverage`
7. Commit your work, and push it to GitHub
8. Create a PR against the `master` branch