File: PKG-INFO

package info (click to toggle)
python-echo 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 368 kB
  • sloc: python: 2,421; makefile: 148
file content (81 lines) | stat: -rw-r--r-- 2,593 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Metadata-Version: 2.1
Name: echo
Version: 0.9.0
Summary: Callback Properties in Python
Home-page: https://github.com/glue-viz/echo
Author: Chris Beaumont and Thomas Robitaille
Author-email: thomas.robitaille@gmail.com
Maintainer: Chris Beaumont and Thomas Robitaille
Maintainer-email: thomas.robitaille@gmail.com
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Classifier: Topic :: Utilities
Requires-Python: >=3.8
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: importlib_metadata; python_version < "3.9"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx; extra == "docs"
Requires-Dist: sphinx-automodapi; extra == "docs"
Requires-Dist: numpydoc; extra == "docs"
Requires-Dist: sphinx-rtd-theme; extra == "docs"
Provides-Extra: qt
Requires-Dist: qtpy; extra == "qt"
Requires-Dist: PyQt5>=5.14; extra == "qt"

|Azure Status| |Coverage status|

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/>`__

.. |Azure Status| image:: https://dev.azure.com/glue-viz/echo/_apis/build/status/glue-viz.echo?branchName=master
   :target: https://dev.azure.com/glue-viz/echo/_build/latest?definitionId=4&branchName=master
.. |Coverage Status| image:: https://codecov.io/gh/glue-viz/echo/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/glue-viz/echo