classic-aspects-0.0.1
توضیحات
Provides convenient utils for late decorating, based on idea of aspects-oriented programming
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | classic-aspects-0.0.1 |
| نام | classic-aspects |
| نسخه کتابخانه | 0.0.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Sergei Variasov |
| ایمیل نویسنده | variasov@gmail.com |
| آدرس صفحه اصلی | https://github.com/variasov/classic_aspects |
| آدرس اینترنتی | https://pypi.org/project/classic-aspects/ |
| مجوز | - |
# Classic Aspects
This package provides convenient utils for late decorating, based on idea of
aspects-oriented programming. Part of project "Classic".
Usage:
```python
from classic.aspects import PointCut
points = PointCut()
@points.join_point
def add_numbers(left, right):
return left + right
assert add_numbers(1, 2) == 3 # Returns 3
def some_decorator(fn):
def wrapper(*args, **kwargs):
print('Function called!')
return fn(*args, **kwargs)
return wrapper
add_numbers.join(some_decorator)
assert add_numbers(1, 2) == 3 # Returns 3 and print "Function called!"
```
نیازمندی
| مقدار | نام |
|---|---|
| ~=6.2.5 | pytest |
| ~=2.12.1 | pytest-cov |
| ~=3.4.2 | twine |
| ~=0.7.0 | build |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl classic-aspects-0.0.1:
pip install classic-aspects-0.0.1.whl
نصب پکیج tar.gz classic-aspects-0.0.1:
pip install classic-aspects-0.0.1.tar.gz