{"library":"roundrobin","title":"Round Robin Utilities","description":"The `roundrobin` library provides a small collection of round-robin selectors for various distribution needs. It includes `basic()` for plain round-robin, `weighted()` for classic LVS-style weighted round-robin, `smooth()` for Nginx-style smooth weighted round-robin, and `smooth_stateful()` for smooth weighted round-robin with runtime controls like health checks or slow-start. The current version is 0.1.0, released in January 2026, indicating active development.","language":"python","status":"active","last_verified":"Fri May 15","install":{"commands":["pip install roundrobin"],"cli":null},"imports":["import roundrobin"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import roundrobin\n\n# Basic round-robin\nget_basic = roundrobin.basic([\"A\", \"B\", \"C\"])\nprint(''.join([get_basic() for _ in range(7)]))\n\n# Weighted round-robin\nget_weighted = roundrobin.weighted([(\"A\", 5), (\"B\", 1), (\"C\", 1)])\nprint(''.join([get_weighted() for _ in range(7)]))\n\n# Smooth weighted round-robin\nget_smooth = roundrobin.smooth([(\"A\", 5), (\"B\", 1), (\"C\", 1)])\nprint(''.join([get_smooth() for _ in range(7)]))\n\n# Stateful smooth weighted round-robin with runtime controls\nrr_stateful = roundrobin.smooth_stateful([(\"A\", 5), (\"B\", 1), (\"C\", 1)])\noutputs = []\nfor _ in range(14):\n    outputs.append(rr_stateful())\nprint(''.join(outputs))\n\n# Example of runtime weight adjustment with smooth_stateful\nrr_stateful_adjust = roundrobin.smooth_stateful([(\"A\", 5), (\"B\", 1), (\"C\", 1)])\nrr_stateful_adjust.set(\"A\", weight=2)\noutputs_adjust = []\nfor _ in range(14):\n    outputs_adjust.append(rr_stateful_adjust())\nprint(''.join(outputs_adjust))","lang":"python","description":"This quickstart demonstrates the `basic()`, `weighted()`, `smooth()`, and `smooth_stateful()` functions. It shows how to initialize each type of round-robin selector and retrieve items. For `smooth_stateful()`, an example of dynamically adjusting an item's weight at runtime is also included.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-15","installed_version":"0.1.0","pypi_latest":"0.1.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":1.5,"avg_import_s":0,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.1,"disk_size":"17.9M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.5,"import_time_s":0,"mem_mb":0.1,"disk_size":"18M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.1,"disk_size":"19.7M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0,"mem_mb":0.1,"disk_size":"20M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.1,"disk_size":"11.6M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0,"mem_mb":0.1,"disk_size":"12M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.3,"disk_size":"11.3M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.4,"import_time_s":0,"mem_mb":0.1,"disk_size":"12M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0,"mem_mb":0.1,"disk_size":"17.4M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"roundrobin","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0,"mem_mb":0.1,"disk_size":"18M"}]}}