Python implementation of hamt-sharding.
Project description
This code has been transpiled from js-hamt-sharding and has minimal changes.
Usage
HAMTBucket implements MutableMapping.
We suggest you import the HAMTBucket as follows:
>>> from hamt_sharding import HAMTBucket
Setting and getting
>>> from hashlib import sha256 >>> def hash_fn(value: bytes): ... return sha256(value).digest() ... >>> bucket = HAMTBucket.create_hamt(hash_fn) >>> bucket['key'] = 'value' >>> bucket['key'] 'value'
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
hamt_sharding-0.1.3.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for hamt_sharding-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46df5f001b60d0b2792e636880cd3918c167c5868362355ac674048d46f886bf |
|
MD5 | f6eb07473caf9f4a9196415f66c02599 |
|
BLAKE2b-256 | 24f55f4ed2c7e63a4a6c1bf4251d87a088df32ff7c3a127529569739b92d8da4 |