--- id: qasync version: "0.28.0" license: BSD-2-Clause license_treatment: permissive maintenance: active --- # qasync — Python library for using asyncio in Qt-based applications License: permissive · Maintenance: active · Downloads: 370.9K/mo ## What it is and what it does qasync bridges asyncio and Qt by implementing a PEP 3156 event loop that runs inside a Qt application's main thread. This lets you write async/await code directly in PyQt/PySide event handlers and slots, replacing the need for manual threading with cleaner, more readable coroutine-based logic. The package provides decorators like @asyncSlot and @asyncClose to mark async event handlers, and exposes run_in_executor for CPU-bound work on thread pools. It has no runtime dependencies beyond a Qt binding (PyQt5/6 or PySide2/6) and maintains active development with support for Python 3.8 and later. Use it for: - Build responsive Qt GUIs that fetch data from APIs without blocking the UI thread using async/await. - Replace QThread boilerplate with cleaner asyncio patterns for background tasks in PyQt/PySide apps. - Coordinate multiple concurrent operations (timers, I/O, network calls) within a single Qt event loop. - Offload CPU-intensive work to thread pools via run_in_executor while keeping the UI responsive. - Migrate existing asyncio codebases to Qt-based desktop applications without rewriting async logic. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. qasync integrates asyncio coroutines into PyQt/PySide applications by providing a PEP 3156 event loop, allowing async/await syntax directly in Qt's main thread without threading. Yes. qasync is actively maintained, has no external dependencies, carries a permissive license, and solves a real pain point—integrating asyncio into Qt apps cleanly. The codebase is stable (Production/Stable classifier), tested across major platforms, and has seen regular updates. Install it if you're building a PyQt/PySide application and want to use async/await instead of threading. ## Install pip install qasync uv add qasync poetry add qasync ## Installing qasync Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained as of July 2026 with 405 repository stars and a clear maintenance commitment stated in the project. License in practice: BSD-2-Clause permissive license allows use, modification, and redistribution with minimal restrictions—suitable for both open and closed projects. Quickstart: pip install qasync from qasync import QApplication, QEventLoop import asyncio app = QApplication(sys.argv) loop = QEventLoop(app) asyncio.set_event_loop(loop) # Use async functions in Qt slots and event handlers Requires PyQt5, PyQt6, PySide2, or PySide6 to be installed separately; Python >=3.8 required. Verify before relying: - Whether the package works with all four Qt bindings (PyQt5/6, PySide2/6) equally well or has known limitations with any. - Performance characteristics when running CPU-intensive tasks via QThreadExecutor compared to standard threading approaches. - Compatibility with recent Python 3.13+ versions given the stated support ceiling of <3.14. ## Package facts - License: BSD-2-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 370.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags asyncio in qt applications, pyqt async await, pyside coroutines, qt event loop asyncio, async qt gui, pyqt threading alternative, qt-integration, async-await [View on SkillFed](https://skillfed.io/packages/qasync) · [View on PyPI](https://pypi.org/project/qasync/)