Callback Properties in Python
Project Links
Meta
Author: Chris Beaumont and Thomas Robitaille
Maintainer: Chris Beaumont and Thomas Robitaille
Requires Python: >=3.10
Classifiers
Intended Audience
- Developers
Natural Language
- English
Operating System
- OS Independent
Programming Language
- Python :: 3 :: Only
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
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
0.14.1
Mar 30, 2026
0.14.0
Mar 27, 2026
0.13.1
Mar 26, 2026
0.13.0
Mar 25, 2026
0.12.1
Feb 11, 2026
0.12.0
Feb 10, 2026
0.11.1
Nov 22, 2025
0.11.0
Jun 12, 2025
0.10.0
May 09, 2025
0.9.0
Jul 19, 2024
0.8.0
Oct 13, 2022
0.7
Sep 27, 2022
0.6
Dec 14, 2021
0.5
Sep 08, 2020
0.4
May 04, 2020
0.3
May 04, 2020
0.2
Apr 17, 2020
0.1
Mar 13, 2014