From 9c893a25c97155c978e56df256e8ae264a23ecef Mon Sep 17 00:00:00 2001 From: James Brock Date: Fri, 13 Oct 2023 15:04:53 +0900 Subject: [PATCH] README Introduction example text --- README.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 880b411..ea65744 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,18 @@ ## Introduction -`qasync` allows coroutines to be used in PyQt/PySide applications by providing an implementation of the `PEP 3156` event-loop. +`qasync` allows coroutines to be used in PyQt/PySide applications by providing +`class QEventLoop`, which is +an implementation of the [PEP 3156](https://peps.python.org/pep-3156/) +[`AbstractEventLoop`](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.AbstractEventLoop) +and can be used in [`set_event_loop`](https://docs.python.org/3/library/asyncio-eventloop.html#asyncio.set_event_loop). + +```python +import asyncio +import qasync + +asyncio.set_event_loop(qasync.QEventLoop()) +``` `qasync` is a fork of [asyncqt](https://github.com/gmarull/asyncqt), which is a fork of [quamash](https://github.com/harvimt/quamash). May it live longer than its predecessors.