aiodownloads-0.2.0
توضیحات
Asynchronous downloads
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiodownloads-0.2.0 |
| نام | aiodownloads |
| نسخه کتابخانه | 0.2.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | tinnguyen121221 |
| ایمیل نویسنده | tinnguyen121221@gmail.com |
| آدرس صفحه اصلی | https://github.com/tinnguyentg/aiodownloads |
| آدرس اینترنتی | https://pypi.org/project/aiodownloads/ |
| مجوز | MIT |
# aiodownloads
Asynchronous downloads
## Installation
```
pip install aiodownloads
```
## Usage
Inherit `aiodownloads.Downloader` then override handle_success, handle_fail methods
## Examples
- Download list of urls
```python
import asyncio
from aiodownloads import Downloader
urls = [
'https://httpbin.org/status/200',
'https://httpbin.org/status/400'
]
class UrlsDownloader(Downloader):
async def handle_success(self, resp, item):
content = await resp.read()
# save content stuff
async def handle_fail(self, resp, item):
...
url_downloader = UrlsDownloader()
asyncio.run(url_downloader.download(urls))
```
نیازمندی
| مقدار | نام |
|---|---|
| >=3.8.1,<4.0.0 | aiohttp |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.9,<4.0 | Python |
نحوه نصب
نصب پکیج whl aiodownloads-0.2.0:
pip install aiodownloads-0.2.0.whl
نصب پکیج tar.gz aiodownloads-0.2.0:
pip install aiodownloads-0.2.0.tar.gz