Collection of roundrobin utilities
Project description
roundrobin
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.2.tar.gz
(2.4 kB
view details)
File details
Details for the file roundrobin-0.0.2.tar.gz.
File metadata
- Download URL: roundrobin-0.0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac30cb78570a36bb0ce0db7b907af9394ec7a5610ece2ede072280e8dd867caa
|
|
| MD5 |
c8579ec1e26677d53d613b0aefffaaa1
|
|
| BLAKE2b-256 |
3e5d60ce8f2ad7b8c8f7124a78eead5ecfc7f702ba80d8ad1e93b25337419a75
|