|
1 | 1 | # PyLoadAPI
|
2 | 2 |
|
3 |
| -<p align="center"> |
4 |
| - <em>Simple wrapper for pyLoad's API.</em> |
5 |
| -</p> |
| 3 | + *Simple wrapper for pyLoad's API.* |
| 4 | + |
| 5 | +This module provides a simplified interface (PyLoadAPI class) to interact with |
| 6 | +pyLoad's API using aiohttp for asynchronous HTTP requests. It handles login |
| 7 | +authentication and provides methods to perform various operations such as |
| 8 | +pausing downloads, restarting pyLoad, retrieving status information, and more. |
6 | 9 |
|
7 | 10 | [](https://github.com/tr4nt0r/pyloadapi/actions)
|
8 | 11 | [](https://codecov.io/gh/tr4nt0r/pyloadapi)
|
9 | 12 | [](https://badge.fury.io/py/PyLoadAPI)
|
10 | 13 | [](https://www.buymeacoffee.com/tr4nt0r)
|
| 14 | +[](https://github.com/sponsors/tr4nt0r) |
| 15 | + |
| 16 | +--- |
| 17 | + |
| 18 | +## 📖 Documentation |
| 19 | + |
| 20 | +- **Full Documentation**: [https://tr4nt0r.github.io/pyloadapi](https://tr4nt0r.github.io/pyloadapi) |
| 21 | +- **Source Code**: [https://github.com/tr4nt0r/pyloadapi](https://github.com/tr4nt0r/pyloadapi) |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## 📦 Installation |
| 26 | + |
| 27 | +You can install PyLoadAPI via pip: |
| 28 | + |
| 29 | +```sh |
| 30 | +pip install PyLoadAPI |
| 31 | +``` |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## 🚀 Usage |
| 36 | + |
| 37 | +### Basic Example |
| 38 | + |
| 39 | +```python |
| 40 | +import asyncio |
| 41 | +from pyloadapi import PyLoadAPI |
| 42 | + |
| 43 | +async def main(): |
| 44 | + async with PyLoadAPI("http://localhost:8000", "username", "password") as api: |
| 45 | + status = await api.status() |
| 46 | + print(status) |
| 47 | + |
| 48 | +asyncio.run(main()) |
| 49 | +``` |
| 50 | + |
| 51 | +### More Examples |
| 52 | + |
| 53 | +<details> |
11 | 54 |
|
| 55 | +<summary>Pause Downloads</summary> |
| 56 | + |
| 57 | +```python |
| 58 | +await api.pause(True) # Pause all downloads |
| 59 | +``` |
| 60 | + |
| 61 | +</details> |
| 62 | + |
| 63 | +<details> |
| 64 | + |
| 65 | +<summary>Resume Downloads</summary> |
| 66 | + |
| 67 | +```python |
| 68 | +await api.pause(False) # Resume all downloads |
| 69 | +``` |
| 70 | + |
| 71 | +</details> |
| 72 | + |
| 73 | +<details> |
| 74 | + |
| 75 | +<summary>Restart pyLoad</summary> |
| 76 | + |
| 77 | +```python |
| 78 | +await api.restart() |
| 79 | +``` |
| 80 | + |
| 81 | +</details> |
| 82 | + |
| 83 | +For more advanced usage, refer to the [documentation](https://tr4nt0r.github.io/pyloadapi). |
12 | 84 |
|
13 | 85 | ---
|
14 | 86 |
|
15 |
| -**Documentation**: <a href="https://tr4nt0r.github.io/pyloadapi" target="_blank">https://tr4nt0r.github.io/pyloadapi</a> |
| 87 | +## 🛠 Contributing |
| 88 | + |
| 89 | +Contributions are welcome! To contribute: |
| 90 | + |
| 91 | +1. Fork the repository. |
| 92 | +2. Create a new branch. |
| 93 | +3. Make your changes and commit them. |
| 94 | +4. Submit a pull request. |
16 | 95 |
|
17 |
| -**Source Code**: <a href="https://github.com/tr4nt0r/pyloadapi" target="_blank">https://github.com/tr4nt0r/pyloadapi</a> |
| 96 | +Make sure to follow the [contributing guidelines](CONTRIBUTING.md). |
18 | 97 |
|
19 | 98 | ---
|
| 99 | + |
| 100 | +## 📜 License |
| 101 | + |
| 102 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 103 | + |
| 104 | +--- |
| 105 | + |
| 106 | +## ❤️ Support |
| 107 | + |
| 108 | +If you find this project useful, consider [buying me a coffee ☕](https://www.buymeacoffee.com/tr4nt0r) or [sponsoring me on GitHub](https://github.com/sponsors/tr4nt0r)! |
0 commit comments