asyncify-python-2.1.0
توضیحات
A python library to make things async!
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | asyncify-python-2.1.0 |
| نام | asyncify-python |
| نسخه کتابخانه | 2.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | The Master |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/asyncify-python/ |
| مجوز | MIT |
Asyncify
=========
A python library with helpful things to be used with asyncio!
Documentation
---------------
https://asyncify.readthedocs.io/en/latest/
Installation
--------------
Python 3.7 or higher is required
.. code:: sh
$ pip install -U asyncify-python
Example
--------
.. code:: py
import asyncify
import requests
@asyncify.asyncify_func
def get(url: str) -> str:
return requests.get(url).text
# `get` is no longer a blocking function
# it is now a coroutine function
async def main():
text = await get('https://python.org')
# this is very useful to turn a blocking library into an async library
get = asyncify(requests.get)
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7.0 | Python |
نحوه نصب
نصب پکیج whl asyncify-python-2.1.0:
pip install asyncify-python-2.1.0.whl
نصب پکیج tar.gz asyncify-python-2.1.0:
pip install asyncify-python-2.1.0.tar.gz