concurrent-tool-0.0.1
توضیحات
Concurrent libraries for easy use of thread pools, process pools, and coroutines
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | concurrent-tool-0.0.1 |
| نام | concurrent-tool |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | lvyunze |
| ایمیل نویسنده | 17817462542@163.com |
| آدرس صفحه اصلی | https://github.com/lvyunze/concurrent-tool |
| آدرس اینترنتی | https://pypi.org/project/concurrent-tool/ |
| مجوز | - |
> pip install concurrent-tool
> Concurrent libraries for easy use of thread pools, process pools, and coroutines
> requests must be installed to test before use,but the concurrent-tool library is not dependent
```
import requests
from tool import Multithreading, Multiprocess, Coroutines
def get_info(url):
data = requests.get(url)
print(data.status_code)
return data
# use multithreading
request_list = [
"http://icanhazip.com",
"https://github.com/OmkarPathak/pygorithm",
"https://www.cnblogs.com/lipijin/p/3862684.html"
]
multithreading = Multithreading(get_info, request_list, 2)
multithreading.multithreading()
# use multiprocess
multiprocess = Multiprocess(get_info, request_list, 3)
multiprocess.multiprocess()
# use coroutines
Coroutines([get_info(url) for url in request_list])
```
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl concurrent-tool-0.0.1:
pip install concurrent-tool-0.0.1.whl
نصب پکیج tar.gz concurrent-tool-0.0.1:
pip install concurrent-tool-0.0.1.tar.gz