skip to navigation
skip to content

Quamash 0.3

Implementation of the PEP 3156 Event-Loop with Qt

Latest Version: 0.5.5


Quamash requires Python 3.4 and either PyQt 5 or PySide.


pip install quamash


import sys
import asyncio
import time

from PyQt5.QtWidgets import QApplication, QProgressBar
from quamash import QEventLoop, QThreadExecutor

app = QApplication(sys.argv)
progress = QProgressBar()
loop = QEventLoop(app)

progress.setRange(0, 99)

def master():
    yield from first_50()
    with QThreadExecutor(1) as exec:
        yield from loop.run_in_executor(exec, last_50)
    # TODO announce completion?

def first_50():
    for i in range(50):
        yield from asyncio.sleep(.1)

def last_50():
    for i in range(50,100):
        loop.call_soon_threadsafe(progress.setValue, i)

with loop:


Quamash is tested with pytest; in order to run the test suite, just execute py.test on the commandline. The tests themselves are beneath the ‘tests’ directory.


You may use, modify, and redistribute this software under the terms of the BSD License. See LICENSE.


Tulip related projects are being named after other flowers, Quamash is one of the few flowers that starts with a “Q”.

File Type Py Version Uploaded on Size (md5) Source 2014-07-18 13KB
  • Downloads (All Versions):
  • 0 downloads in the last day
  • 4 downloads in the last week
  • 1658 downloads in the last month