{"id":23038,"library":"asynckivy","title":"asynckivy","description":"Async library for Kivy, providing async/await support for Kivy event loop, touch events, animations, and transitions. Current version 0.10.0 supports Python >=3.10 and <4.0. Released roughly every few months with occasional breaking changes as APIs are deprecated and removed.","status":"active","version":"0.10.0","language":"python","source_language":"en","source_url":"https://github.com/asyncgui/asynckivy","tags":["kivy","async","gui","asyncio","animation"],"install":[{"cmd":"pip install asynckivy","lang":"bash","label":"PyPI"}],"dependencies":[],"imports":[{"note":"run_asynckivy is the main entry point to start the async Kivy event loop; old patterns are removed.","wrong":"from asynckivy import aiotKivyApp","symbol":"run_asynckivy","correct":"from asynckivy import run_asynckivy"},{"note":"start was removed in 0.7.x; managed_start must be used for managed task lifecycle.","wrong":"from asynckivy import start","symbol":"managed_start","correct":"from asynckivy import managed_start"},{"note":"event is a coroutine function that waits for a Kivy event (e.g., button on_press).","wrong":"","symbol":"event","correct":"from asynckivy import event"},{"note":"watch_touch was removed in 0.8.0; rest_of_touch_events is the replacement.","wrong":"from asynckivy import watch_touch","symbol":"rest_of_touch_events","correct":"from asynckivy import rest_of_touch_events"},{"note":"sleep is the async sleep function; aio_sleep was removed.","wrong":"from asynckivy import aio_sleep","symbol":"sleep","correct":"from asynckivy import sleep"}],"quickstart":{"code":"import asynckivy\nfrom kivy.app import App\nfrom kivy.uix.button import Button\n\nclass TestApp(App):\n    def build(self):\n        return Button(text='Click me')\n\nasync def main():\n    app = TestApp()\n    # Run the app asynchronously\n    async with asynckivy.run_asynckivy(app):\n        await asynckivy.event(app.root, 'on_press')\n        print('Button was pressed!')\n\nasynckivy.start(main())","lang":"python","description":"This example starts a Kivy app asynchronously and waits for a button press using the event() coroutine."},"warnings":[{"fix":"Replace `anim_with_xxx` calls with equivalent `asynckivy.transition` functions (e.g., `fade_in`, `slide`).","message":"The `anim_with_xxx` APIs (except `anim_with_ratio`) are deprecated as of 0.9.1 and will be removed in a future version. Use the new `transition` submodule for animations.","severity":"breaking","affected_versions":">=0.9.1"},{"fix":"Use `managed_start` or explicitly await the animation task with cancellation.","message":"In version 0.7.0, `anim_with_ratio` no longer ends on its own (was removed from auto-ending). You must explicitly cancel or await completion.","severity":"breaking","affected_versions":">=0.7.0"},{"fix":"Import `asynckivy.transition` and use `asynckivy.transition.fade(...)`.","message":"`fade_transition` (from the module) is deprecated as of 0.9.0; use `asynckivy.transition.fade` instead.","severity":"deprecated","affected_versions":">=0.9.0"},{"fix":"Use `managed_start` for task spawning (see quickstart).","message":"`managed_start` is required to properly cancel tasks on app exit. Otherwise tasks may continue indefinitely.","severity":"gotcha","affected_versions":">=0.7.1"},{"fix":"Upgrade Python to 3.10 or later.","message":"Python 3.9 support dropped in v0.9.1. asynckivy 0.10.0 requires Python >=3.10.","severity":"breaking","affected_versions":">=0.9.1"},{"fix":"Use `await asynckivy.event(widget, 'on_touch_down')` (not `bind`).","message":"`event()` coroutine expects a widget and a single event name (string). Not the same as Kivy's `bind`; it waits for the event to fire once.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use `from asynckivy import run_asynckivy` or `asynckivy.start`.","cause":"Old API was removed in version 0.7.0.","error":"ImportError: cannot import name 'aiotKivyApp' from 'asynckivy'"},{"fix":"Ensure the widget exists before awaiting event: `await asynckivy.event(app.root, 'on_press')` when root is not None.","cause":"Often due to passing a None widget to `event()`.","error":"TypeError: object NoneType can't be used in 'await' expression"},{"fix":"Use `managed_start` to ensure tasks are cancelled on app stop.","cause":"Trying to launch coroutines after the Kivy app has exited or the async loop is closed.","error":"RuntimeError: Cannot schedule coroutine on a stopped event loop"},{"fix":"Use `rest_of_touch_events` or `event` with 'on_touch_down'.","cause":"`watch_touch` was removed in version 0.8.0.","error":"AttributeError: module 'asynckivy' has no attribute 'watch_touch'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}