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.2.tar.gz
(5.4 kB
view hashes)
Built Distribution
Close
Hashes for little_shelf-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 247d16f1fc2da795d912ad3380a4320c1e6838ef42a83d41c40b7557b4d404e3 |
|
MD5 | 824ead98182446bb27d94c763280e8ab |
|
BLAKE2b-256 | aa797333120de9fd317eb41dba95ab65b753c446ab588f1508e53f1c4bf426bd |