Callback Properties in Python
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file echo-0.14.1.tar.gz.
File metadata
- Download URL: echo-0.14.1.tar.gz
- Upload date:
- Size: 56.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10c730018fb764ce867e78f5c353a3b15b249a49398894e734b4a487a12a34b9
|
|
| MD5 |
806ee725c8e84c23ff8d00381d6fa1f2
|
|
| BLAKE2b-256 |
532911010b6d6eea97e892b582d086c1cb9ded99d688eae47e6cba35e004ff7f
|
Provenance
The following attestation bundles were made for echo-0.14.1.tar.gz:
Publisher:
ci_workflows.yml on glue-viz/echo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
echo-0.14.1.tar.gz -
Subject digest:
10c730018fb764ce867e78f5c353a3b15b249a49398894e734b4a487a12a34b9 - Sigstore transparency entry: 1198773355
- Sigstore integration time:
-
Permalink:
glue-viz/echo@9f918ff695303c2e89acf96ef2beff2689004e0d -
Branch / Tag:
refs/tags/v0.14.1 - Owner: https://github.com/glue-viz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_workflows.yml@9f918ff695303c2e89acf96ef2beff2689004e0d -
Trigger Event:
push
-
Statement type:
File details
Details for the file echo-0.14.1-py3-none-any.whl.
File metadata
- Download URL: echo-0.14.1-py3-none-any.whl
- Upload date:
- Size: 53.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95c99479c1b92e3aaa59c5434919e5aabc0c9b05932e021cd44018b4eaf05257
|
|
| MD5 |
d4c1818d4de7ab1c282000f06c9c6b9d
|
|
| BLAKE2b-256 |
97b0b24ad29876e3a0ffeb275f6e3b8952d7510df1938abccadaad5dc727363e
|
Provenance
The following attestation bundles were made for echo-0.14.1-py3-none-any.whl:
Publisher:
ci_workflows.yml on glue-viz/echo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
echo-0.14.1-py3-none-any.whl -
Subject digest:
95c99479c1b92e3aaa59c5434919e5aabc0c9b05932e021cd44018b4eaf05257 - Sigstore transparency entry: 1198773360
- Sigstore integration time:
-
Permalink:
glue-viz/echo@9f918ff695303c2e89acf96ef2beff2689004e0d -
Branch / Tag:
refs/tags/v0.14.1 - Owner: https://github.com/glue-viz
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci_workflows.yml@9f918ff695303c2e89acf96ef2beff2689004e0d -
Trigger Event:
push
-
Statement type: