{ "info": { "author": "OCEAN S.A.", "author_email": "osf@ocean.io", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3.6" ], "description": "aioscript\n=========\n\n:info: Base asyncio script with support of threading and multiprocessing\n\n.. image:: https://travis-ci.org/wikibusiness/aioscript.svg?branch=master\n :target: https://travis-ci.org/wikibusiness/aioscript\n\n.. image:: https://img.shields.io/pypi/v/aioscript.svg\n :target: https://pypi.python.org/pypi/aioscript\n\n.. image:: https://codecov.io/gh/wikibusiness/aioscript/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/wikibusiness/aioscript\n\nInstallation\n------------\n\n.. code-block:: shell\n\n pip install aioscript\n\nUsage\n-----\n\n.. code-block:: python\n\n from aiohttp import ClientSession, web\n\n from aioscript import AbstractScript\n\n\n class Script(AbstractScript):\n\n def setup(self):\n self.session = ClientSession(loop=self.loop)\n\n async def close(self):\n await self.session.close()\n\n async def handle(self, url):\n async with self.session.get(url) as response:\n if response.status == web.HTTPOk.status_code:\n print(response.url, 'Ok')\n else:\n print(response.url, 'Not ok')\n\n async def populate(self):\n urls = [\n 'https://www.python.org/',\n 'https://www.python.org/doc/',\n 'https://docs.python.org/3/',\n 'https://docs.python.org/3/library/concurrency.html',\n 'https://docs.python.org/3/library/asyncio.html',\n 'https://docs.python.org/3/library/asyncio-eventloop.html',\n ]\n for url in urls:\n yield url\n\n\n if __name__ == '__main__':\n Script().run()\n\n.. code-block:: shell\n\n python script.py --coroutines=10\n\nPython 3.6+ is required\n\nThanks\n------\n\nThe library was donated by `Ocean S.A. `_\n\nThanks to the company for contribution.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wikibusiness/aioscript", "keywords": "asyncio", "license": "", "maintainer": "", "maintainer_email": "", "name": "aioscript", "package_url": "https://pypi.org/project/aioscript/", "platform": "", "project_url": "https://pypi.org/project/aioscript/", "project_urls": { "Homepage": "https://github.com/wikibusiness/aioscript" }, "release_url": "https://pypi.org/project/aioscript/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Base asynchronous script with threading and multiprocessing", "version": "0.0.1" }, "last_serial": 3538433, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "71e9be1bd4649bf82bca3888db7f6a98", "sha256": "57e158265c4f24deeb875fa2cc49eb131a5049a449e314b048ed4bc9050ee60c" }, "downloads": -1, "filename": "aioscript-0.0.1.tar.gz", "has_sig": false, "md5_digest": "71e9be1bd4649bf82bca3888db7f6a98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5361, "upload_time": "2018-01-31T14:08:09", "url": "https://files.pythonhosted.org/packages/e7/a8/4ecf28193265f6b156c009382e519e4125e13ac62e6c3ba63039722d5ba5/aioscript-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "71e9be1bd4649bf82bca3888db7f6a98", "sha256": "57e158265c4f24deeb875fa2cc49eb131a5049a449e314b048ed4bc9050ee60c" }, "downloads": -1, "filename": "aioscript-0.0.1.tar.gz", "has_sig": false, "md5_digest": "71e9be1bd4649bf82bca3888db7f6a98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5361, "upload_time": "2018-01-31T14:08:09", "url": "https://files.pythonhosted.org/packages/e7/a8/4ecf28193265f6b156c009382e519e4125e13ac62e6c3ba63039722d5ba5/aioscript-0.0.1.tar.gz" } ] }