KeepMePosted Documentation
This module provides an object-oriented event handling framework. In this framework, events are registered by classes and then broadcasted by individual objects. Listening for events from specific objects is made easy.
Installation
KeepMePosted can be installed from PyPI:
$ pip install kemepo
You can also download the source code directly from GitHub. The code is made available under the MIT license. If you find the code useful and want to make improvements, feel free to make pull requests:
$ git clone https://github.com/kalekundert/KeepMePosted.git kemepo
Simple Example
The most important parts of this framework are the Dispatcher class and the event() decorator. Dispatcher is a base class for objects that want to broadcast events and the event decorator is used to register events.
>>> from kemepo import Dispatcher, event
>>> class Button (Dispatcher):
@event
def on_press(self):
print('Calling internal handler')
The method decorated by event() is taken to be the “internal handler”, distinct from any “external observers” that may be attached using connect() later on. When an event is triggered using handle(), the internal handler is called before the external observers.
>>> button = Button()
>>> button.connect(on_press=lambda: print('Calling external observer.'))
>>> button.handle('on_press')
Calling internal handler.
Calling external observer.
Complete Documentation
The complete documentation for this module is hosted by ReadTheDocs.
Metadata
Release files for KeepMePosted 0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| KeepMePosted-0.3.tar.gz | 6.5 kB | Without provenance | Details for KeepMePosted-0.3.tar.gz |
Release files / KeepMePosted-0.3.tar.gz
| Download URL | KeepMePosted-0.3.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5be43a63401ac8c195bbcae3da3dd9977ea32c979e4cd942a1b0392756b5cc1d
|
|
BLAKE2b-256 checksum How to use checksums |
ffafb631204f4c8bb66db0cf17daddac68713519ec045598a1dce44f7b2fc712
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for KeepMePosted 0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.