{ "info": { "author": "Roman Haritonov", "author_email": "reclosedev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "async_gui\n---------------\n\n``async_gui`` is a library aimed to make use of threads in GUI applications simpler.\nIt's inspired by PyCon talk\n`Using futures for async GUI programming in Python 3.3 `_\nand `tornado `_ ``@gen.engine`` implementation.\n\nMost of GUI toolkits don't allow you to access graphical elements from non-GUI thread.\nPython 3.2+ has nice new feature ``concurrent.futures``, but we can't just\nwait for result from future and callbacks are not very handy.\n\nCombination of `Coroutines via Enhanced Generators (PEP-342) `_\nand ``futures`` creates a rich and easy to use asynchronous programming model\nwhich can be used for creating highly responsive GUI applications.\n\n\nExample\n-------\n\nDemo of button click handler:\n\n.. code-block:: python\n\n @engine.async\n def on_button_click(self, *args):\n self.status_label.setText(\"Downloading image...\")\n # Run single task in separate thread\n image_data = yield Task(self.load_url,\n \"http://www.google.com/images/srpr/logo4w.png\")\n pixmap = QtGui.QPixmap.fromImage(QtGui.QImage.fromData(image_data))\n self.image_label.setPixmap(pixmap)\n self.status_label.setText(\"Downloading pages...\")\n urls = ['http://www.google.com',\n 'http://www.yandex.ru',\n 'http://www.python.org']\n # Run multiple task simultaneously in thread pool\n pages = yield [Task(self.load_url, url) for url in urls]\n self.status_label.setText(\"Done\")\n avg_size = sum(map(len, pages)) / len(pages)\n self.result_label.setText(\"Average page size: %s\" % avg_size)\n\n\nTasks yielded from ``on_button_click()`` executed in thread pool, but\nGUI updates done in the GUI thread.\nFor CPU-bound applications there is also ability to run tasks in pool of\nprocesses.\n\nSee `full example `_\nin `examples `_ directory.\n\n\nFeatures\n--------\n\n- Python 2.7+ (`futures `_ required),\n Python 3+ support\n\n- PyQt4/PySide, Tk, Wx, Gtk GUI toolkits support. Easy to add another\n\n- Can execute tasks in Thread, Process, Greenlet (`gevent `_ required)\n\n- Possibility to run multiple tasks at the same time\n\n- Straightforward exception handling\n\n- Full test coverage\n\nInstallation\n------------\n\nUsing pip_::\n\n $ pip install async_gui\n\nOr download, unpack and::\n\n $ python setup.py install\n\n\nTo run tests use::\n\n $ python setup.py test\n\n.. _pip: http://www.pip-installer.org/en/latest/installing.html\n\nLinks\n-----\n\n- **Documentation** at `readthedocs.org `_\n\n- **Source code and issue tracking** at `GitHub `_.\n\n\n\n.. :changelog:\n\nHistory\n-------\n\n0.2.0 (2013-0x-xx)\n+++++++++++++++++++\n\n* MultiTask can return generator of ready tasks instead waiting for all done\n\n\n0.1.0 (2013-04-06)\n+++++++++++++++++++\n\n* initial PyPI release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/reclosedev/async_gui", "keywords": "GUI,thread,coroutine,futures,async", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "async_gui", "package_url": "https://pypi.org/project/async_gui/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/async_gui/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/reclosedev/async_gui" }, "release_url": "https://pypi.org/project/async_gui/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Easy threading and multiprocessing for GUI applications", "version": "0.1.1" }, "last_serial": 1158723, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "aa6fea83623eac1730a571112abbcb2d", "sha256": "8903c905d238747d458c77feac93a311fe97926fb9f5c1a17607b5180c883aaf" }, "downloads": -1, "filename": "async_gui-0.1.0.tar.gz", "has_sig": false, "md5_digest": "aa6fea83623eac1730a571112abbcb2d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20464, "upload_time": "2013-04-06T13:18:57", "url": "https://files.pythonhosted.org/packages/e7/9a/acd4e1803841e2bb11172da37884a54ea54d96636303c7c99f35e510c1c0/async_gui-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ffcdbda070243f3bf16183d9a92a65e1", "sha256": "1584c18f4363bb48a0d8ced1a83387e5b5e7a3779ead018258938560a9317af4" }, "downloads": -1, "filename": "async_gui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ffcdbda070243f3bf16183d9a92a65e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22018, "upload_time": "2014-07-15T17:24:12", "url": "https://files.pythonhosted.org/packages/65/6a/7ed68f2a3e49c6c616482a3f5024c1f8568000a19bc9c656b5a38747c2a6/async_gui-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ffcdbda070243f3bf16183d9a92a65e1", "sha256": "1584c18f4363bb48a0d8ced1a83387e5b5e7a3779ead018258938560a9317af4" }, "downloads": -1, "filename": "async_gui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ffcdbda070243f3bf16183d9a92a65e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22018, "upload_time": "2014-07-15T17:24:12", "url": "https://files.pythonhosted.org/packages/65/6a/7ed68f2a3e49c6c616482a3f5024c1f8568000a19bc9c656b5a38747c2a6/async_gui-0.1.1.tar.gz" } ] }