{ "info": { "author": "Nathan Graule", "author_email": "solarliner@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: Implementation :: CPython", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Call\n====\n\n.. image:: https://api.codacy.com/project/badge/Grade/91959f98ff34469884415e96ba2ff763 :target: https://www.codacy.com/app/solarliner/call?utm_source=gitlab.com&utm_medium=referral&utm_content=solarliner/call&utm_campaign=Badge_Grade\n\nThread-based, JS-like asynchronous calls for Python. Works in both\nPython 2.7 and Python 3.5+.\n\nInstall\n-------\n\nRelease version:\n\n.. code:: bash\n\tpip install call\n\nDevelopment version\n\n.. code:: bash\n\n git clone https://gitlab.com/solarliner/call.git\n cd call\n # Activate virtualenv if needed\n python setup.py install\n\nThe library requires no other dependencies, and (will soon) support\nPython's ``await`` keyword.\n\nUse\n---\n\nCreate a call:\n\n.. code:: python\n\n def cb(resolve, reject):\n result = factorial(100)\n resolve(result)\n\n call = Call(cb)\n\nWrap a synchronous function in a Call:\n\n.. code:: python\n call = Call.from_function(factorial, 10)\n\nChain calls with the ``then`` keyword\n\n.. code:: python\n\n call = Call(cb).then(lambda val: print(val))\n\nCatch errors:\n\n.. code:: python\n\n call = Call(cb)\\\n .then(lambda val: raise Exception())\\\n .catch(lambda err: print('Whoops'))\n\nCompose calls:\n\n.. code:: python\n\n results = Call.all([Call(cb) for _ in range(10)])\n\nBlock thread until resolved (or raises on failure):\n\n.. code:: python\n\n result = call.wait()\n\nWait for call to either resolve or reject. Note that it is not recommended to get the data directly, as it may be\n``None``, which may or may not indicate that an error has occurred.\n\n.. code:: python\n\n call.join()\n result = call.data # Not recommended\n\nContribute\n----------\n\nThe repository follows the ``git flow`` standards. Create a feature branch, then ask for a pull/merge request.\n\nThe main repository is on GitLab, however the GitHub mirror is functional and you should be able to ask for pull\nrequests. However, they will be processed in GitLab.\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/solarliner/call", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "async-call", "package_url": "https://pypi.org/project/async-call/", "platform": "", "project_url": "https://pypi.org/project/async-call/", "project_urls": { "Homepage": "https://gitlab.com/solarliner/call" }, "release_url": "https://pypi.org/project/async-call/0.1.2/", "requires_dist": [ "typing" ], "requires_python": "", "summary": "Thread-based, JS-like asynchronous calls for Python.", "version": "0.1.2" }, "last_serial": 4145113, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "86e2db45594ac497897807aeb8c4cd84", "sha256": "56ba75f5d6d65bdc636073c840383e233f37fed08db4b3ced908eaeb2bd9a147" }, "downloads": -1, "filename": "async_call-0.1.1-py2-none-any.whl", "has_sig": false, "md5_digest": "86e2db45594ac497897807aeb8c4cd84", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3785, "upload_time": "2018-08-07T16:50:30", "url": "https://files.pythonhosted.org/packages/a8/31/49350d7efc1c4148b8f5705822ad43a4cf75a2e102685a0a37337cd23e22/async_call-0.1.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e1691b4f5690face0b7c2e0b78b15745", "sha256": "b6c78115e3926c77b8cf913d21e2d7437c3a8871c64070730d9b21b496efbeb0" }, "downloads": -1, "filename": "async_call-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e1691b4f5690face0b7c2e0b78b15745", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3773, "upload_time": "2018-08-07T16:50:31", "url": "https://files.pythonhosted.org/packages/94/5b/21dc544519024aa4798c4b588997bcea995ec629e4c97babc343315c3218/async_call-0.1.1-py3-none-any.whl" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "eb36ecda2dc10ac79f4a91d211731c3a", "sha256": "19dde8d0d787609e285cd483343da04f120d919699746c966bb6708472f2ac59" }, "downloads": -1, "filename": "async_call-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "eb36ecda2dc10ac79f4a91d211731c3a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3785, "upload_time": "2018-08-07T17:03:24", "url": "https://files.pythonhosted.org/packages/86/56/aa1fbd0af24fd22c250a283d8436619169b9b5e66b0cf12d00ff4b839344/async_call-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb2e1a82db294493324c5d58a04223a6", "sha256": "9f85e69e0b3052240e9156376a33a18c8736522c1a5118d5434302b48fa9cd87" }, "downloads": -1, "filename": "async_call-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bb2e1a82db294493324c5d58a04223a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3775, "upload_time": "2018-08-07T17:03:25", "url": "https://files.pythonhosted.org/packages/4f/ef/9b273f084a36e8e4fef938cf7af41293dca4c8e56e912cbeb678c90a953d/async_call-0.1.2-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eb36ecda2dc10ac79f4a91d211731c3a", "sha256": "19dde8d0d787609e285cd483343da04f120d919699746c966bb6708472f2ac59" }, "downloads": -1, "filename": "async_call-0.1.2-py2-none-any.whl", "has_sig": false, "md5_digest": "eb36ecda2dc10ac79f4a91d211731c3a", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 3785, "upload_time": "2018-08-07T17:03:24", "url": "https://files.pythonhosted.org/packages/86/56/aa1fbd0af24fd22c250a283d8436619169b9b5e66b0cf12d00ff4b839344/async_call-0.1.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "bb2e1a82db294493324c5d58a04223a6", "sha256": "9f85e69e0b3052240e9156376a33a18c8736522c1a5118d5434302b48fa9cd87" }, "downloads": -1, "filename": "async_call-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "bb2e1a82db294493324c5d58a04223a6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3775, "upload_time": "2018-08-07T17:03:25", "url": "https://files.pythonhosted.org/packages/4f/ef/9b273f084a36e8e4fef938cf7af41293dca4c8e56e912cbeb678c90a953d/async_call-0.1.2-py3-none-any.whl" } ] }