{ "info": { "author": "Petrovskyi Anatolii", "author_email": "inbox@toxa.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries" ], "description": "README\n======\n\n``py_easy_async`` provides simple interface for threading to easy perform async actions in Python versions 3.4 and up\n\n\nExample of simple async operations\n----------------------------------\n\n.. code:: python\n\n import py_easy_async\n import time\n\n def print_with_sleep(word):\n time.sleep(1)\n print(word)\n return 'done'\n \n print('first')\n py_easy_async.async(lambda: print_with_sleep('second'), \n lambda done_string: print(\"done callback called with string: %s\" % done_string))\n print('third')\n\n \n \nThe above example will print the following:\n\n.. code:: bash\n\n first\n third\n second\n done callback called with string: done\n \nExample of thread pool management\n---------------------------------\n\n.. code:: python\n\n from py_easy_async import pool\n\n def message_handler(message):\n print('got message:', message)\n \n identifier = pool.run_thread(message_handler, name='Persistent-Thread')\n \n for i in range(5):\n pool.message(identifier, \"test message #%s\" % i)\n \n pool.stop_thread(identifier)\n\n \nThe above example will start thread that will wait for messages that it should process:\n\n.. code:: bash\n\n Persistent-Thread starting...\n \n got message: test message #0\n got message: test message #1\n got message: test message #2\n got message: test message #3\n got message: test message #4\n \n Persistent-Thread exiting...\n \n\nLicense\n-------\n\nReleased under the MIT license.\n\nInstallation\n------------\n.. code:: bash\n \n pip install py_easy_async", "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/aka-toxa/py_easy_async", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "py_easy_async", "package_url": "https://pypi.org/project/py_easy_async/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/py_easy_async/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/aka-toxa/py_easy_async" }, "release_url": "https://pypi.org/project/py_easy_async/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "Provides simple interface for threading to easy perform async actions", "version": "0.1.2" }, "last_serial": 1998107, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "2442e35f6df05e92703f9e5662a3af90", "sha256": "f7f3f5b4468c976bfbb3caa1c1c0ee234463c34a6e4372d516aa973cdfb39c73" }, "downloads": -1, "filename": "py_easy_async-0.1.tar.gz", "has_sig": false, "md5_digest": "2442e35f6df05e92703f9e5662a3af90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2250, "upload_time": "2016-02-14T23:48:35", "url": "https://files.pythonhosted.org/packages/09/00/fbb8b1fe643b16af92bdcfb9d35195bc8a0afffc354043d74c7a30d0dc0d/py_easy_async-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ac8ab1c9a455fdde99cec3e76e2bfb31", "sha256": "536a0bf26edc7f340208aeaf1c830e18b8ebe2797066c1729d54e7264a41a25e" }, "downloads": -1, "filename": "py_easy_async-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ac8ab1c9a455fdde99cec3e76e2bfb31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2549, "upload_time": "2016-02-15T00:13:45", "url": "https://files.pythonhosted.org/packages/47/2e/66a6f582e3c06ecd89197fcd8b0eef23c4a73f58338ce4a2045027a038e4/py_easy_async-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8a0a2c2c9d83f96d18bc0b014784872e", "sha256": "ccee03a2720fb00547efe4c97497b4ef7ad21d44c1931aa3eee4e5721e92bff9" }, "downloads": -1, "filename": "py_easy_async-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8a0a2c2c9d83f96d18bc0b014784872e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2623, "upload_time": "2016-03-09T21:07:43", "url": "https://files.pythonhosted.org/packages/04/c0/8aa951d3bbeef2c59bd4f1ffa67844a8be71365e1508ce41cbfc4513e115/py_easy_async-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8a0a2c2c9d83f96d18bc0b014784872e", "sha256": "ccee03a2720fb00547efe4c97497b4ef7ad21d44c1931aa3eee4e5721e92bff9" }, "downloads": -1, "filename": "py_easy_async-0.1.2.tar.gz", "has_sig": false, "md5_digest": "8a0a2c2c9d83f96d18bc0b014784872e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2623, "upload_time": "2016-03-09T21:07:43", "url": "https://files.pythonhosted.org/packages/04/c0/8aa951d3bbeef2c59bd4f1ffa67844a8be71365e1508ce41cbfc4513e115/py_easy_async-0.1.2.tar.gz" } ] }