Metadata-Version: 2.1
Name: pyChainable
Version: 0.1.0
Summary: A package for creating chainable method calls in Python
Author: mr-wuliu
Author-email: mrwuliu <mr_wuliu@foxmail.com>
Project-URL: Homepage, https://github.com/mr-wuliu/PythonChainable
Project-URL: Issues, https://github.com/mr-wuliu/PythonChainable/issues
Platform: any
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE

# pyChainable

pyChainable 是一个 Python 包，允许您创建可链式调用的方法，同时保持对原始值的操作能力。


# 使用方法

```
python setup.py bdist_wheel
pip install dist/pyChainable-0.1.0-py3-none-any.whl
```

```python
from pychain import chainable
class MyClass:
    def __init__(self):
        self.value = 0

    @chainable
    def add(self, num):
        self.value += num
        return self.value

    @chainable
    def multiply(self, num):
        self.value *= num
        return self.value

obj = MyClass()
result = obj.add(1).add(2).multiply(3)
print(result)
```
