changetools-0.1.0
توضیحات
Change evaluation functions and decorators
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | changetools-0.1.0 |
| نام | changetools |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/changetools/ |
| مجوز | MIT |
# ChangeTools (Python)
Change evaluation functions and decorators.
## Direct example:
```
>>> from pathlib import Path
>>> from functools import partial
>>> from changetools import ChangeEvaluator
>>> hello_path = Path('hello.txt')
>>> _ = hello_path.write_text('hello')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> change_evaluator.changed
True
>>> change_evaluator.changed
False
>>> _ = hello_path.write_text('hi')
>>> change_evaluator.changed
True
>>> change_evaluator.changed
False
```
## While example:
```
>>> hello_path = Path('hello.txt')
>>> change_evaluator.changed
KeyboardInterrupt
>>> _ = hello_path.write_text('hello')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> while change_evaluator.changed:
... _ = hello_path.write_text('hi')
...
```
## For example using `cycle`:
```
>>> hello_path = Path('hello.txt')
>>> change_evaluator = ChangeEvaluator(partial(hello_path.read_text))
>>> _ = hello_path.write_text('hello')
>>> for i in change_evaluator.cycle(10):
... print(i)
... _ = hello_path.write_text('hi')
...
0
1
```
نیازمندی
| مقدار | نام |
|---|---|
| ~=22.10 | black |
| ~=0.9 | build |
| ~=1.3 | flake8-awesome |
| ~=0.991 | mypy |
| ~=7.2 | pytest |
| ~=3.27 | tox |
| ~=4.0 | twine |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| <4.0,>=3.7 | Python |
نحوه نصب
نصب پکیج whl changetools-0.1.0:
pip install changetools-0.1.0.whl
نصب پکیج tar.gz changetools-0.1.0:
pip install changetools-0.1.0.tar.gz