Skip to main content

Collection of roundrobin utilities

Project description

This is rather small collection of round robin utilites

>>> import roundrobin
>>> get_roundrobin = roundrobin.basic(["A", "B", "C"])
>>> ''.join([get_roundrobin() for _ in range(7)])
'ABCABCA'
>>> # weighted round-robin balancing algorithm as seen in LVS
>>> get_weighted = roundrobin.weighted([("A", 5), ("B", 1), ("C", 1)])
>>> ''.join([get_weighted() for _ in range(7)])
'AAAAABC'
>>> # smooth weighted round-robin balancing algorithm as seen in Nginx
>>> get_weighted_smooth = roundrobin.smooth([("A", 5), ("B", 1), ("C", 1)])
>>> ''.join([get_weighted_smooth() for _ in range(7)])
'AABACAA'

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

roundrobin-0.0.1.tar.gz (2.0 kB view details)

Uploaded Source

Built Distribution

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

roundrobin-0.0.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file roundrobin-0.0.1.tar.gz.

File metadata

  • Download URL: roundrobin-0.0.1.tar.gz
  • Upload date:
  • Size: 2.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for roundrobin-0.0.1.tar.gz
Algorithm Hash digest
SHA256 f5e9b70e3ecbc092d37888e8a0e81c70eea181d0f45e12a0269bbb5d13d2b248
MD5 ad9a53e57b657198ddecc4e1e2cd3be7
BLAKE2b-256 0559150a086acddfc4e14802e4ac43134072efa53a437e0704ed31ba6ab559ba

See more details on using hashes here.

File details

Details for the file roundrobin-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: roundrobin-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for roundrobin-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bba3416a1be6863b81fb7839cf3f041ed9550c12d986603d225377fb32a20736
MD5 aef864d03807dfc848a419f8bbd5bb99
BLAKE2b-256 7ac042e504c02e53efeadbcd09102fc124dd5f289ce0b3f19989394f1caa9bd6

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