Rx based collections that supports change notification
Project description
Observable Collections
A Rx based collections implementation in Python
It contains following Observable collections and internally depends on RxPy
* ObservableList
* ObservableDict
* ObservableSet
These collections expose when_collection_changes()
method that creates an Observable which can be subscribed.
Any changes to the ObservableList / ObservableSet / ObservableDict
that modifies the collection, publishes the event either via on_next or error via on_error
Installation
#####Requires Python 3.5+
pip install observable-collections
Example
from reactive.ObservableList import ObservableList
ol = ObservableList([1, 2, 3, 4])
ol.when_collection_changes() \
.map(lambda x: x.Items) \
.subscribe(print, print)
ol.append(5)
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
File details
Details for the file observable-collections-0.1.2.tar.gz
.
File metadata
- Download URL: observable-collections-0.1.2.tar.gz
- Upload date:
- Size: 11.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 712b24037655e0080040b709e49b87c2c274af0380cedd2af8779a7a94bd898d |
|
MD5 | 3d1e761e6c0f929d9c873ad15184db9e |
|
BLAKE2b-256 | 4e76b482d32cb2bf9f384b39235fd09ac9d6d2c163a27fbcfb94829982b38fcd |
File details
Details for the file observable_collections-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: observable_collections-0.1.2-py3-none-any.whl
- Upload date:
- Size: 19.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e01111ab7c30bd9bf2310825e18dfaa0786ad4be83fb1cd13451bd5591651b94 |
|
MD5 | ad4ef0a0c6e0b397c218b8b0b41b90b9 |
|
BLAKE2b-256 | 08ecda57d02fd3925c7ab4f21cf472ddeea59ea572077005a23b59cf5a447bc0 |