Skip to main content

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


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 details)

Uploaded Source

Built Distribution

little_shelf-0.0.2-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file little-shelf-0.0.2.tar.gz.

File metadata

  • Download URL: little-shelf-0.0.2.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/4.19.0-16-amd64

File hashes

Hashes for little-shelf-0.0.2.tar.gz
Algorithm Hash digest
SHA256 b2041760874f520f5565aa427e55fbef11db856873f009c417197ae273f382bb
MD5 7a8533c716d3eff39d96446cfcadaa52
BLAKE2b-256 09c0850d942787fdcc7cbfcae1b61870c9731162c820f098c691ba2b4eeecc8e

See more details on using hashes here.

File details

Details for the file little_shelf-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: little_shelf-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/4.19.0-16-amd64

File hashes

Hashes for little_shelf-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 247d16f1fc2da795d912ad3380a4320c1e6838ef42a83d41c40b7557b4d404e3
MD5 824ead98182446bb27d94c763280e8ab
BLAKE2b-256 aa797333120de9fd317eb41dba95ab65b753c446ab588f1508e53f1c4bf426bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page