--- id: loop-rate-limiters version: "1.2.0" license: unclear license_treatment: permissive maintenance: active --- # loop-rate-limiters — Loop rate limiters. License: permissive · Maintenance: active · Downloads: 280.7K/mo ## What it is and what it does Loop rate limiters provides simple frequency regulation for tight loops in Python, offering both synchronous and asynchronous variants. The synchronous RateLimiter class accepts a frequency parameter and sleeps for the appropriate duration each iteration to maintain that rate; the AsyncRateLimiter does the same for asyncio-based code. Both are designed to work similarly to rospy.Rate, making them useful for robotics, control systems, and any application that needs to run a loop at a fixed frequency without busy-waiting. The package has no external dependencies and supports Python 3.9 through 3.12. It is actively maintained and classified as production-stable, making it suitable for production use in timing-sensitive applications where you need straightforward frequency control without the complexity of a full scheduler. Use it for: - Robotics control loops that must execute at a fixed frequency (e.g., 400 Hz sensor polling). - Asynchronous tasks running in parallel at different frequencies within a single event loop. - Simulation or game loops that need consistent frame rates or update frequencies. - Data acquisition or sensor sampling at a regulated rate without blocking other operations. - Real-time monitoring or telemetry collection at a specified sampling frequency. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides synchronous and asynchronous rate limiters to regulate loop execution frequency at a specified rate, similar to rospy.Rate. Yes. The package is lightweight, dependency-free, actively maintained, permissively licensed, and solves a common need in control and real-time systems. Install it if you need straightforward loop frequency regulation in synchronous or asynchronous code. ## Install pip install loop-rate-limiters uv add loop-rate-limiters poetry add loop-rate-limiters ## Installing loop-rate-limiters Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a recent release on 2025-08-13 and ongoing repository activity. License in practice: Permissive license allows use in commercial and open-source projects without significant restrictions. Quickstart: pip install loop-rate-limiters from loop_rate_limiters import RateLimiter rate = RateLimiter(frequency=400.0) while True: rate.sleep() Verify before relying: - Whether the rate limiter maintains accuracy under high-frequency or variable-load conditions. - How the implementation handles system clock adjustments or sleep precision on different operating systems. ## Package facts - License: not declared (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 280.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags loop rate limiter, frequency regulator, async rate limiter, control loop speed, sleep-based frequency control, rospy rate alternative, asyncio rate limiting, timing-control, robotics, asyncio [View on SkillFed](https://skillfed.io/packages/loop-rate-limiters) · [View on PyPI](https://pypi.org/project/loop-rate-limiters/)