Skip to main content

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


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

Uploaded Source

Built Distribution

hamt_sharding-0.1.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file hamt_sharding-0.1.3.tar.gz.

File metadata

  • Download URL: hamt_sharding-0.1.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for hamt_sharding-0.1.3.tar.gz
Algorithm Hash digest
SHA256 87a2301200ce105a4b81374203843a12821b51804343aee5fda101523def4698
MD5 57579c5512db84dc09a944277c4e9918
BLAKE2b-256 6373d229a92c4387795f5eff4fc094af97dcfae77ebbd5d1739ffebab39e3a23

See more details on using hashes here.

File details

Details for the file hamt_sharding-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for hamt_sharding-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 46df5f001b60d0b2792e636880cd3918c167c5868362355ac674048d46f886bf
MD5 f6eb07473caf9f4a9196415f66c02599
BLAKE2b-256 24f55f4ed2c7e63a4a6c1bf4251d87a088df32ff7c3a127529569739b92d8da4

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