{ "info": { "author": "Piotr Roszatycki", "author_email": "piotr.roszatycki@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Artistic License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": ".. image:: https://img.shields.io/pypi/v/Pyjo-Reactor-Asyncio.png\r\n :target: https://pypi.python.org/pypi/Pyjo-Reactor-Asyncio\r\n.. image:: https://travis-ci.org/dex4er/Pyjo-Reactor-Asyncio.png?branch=master\r\n :target: https://travis-ci.org/dex4er/Pyjo-Reactor-Asyncio\r\n.. image:: https://readthedocs.org/projects/pyjo-reactor-asyncio/badge/?version=latest\r\n :target: http://pyjo-reactor-asyncio.readthedocs.org/en/latest/\r\n\r\nPyjo-Reactor-Asyncio\r\n====================\r\n\r\nLow level event reactor with asyncio support for Pyjoyment.\r\n\r\n\r\nPyjoyment\r\n=========\r\n\r\nAn asynchronous, event driver web framework for the Python programming language.\r\n\r\nPyjoyment provides own reactor which handles I/O and timer events in its own\r\nmain event loop but it supports other loops, ie. *libev* or *asyncio*.\r\n\r\nSee http://www.pyjoyment.net/\r\n\r\n\r\nasyncio\r\n=======\r\n\r\nThis module provides infrastructure for writing single-threaded concurrent code\r\nusing coroutines, multiplexing I/O access over sockets and other resources,\r\nrunning network clients and servers, and other related primitives.\r\n\r\nThe asyncio module was designed in PEP3156_. For a motivational primer on\r\ntransports and protocols, see PEP3153_.\r\n\r\nSee http://asyncio.org/\r\n\r\n.. _PEP3153: https://www.python.org/dev/peps/pep-3153/\r\n.. _PEP3156: https://www.python.org/dev/peps/pep-3156/\r\n\r\n\r\nTrollius\r\n========\r\n\r\nTrollius is a portage of the asyncio project (PEP3156_) on Python 2.\r\nTrollius works on Python 2.6-3.5.\r\n\r\nSee https://trollius.readthedocs.org/\r\n\r\n\r\nExamples\r\n========\r\n\r\nNon-blocking TCP client/server\r\n------------------------------\r\n\r\n.. code-block:: python\r\n\r\n import Pyjo.Reactor.Asyncio\r\n import Pyjo.IOLoop\r\n\r\n\r\n # Listen on port 3000\r\n @Pyjo.IOLoop.server(port=3000)\r\n def server(loop, stream, cid):\r\n\r\n @stream.on\r\n def read(stream, chunk):\r\n # Process input chunk\r\n print(\"Server: {0}\".format(chunk.decode('utf-8')))\r\n\r\n # Write response\r\n stream.write(b\"HTTP/1.1 200 OK\\x0d\\x0a\\x0d\\x0a\")\r\n\r\n # Disconnect client\r\n stream.close_gracefully()\r\n\r\n\r\n # Connect to port 3000\r\n @Pyjo.IOLoop.client(port=3000)\r\n def client(loop, err, stream):\r\n\r\n @stream.on\r\n def read(stream, chunk):\r\n # Process input\r\n print(\"Client: {0}\".format(chunk.decode('utf-8')))\r\n\r\n # Write request\r\n stream.write(b\"GET / HTTP/1.1\\x0d\\x0a\\x0d\\x0a\")\r\n\r\n\r\n # Add a timer\r\n @Pyjo.IOLoop.timer(3)\r\n def timeouter(loop):\r\n print(\"Timeout\")\r\n # Shutdown server\r\n loop.remove(server)\r\n\r\n\r\n # Start event loop\r\n Pyjo.IOLoop.start()", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/dex4er/Pyjo-Reactor-Asyncio/archive/master.zip", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/dex4er/Pyjo-Reactor-Asyncio", "keywords": "async asyncio mojo mojolicious pyjo pyjoyment reactor", "license": "Artistic", "maintainer": "", "maintainer_email": "", "name": "Pyjo-Reactor-Asyncio", "package_url": "https://pypi.org/project/Pyjo-Reactor-Asyncio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Pyjo-Reactor-Asyncio/", "project_urls": { "Download": "https://github.com/dex4er/Pyjo-Reactor-Asyncio/archive/master.zip", "Homepage": "http://github.com/dex4er/Pyjo-Reactor-Asyncio" }, "release_url": "https://pypi.org/project/Pyjo-Reactor-Asyncio/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Low level event reactor for Pyjoyment with asyncio support.", "version": "0.0.1" }, "last_serial": 2029831, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "b31818d3a5118c480d6389119d850d55", "sha256": "fe0c1b2fb14a518eed73d57e00e1d36ab9682b3c0a058baff41ebf7a7c2437b5" }, "downloads": -1, "filename": "Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b31818d3a5118c480d6389119d850d55", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7666, "upload_time": "2016-03-27T14:01:24", "url": "https://files.pythonhosted.org/packages/74/4f/3b32edd7bb940c921ae228fed68c5b6861230865d2ef34192bc0486d04cb/Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54cc33976d2a2ba47aa34dd8bd7359a6", "sha256": "289da0cceb271f23b27cb2b6cc8f9ce3311acc361e98ba13f240481d825cbac3" }, "downloads": -1, "filename": "Pyjo-Reactor-Asyncio-0.0.1.tar.gz", "has_sig": false, "md5_digest": "54cc33976d2a2ba47aa34dd8bd7359a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5231, "upload_time": "2016-03-27T14:01:30", "url": "https://files.pythonhosted.org/packages/e4/be/e70cbb7cf044de743701380abcb2304874d298184e10233ac4f52c8a431e/Pyjo-Reactor-Asyncio-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b31818d3a5118c480d6389119d850d55", "sha256": "fe0c1b2fb14a518eed73d57e00e1d36ab9682b3c0a058baff41ebf7a7c2437b5" }, "downloads": -1, "filename": "Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b31818d3a5118c480d6389119d850d55", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 7666, "upload_time": "2016-03-27T14:01:24", "url": "https://files.pythonhosted.org/packages/74/4f/3b32edd7bb940c921ae228fed68c5b6861230865d2ef34192bc0486d04cb/Pyjo_Reactor_Asyncio-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54cc33976d2a2ba47aa34dd8bd7359a6", "sha256": "289da0cceb271f23b27cb2b6cc8f9ce3311acc361e98ba13f240481d825cbac3" }, "downloads": -1, "filename": "Pyjo-Reactor-Asyncio-0.0.1.tar.gz", "has_sig": false, "md5_digest": "54cc33976d2a2ba47aa34dd8bd7359a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5231, "upload_time": "2016-03-27T14:01:30", "url": "https://files.pythonhosted.org/packages/e4/be/e70cbb7cf044de743701380abcb2304874d298184e10233ac4f52c8a431e/Pyjo-Reactor-Asyncio-0.0.1.tar.gz" } ] }