Skip to main content

A module implementing hash based decision making

Project description

Implements, through hashing, decision making that is deterministic on input, but probabilistic across a set of inputs.

For example, suppose a set of components in a distributed system wish to emit a log entry for 1% of requests - but each component should log the same 1% of requests, they could do so as such:

if hashdial.decide(request.id, 0.01):
    log_request(request)

Take a look at the documentation for more.

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

hashdial-1.0.3.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hashdial-1.0.3-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file hashdial-1.0.3.tar.gz.

File metadata

  • Download URL: hashdial-1.0.3.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for hashdial-1.0.3.tar.gz
Algorithm Hash digest
SHA256 c3461995af9330b4b359dda80e9e9d1e112ad7672237e03193913db2f4707ade
MD5 6a197deef92f6933c329bc2a517041d4
BLAKE2b-256 2ad7d0a3869870724c92beddf6ccfb5510339a4590968869224d6b6767fbc16f

See more details on using hashes here.

File details

Details for the file hashdial-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: hashdial-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for hashdial-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 203558cc1288377f026f50e177ee84c147b3058bc4ac7643027980fdee7a693f
MD5 e808ea4d9d757f9fa792a7bbd24875ed
BLAKE2b-256 7f3e158a7c2287298b2f268381bacbdd5a61011fddf4b286a891123a30565a78

See more details on using hashes here.

Supported by

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