decs-0.0.4
توضیحات
A handful of useful general-purpose python decorators.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | decs-0.0.4 |
| نام | decs |
| نسخه کتابخانه | 0.0.4 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Sergey Kastryulin |
| ایمیل نویسنده | snk4tr@gmail.com |
| آدرس صفحه اصلی | https://github.com/python-packages/decs |
| آدرس اینترنتی | https://pypi.org/project/decs/ |
| مجوز | - |
# Decs [](https://travis-ci.org/python-packages/decs) [](https://codecov.io/gh/python-packages/decs) [](https://badge.fury.io/py/decs) [](https://opensource.org/licenses/MIT)
A handful of useful general-purpose python decorators.
### Installing
$ `pip install decs`
### How to use
Verify functions inputs and outputs types:
```python
from decs import accepts, returns
@returns(str)
@accepts(str)
def my_print(string):
print(string)
return string
```
Verify methods inputs and outputs types:
```python
from decs import accepts, returns
class SomeClass:
@returns(float)
@accepts('self', int, float)
def class_method(self, int_arg, float_arg):
return int_arg + float_arg
```
Repeat test case N times:
```python
from decs import repeat
N = 42
@repeat(N)
def test_something(arg):
pass
```
نیازمندی
| مقدار | نام |
|---|---|
| ==1.16.1 | numpy |
نحوه نصب
نصب پکیج whl decs-0.0.4:
pip install decs-0.0.4.whl
نصب پکیج tar.gz decs-0.0.4:
pip install decs-0.0.4.tar.gz