Observer
The observer pattern is a software design pattern in which an object, called the subject, maintains a list of its dependents, called observers, and notifies them automatically of any state changes, usually by calling one of their methods [1].
The observer.py implementation has a topic-based system, a message filtering type of the publish–subscribe pattern (an observer pattern variation) [2]. Therefore, a subject can be subdivided into topics and observers can express interest in one (or more) topic and only receive notifications (with any message or not) from that.
The implementation is also based on the jquery publish–subscribe model [3] [4]. So, for convenience, observers will be called handlers and topics will be called events. The observer module has only two members: Event and Observable. An Observable instance allows you connect different handlers to its events. A handler can be any function, method or callable object.
A simpler implementation of the pattern can be found at old.py.
References
Metadata
Release files for pattern-observer 1.0.0
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 | |
|---|---|---|---|---|
| pattern-observer-1.0.0.tar.gz | 6.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pattern_observer-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.4 kB
Release files / pattern-observer-1.0.0.tar.gz
| Download URL | pattern-observer-1.0.0.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1aed03adacf1068c89d94187ff194cc0a8856000fcc032dca1e7a6a5aa9988cf
|
|
BLAKE2b-256 checksum How to use checksums |
dc569425a90dd71179a279ce2b027d851235ebf526a34bcdf53125df7480a601
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / pattern_observer-1.0.0-py3-none-any.whl
| Download URL | pattern_observer-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07eeeaf93b851ccd4c2ca2cc6565f28e8e81c7c2c3502524613dd175f810cade
|
|
BLAKE2b-256 checksum How to use checksums |
0617abe74c22416f9b0801e374f106e55cadde3778866ac019874071847ad556
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pattern-observer 1.0.0
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.