Skip to main content

Use trio async framework with PySide2/PyQt5

Project description

triq

Use trio async framework with PyQt5/PySide2

Caution

This is an alpha-quality software.

How to

...
import triq
import trio

async def some_async_func(message):
    await trio.sleep(0.5)
    print(message)

app = QApplication([])

hitme = QPushButton('Hit me')
hitme.clicked.connect(lambda: triq.call_async(some_async_func, 'hello, world!'))
hitme.show()

bye = QPushButton('Bye')
bye.clicked.connect(triq.exit)
bye.show()

triq.run(app)

The above should work in PyQt5 and PySide2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

triq-0.0.4-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file triq-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: triq-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.4.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.0

File hashes

Hashes for triq-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 08c1056e73c9983cfa5da36332755dee9b6d0dea9d906c55deae50f58a927a66
MD5 935dc7ff5d8afc5004983317de53ab64
BLAKE2b-256 eb50c6847ed36a19adc1d5c1c55acd2577c263b82e8861536ea732f934a509b9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page