--- id: asynckivy version: "0.11.0" license: MIT license_treatment: permissive maintenance: active --- # asynckivy — Async library for Kivy License: permissive · Maintenance: active · Downloads: 82.8K/mo ## What it is and what it does AsyncKivy is a library that layers async/await syntax on top of Kivy's event system, eliminating the nested callback chains that make event-driven Kivy code hard to follow. Instead of binding callbacks to buttons or timers and manually unbinding them, you write async functions that await events and delays in a linear, top-to-bottom flow. It depends on asyncgui for its core async machinery and integrates with Kivy's clock and event system. The library provides primitives like ak.sleep() for time delays, ak.event() to wait for button presses or property changes, ak.wait_any() for timeout-like patterns, and ak.wait_all() for coordinating multiple concurrent waits. You start an async task with ak.managed_start(), which handles lifecycle and cleanup. It's tested on Python 3.10–3.13 with Kivy 2.3 and carries no known vulnerabilities. Use it for: - Simplify Kivy UI sequences: wait for a button press, then a timer, then a property change—all in one readable async function. - Implement timeouts: use ak.move_on_after() to wait for an event with a maximum duration before moving on. - Coordinate multiple events: use ak.wait_all() to ensure both a button press and a timer have completed before proceeding. - Handle conditional waits: filter events with predicates (e.g., wait for button.x to exceed a threshold) without extra state variables. - Nest async logic: compose complex event sequences by nesting ak.wait_any() and ak.wait_all() calls. - Replace Kivy Clock callbacks: replace Clock.schedule_once() and event binding chains with linear async code. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. AsyncKivy replaces Kivy's callback-based event handling with async/await syntax, letting you write sequential event-driven code without nested callbacks. Yes. AsyncKivy is actively maintained, has zero known vulnerabilities, low install friction, and a permissive MIT license. It directly solves a real pain point in Kivy development—callback hell—and is well-tested on modern Python versions. Install it if you're building a Kivy app and want cleaner, more maintainable event-handling code. ## Install pip install asynckivy uv add asynckivy poetry add asynckivy ## Installing asynckivy Before you install: Low friction: pure Python wheel with a single runtime dependency (asyncgui). Actively maintained with recent releases; tested on Python 3.10–3.13 with Kivy 2.3. License in practice: MIT license permits commercial and private use with minimal restrictions; you must include a copy of the license in distributions. Quickstart: pip install asynckivy import asynckivy as ak async def task(button): await ak.sleep(2) await ak.event(button, 'on_press') ak.managed_start(task(button)) Requires Python 3.10 or later and an active Kivy application context to run event-driven code. Verify before relying: - Whether asynckivy integrates with Kivy's event loop automatically or requires manual setup beyond managed_start(). - Performance characteristics when handling many concurrent async tasks in a Kivy app. - Compatibility with Kivy versions other than 2.3. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 82.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags kivy async await, kivy event handling async, kivy callback replacement, async event waiting kivy, kivy coroutine library, kivy sequential async code, kivy async sleep event, kivy-ui, async-await, event-driven [View on SkillFed](https://skillfed.io/packages/asynckivy) · [View on PyPI](https://pypi.org/project/asynckivy/)