--- id: busypie version: "0.6.1" license: Apache License 2.0 license_treatment: permissive maintenance: active --- # busypie — Easy and expressive busy-waiting for Python License: permissive · Maintenance: active · Downloads: 216.4K/mo ## What it is and what it does busypie is a lightweight testing utility that wraps busy-waiting into a readable, fluent API. It's designed specifically for test code where you need to wait for an asynchronous operation or condition to complete—for example, waiting for a user to appear in a database after an async creation call. Instead of writing manual sleep loops or complex synchronization logic, you chain method calls like `wait().at_most(2, SECOND).until(lambda: condition())` to express the intent clearly. The package has no runtime dependencies and integrates directly into test suites. It's most useful in integration or end-to-end tests where you're verifying that side effects have occurred, rather than in unit tests. The API is inspired by Awaitility (a Java library) and is intended to make test code more readable and maintainable by encoding the wait-and-check pattern in a standard, expressive form. Use it for: - Wait for an async database operation to complete in integration tests before asserting on the result. - Poll for a message to appear in a queue or event stream during end-to-end test scenarios. - Verify that a background job has finished and updated application state before proceeding with assertions. - Test event-driven systems where you need to wait for a callback or state change within a timeout. - Replace manual sleep() calls in test code with explicit, readable timeout-and-condition expressions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides expressive, fluent API for busy-waiting in tests, allowing you to wait for asynchronous conditions to complete with configurable timeouts and polling. Yes. busypie is a low-friction, zero-dependency testing utility with active maintenance and no known vulnerabilities. It solves a real problem in async test code—replacing ad-hoc sleep loops with readable, expressive waits. Permissive license and modest but stable adoption make it a safe choice for test suites that need polling logic. ## Install pip install busypie uv add busypie poetry add busypie ## Installing busypie Before you install: No runtime dependencies and low install friction. Actively maintained with recent releases; last commit 2026-04-28. Modest but steady adoption at top_15000 tier. License in practice: Apache License 2.0 (permissive) imposes no significant restrictions on use or redistribution in most contexts. Quickstart: pip install busypie from busypie import wait, SECOND def test_something(): wait().at_most(2, SECOND).until(lambda: condition_is_true()) Requires Python 3.6 or later. Verify before relying: - Whether the fluent API supports all common polling strategies (fixed delay, exponential backoff, etc.) beyond what the excerpt shows. - Performance characteristics when polling frequently or with very short timeouts in high-concurrency test scenarios. ## Package facts - License: Apache License 2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 216.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags busy wait testing, async test polling, wait for condition python, test synchronization helper, expressive timeout waiting, tdd polling library, pytest async wait, async-testing, test-utilities [View on SkillFed](https://skillfed.io/packages/busypie) · [View on PyPI](https://pypi.org/project/busypie/)