{ "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": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/reclosedev/async_gui", "keywords": "GUI", "license": "BSD License", "maintainer": "", "maintainer_email": "", "name": "uncrumpled_async_gui", "package_url": "https://pypi.org/project/uncrumpled_async_gui/", "platform": "", "project_url": "https://pypi.org/project/uncrumpled_async_gui/", "project_urls": { "Homepage": "https://github.com/reclosedev/async_gui" }, "release_url": "https://pypi.org/project/uncrumpled_async_gui/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "Easy threading and multiprocessing for GUI applications", "version": "0.1.1" }, "last_serial": 2747478, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "248d03683da08a0eb949aff6ca880f33", "sha256": "57584135d8bbc32eab3be9fd2cbd9ca4bdec60e26c45e4f9bbb2cedc96d3b299" }, "downloads": -1, "filename": "uncrumpled_async_gui-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "248d03683da08a0eb949aff6ca880f33", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12888, "upload_time": "2017-04-02T13:13:32", "url": "https://files.pythonhosted.org/packages/ff/99/9f9783204a6ec7536cb582205fbfaec5e6870b5efa1e74ab36aa81f4418f/uncrumpled_async_gui-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75652fd778269871a83d23d0f0c19abd", "sha256": "6a1fcef6adee78292b1aa5a61f26ecec8699b8ac21b851516f8e903da21edfff" }, "downloads": -1, "filename": "uncrumpled_async_gui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "75652fd778269871a83d23d0f0c19abd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21428, "upload_time": "2017-04-02T13:13:30", "url": "https://files.pythonhosted.org/packages/63/a0/5eca0afcb653c40af3eb5779a3ca47c125ad5c7763dfd296663f7d21001d/uncrumpled_async_gui-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "248d03683da08a0eb949aff6ca880f33", "sha256": "57584135d8bbc32eab3be9fd2cbd9ca4bdec60e26c45e4f9bbb2cedc96d3b299" }, "downloads": -1, "filename": "uncrumpled_async_gui-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "248d03683da08a0eb949aff6ca880f33", "packagetype": "bdist_wheel", "python_version": "3.5", "requires_python": null, "size": 12888, "upload_time": "2017-04-02T13:13:32", "url": "https://files.pythonhosted.org/packages/ff/99/9f9783204a6ec7536cb582205fbfaec5e6870b5efa1e74ab36aa81f4418f/uncrumpled_async_gui-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "75652fd778269871a83d23d0f0c19abd", "sha256": "6a1fcef6adee78292b1aa5a61f26ecec8699b8ac21b851516f8e903da21edfff" }, "downloads": -1, "filename": "uncrumpled_async_gui-0.1.1.tar.gz", "has_sig": false, "md5_digest": "75652fd778269871a83d23d0f0c19abd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21428, "upload_time": "2017-04-02T13:13:30", "url": "https://files.pythonhosted.org/packages/63/a0/5eca0afcb653c40af3eb5779a3ca47c125ad5c7763dfd296663f7d21001d/uncrumpled_async_gui-0.1.1.tar.gz" } ] }