aiodecorators-0.2.1
توضیحات
Function decorators based on asyncio synchronization primitives
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | aiodecorators-0.2.1 |
| نام | aiodecorators |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Daniel Lupu |
| ایمیل نویسنده | dflupu@gmail.com |
| آدرس صفحه اصلی | http://github.com/dflupu/aiodecorators |
| آدرس اینترنتی | https://pypi.org/project/aiodecorators/ |
| مجوز | MIT |
# aiodecorators
Function decorators based on asyncio Lock, Semaphore and BoundedSemaphore
## Install
`pip3 install aiodecorators`
## Usage
[asyncio.Lock](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Lock)
```
from aiodecorators import Lock
@Lock()
async def f():
pass
```
[asyncio.Semaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.Semaphore)
```
from aiodecorators import Semaphore
@Semaphore(n)
async def f():
pass
```
[asyncio.BoundedSemaphore](https://docs.python.org/3/library/asyncio-sync.html#asyncio.BoundedSemaphore)
```
from aiodecorators import BoundedSemaphore
@BoundedSemaphore(n)
async def f():
pass
```
نحوه نصب
نصب پکیج whl aiodecorators-0.2.1:
pip install aiodecorators-0.2.1.whl
نصب پکیج tar.gz aiodecorators-0.2.1:
pip install aiodecorators-0.2.1.tar.gz