Source: python-roundrobin Section: python Maintainer: Sandro Tosi Build-Depends: debhelper-compat (= 14), dh-sequence-python3, dh-sequence-single-binary, pybuild-plugin-pyproject, python3-all, python3-setuptools, Standards-Version: 4.7.4.1 Testsuite: autopkgtest-pkg-pybuild Homepage: https://github.com/linnik/roundrobin Vcs-Git: https://salsa.debian.org/morph/python-roundrobin.git Vcs-Browser: https://salsa.debian.org/morph/python-roundrobin Rules-Requires-Root: no Package: python3-roundrobin Architecture: all Description: small collection of round-robin selectors This package provides the roundrobin Python module, which implements these round-robin selectors: . - basic(): plain round-robin (A, B, C, A, B, C, ...) - weighted(): weighted round-robin (classic LVS-style) - smooth(): smooth weighted round-robin (Nginx-style; avoids long clumps) - smooth_stateful(): smooth weighted round-robin with runtime controls (health checks / slow-start) . Some examples: . >>> 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'