asynckivy
Async library for Kivy
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 on this page — 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
asynckivy on PyPI
pip
pip install asynckivyuv
uv add asynckivypoetry
poetry add asynckivyInstalling 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 the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — asyncgui |
| Maintenance | actively maintained — 73 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 82,768/month — #14,136 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: asynckivy-0.11.0-py3-none-any.whl
Keywords: async, kivy
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
asyncguiAsyncGui provides structured concurrency…
permissive · top 15,000 on PyPI
KivyKivy is a Python framework for building…
permissive · top 15,000 on PyPI
sshkeyboardCaptures keyboard input via callbacks in SSH…
permissive · top 15,000 on PyPI
pynputPynput lets you programmatically control and…
copyleft · top 5,000 on PyPI
psycogreenIntegrates psycopg2 with coroutine libraries…
permissive · top 5,000 on PyPI
waitingWaiting is a lightweight library for polling a…
permissive · top 15,000 on PyPI
pynput-robocorp-forkControls and monitors mouse and keyboard input…
copyleft · top 15,000 on PyPI
pyventusPyventus is a Python library for building…
permissive · top 15,000 on PyPI
python-backoffProvides function decorators for retrying…
permissive · top 5,000 on PyPI
busypieProvides expressive, fluent API for…
permissive · top 15,000 on PyPI