Synchronized dictionaries using Greg Little's `shelf` CRDT.
Project description
little-shelf
Synchronized dictionaries using Greg Little's shelf
CRDT.
Changes/patches can be distributed to peers through any channel. See the understory's Braid implementation as an example of real world usage.
Install
pip install little-shelf
Use
>>> import littleshelf
>>> alice = littleshelf.LittleShelf()
>>> bob = littleshelf.LittleShelf()
>>> patch = alice.set(ham="spam")
>>> patch
[{'ham': ['spam', 0]}, 0]
>>> alice
{'ham': 'spam'}
>>> alice == bob
False
>>> bob.merge(patch)
>>> alice == bob
True
>>> bob.get("ham") == bob["ham"] == "spam"
True
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
little-shelf-0.0.1.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for little_shelf-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e92af29ea1654812e45b6b306c7bacf9ae7aad7ad8ed2f3007cdcd9a04b3e17c |
|
MD5 | d8c12e40f3d3eaf3a9ba55c44af3865c |
|
BLAKE2b-256 | 058634b1800b3a629e3ee301504ccec5595b52cd0e8d6e408ad560fbe2fd1ea7 |