echo-0.9.0
توضیحات
Callback Properties in Python
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | echo-0.9.0 |
| نام | echo |
| نسخه کتابخانه | 0.9.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | ['Chris Beaumont and Thomas Robitaille <thomas.robitaille@gmail.com>'] |
| نویسنده | - |
| ایمیل نویسنده | Chris Beaumont and Thomas Robitaille <thomas.robitaille@gmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/echo/ |
| مجوز | - |
|CI Status| |Coverage Status| |PyPI Version|
echo: Callback Properties in Python
===================================
Echo is a small library for attaching callback functions to property
state changes. For example:
::
class Switch(object):
state = CallbackProperty('off')
def report_change(state):
print 'the switch is %s' % state
s = Switch()
add_callback(s, 'state', report_change)
s.state = 'on' # prints 'the switch is on'
CalllbackProperties can also be built using decorators
::
class Switch(object):
@callback_property
def state(self):
return self._state
@state.setter
def state(self, value):
if value not in ['on', 'off']:
raise ValueError("invalid setting")
self._state = value
Full documentation is avilable `here <http://echo.readthedocs.org/>`__
.. |CI Status| image:: https://github.com/glue-viz/echo/actions/workflows/ci_workflows.yml/badge.svg
:target: https://github.com/glue-viz/echo/actions/workflows/ci_workflows.yml
.. |Coverage Status| image:: https://codecov.io/gh/glue-viz/echo/branch/main/graph/badge.svg
:target: https://codecov.io/gh/glue-viz/echo
.. |PyPI Version| image:: https://img.shields.io/pypi/v/echo.svg
:target: https://pypi.org/project/echo/
نیازمندی
| مقدار | نام |
|---|---|
| - | numpy |
| xtr | numpydoc; |
| xtr | sphinx; |
| xtr | sphinx-automodapi; |
| xtr | sphinx-rtd-theme; |
| xtr | pyqt5>=5.14; |
| xtr | qtpy; |
| xtr | traitlets; |
| xtr | pytest; |
| xtr | pytest-cov; |
| xtr | ipywidgets; |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.10 | Python |
نحوه نصب
نصب پکیج whl echo-0.9.0:
pip install echo-0.9.0.whl
نصب پکیج tar.gz echo-0.9.0:
pip install echo-0.9.0.tar.gz