skillfed

asynckivy

Async library for Kivy

asynckivy v0.11.0 82.8K downloads/30d#14,136 on PyPI90
Permissive license MIT Active released

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 asynckivy

uv

uv add asynckivy

poetry

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 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Topic :: Software Development :: Libraries

Tags

kivy async awaitkivy event handling asynckivy callback replacementasync event waiting kivykivy coroutine librarykivy sequential async codekivy async sleep event
kivy-uiasync-awaitevent-driven

More Libraries packages