{ "info": { "author": "Ontje L\u00fcnsdorf", "author_email": "oluensdorf at gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Scientific/Engineering", "Topic :: System :: Networking" ], "description": "simpy.io\n========\n\n*simpy.io* is an asynchronous networking library based on SimPy_. The nature\nof networking is thoroughly event-based (messages can for example be thought of\nas events). *simpy.io* marries the solid event system of SimPy_ with\nasynchronous input and output.\n\nIt provides several degrees of abstraction (raw sockets, packets and\nrequest-reply messages), supports various back-ends ((e)poll, select, asyncore,\nvirtual) and lets you use different socket types, like TCP, SSL-encrypted,\nsimulated). Furthermore protocols like HTTP, WebSockets and an extensible RPC\ninterface are also supported.\n\n.. _SimPy: http://simpy.readthedocs.org\n\nCurrent status\n--------------\n\nsimpy.io is currently in the early alpha phase of development. There is no\nguarantee for API stability (modules will almost certainly be renamed before\nthe 1.0 release) and simpy.io may break on your system. Sadly, there isn't any\ndocumentation available as of now (apart from the examples and tests).\n\nThe state of the individual modules is as follows:\n\n* sockets: stable *alpha*\n* packets: stable *alpha*\n* message: stable *alpha*\n* http: *draft*\n* websockets: *draft*\n* rpc: *draft*\n\nThe following table represents the support matrix. As of now, there's no CI\nsystem in place to guarantee the test stability, yet.\n\n======== =============== ============= ========== ================\nSystem Flavor Python Backends Successful tests\n======== =============== ============= ========== ================\nLinux ArchLinux 2.6.9, 2.7.6, *all* *all*\n 3.3, 3.4\nLinux Ubuntu (12.04) 2.6.9, 2.7.6, *all* *most*\n 3.3\nWindows Windows 7 2.6.9, 2.7.6, select *all*\n 3.3\nOS X Maverick (10.9) 3.3 *no* epoll *most*\n======== =============== ============= ========== ================\n\n.. note::\n\n Python 2 does not natively support all of SimPy's features (e.g. no\n exception chains or return statements inside of generators) but workarounds\n are available.\n\nInstallation\n------------\n\nsimpy.io requires Python 2.7 or 3.3 and SimPy 3. You can install it from\nBitbucket via pip:\n\n.. sourcecode:: bash\n\n $ pip install hg+https://bitbucket.org/simpy/simpy.io\n\nExamples\n--------\n\nThe following three examples demonstrate simpy.io's levels of abstraction:\n\nSocket level\n^^^^^^^^^^^^\n\nWhen working directly with simpy.io sockets, you can try to *read* and *write*\na specified number of bytes from or to a socket (note that there is no\nguarantee from the OS that all data will be received or transmitted):\n\n.. sourcecode:: python\n\n >>> from simpy.io import select as backend\n >>>\n >>> def server(env, addr):\n ... server_sock = backend.TCPSocket.server(env, addr)\n ... sock = yield server_sock.accept()\n ... data = yield sock.read(4)\n ... print(data.decode())\n ... yield sock.write('cya'.encode())\n >>>\n >>> def client(env, addr):\n ... sock = backend.TCPSocket.connection(env, addr)\n ... yield sock.write('ohai'.encode())\n ... data = yield sock.read(3)\n ... print(data.decode())\n >>>\n >>> addr = ('127.0.0.1', 5555)\n >>> env = backend.Environment()\n >>> srv = env.process(server(env, addr))\n >>> cli = env.process(client(env, addr))\n >>> env.run(until=cli)\n ohai\n cya\n\n\nPacket level\n^^^^^^^^^^^^\n\nsimpy.io packets alleviate the limitation of raw sockets and allow you to read\nand write complete packets. These can either be bytes (if you use ``Packet``)\nor (unicode) strings (if you use ``PacketUTF8``):\n\n.. sourcecode:: python\n\n >>> from simpy.io import select as backend\n >>> from simpy.io.packet import Packet\n >>>\n >>> def server(env, addr):\n ... server_sock = backend.TCPSocket.server(env, addr)\n ... sock = yield server_sock.accept()\n ... packet = Packet(sock)\n ... data = yield packet.read()\n ... print(data.decode())\n ... yield packet.write('cya'.encode())\n >>>\n >>> def client(env, addr):\n ... packet = Packet(backend.TCPSocket.connection(env, addr))\n ... yield packet.write('ohai'.encode())\n ... data = yield packet.read()\n ... print(data.decode())\n >>>\n >>> addr = ('127.0.0.1', 5556)\n >>> env = backend.Environment()\n >>> srv = env.process(server(env, addr))\n >>> cli = env.process(client(env, addr))\n >>> env.run(until=cli)\n ohai\n cya\n\n\nMessage level\n^^^^^^^^^^^^^\n\nThe message level adds message counters that allow you to asynchronously send\nmessages (even concurrently) and maps replies to their proper requests.\nFurthermore, you can specify (de)serializers (by default, *JSON* is used) and\nreplies can signal success/failure:\n\n.. sourcecode:: python\n\n >>> from simpy.io import select as backend\n >>> from simpy.io.packet import PacketUTF8\n >>> from simpy.io.message import Message\n >>>\n >>> def server(env, addr):\n ... server_sock = backend.TCPSocket.server(env, addr)\n ... sock = yield server_sock.accept()\n ... message = Message(env, PacketUTF8(sock))\n ... request = yield message.recv()\n ... print(request.content)\n ... yield request.succeed('cya')\n >>>\n >>> def client(env, addr):\n ... message = Message(env, PacketUTF8(\n ... backend.TCPSocket.connection(env, addr)))\n ... reply = yield message.send('ohai')\n ... print(reply)\n >>>\n >>> addr = ('127.0.0.1', 5557)\n >>> env = backend.Environment()\n >>> srv = env.process(server(env, addr))\n >>> cli = env.process(client(env, addr))\n >>> env.run(until=cli)\n ohai\n cya\n\nHelp & Contact\n--------------\n\nPlease feel free to post a message to the `SimPy-Users mailing list`__ to ask\nfor help or to discuss the ongoing development. Bugs should be posted on our\n`issue tracker`__ here on BitBucket.\n\n__ mailto:simpy-users@lists.sourceforge.net\n__ https://bitbucket.org/simpy/simpy.io/issues?status=new&status=open", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/simpy/simpy.io", "keywords": "", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "simpy.io", "package_url": "https://pypi.org/project/simpy.io/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/simpy.io/", "project_urls": { "Homepage": "https://bitbucket.org/simpy/simpy.io" }, "release_url": "https://pypi.org/project/simpy.io/0.2.3/", "requires_dist": [ "SimPy (>=3.0.9)" ], "requires_python": "", "summary": "Asynchronous networking based on SimPy.", "version": "0.2.3" }, "last_serial": 2306664, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "54cf4411069117f3df7f506c1ddecc7e", "sha256": "65caedb3aad48734a17e792dd561bcd9d9f1b9df8e74151283db12c0f79bfbfc" }, "downloads": -1, "filename": "simpy.io-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "54cf4411069117f3df7f506c1ddecc7e", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 69757, "upload_time": "2014-03-26T14:28:39", "url": "https://files.pythonhosted.org/packages/50/6f/45740a939f331e776bbcee3eca84b09393461a4778320867b9f87019ed74/simpy.io-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c4a443b72a499e81997cdff9a9cfff88", "sha256": "e8911a3351c58d85271879787e83b53e2f9a1c78e89e538bf927fcd91f6a642a" }, "downloads": -1, "filename": "simpy.io-0.1.tar.gz", "has_sig": false, "md5_digest": "c4a443b72a499e81997cdff9a9cfff88", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41223, "upload_time": "2014-03-26T14:28:31", "url": "https://files.pythonhosted.org/packages/3a/a3/8e446ee290e72205f271f792011f2ef726dd8cb6f398e62daf02b9bd97fd/simpy.io-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "e81d2479337632baa48a9d4596cbe5ee", "sha256": "cdbf3b923747a74b9fd679c460907a8c615410d3b6f174c22a85a890f9f3104d" }, "downloads": -1, "filename": "simpy.io-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e81d2479337632baa48a9d4596cbe5ee", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 69774, "upload_time": "2014-05-22T13:24:06", "url": "https://files.pythonhosted.org/packages/d7/78/5bf50a772f318be3b875aaee6aa58daa0ed3baa26beae17b1a0356844ef7/simpy.io-0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "84c559121f61f4dccc094a4f16fcebfc", "sha256": "4d22d6d59238b9c7356c9b3d3f81b4fd8556ab0287ff8c306e3b03119c5f57e5" }, "downloads": -1, "filename": "simpy.io-0.2.tar.gz", "has_sig": false, "md5_digest": "84c559121f61f4dccc094a4f16fcebfc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41329, "upload_time": "2014-05-22T13:24:08", "url": "https://files.pythonhosted.org/packages/e7/7a/04650fd8b274c9939bd75b8af431ed1eb36c61fba4bb71cb61560833c2ad/simpy.io-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "324cffb587e39373a8d2002d52c356aa", "sha256": "6f9ccc12f60b0a86cb877962600dd41b269b4224d263fad5b8eacd69de69c0bb" }, "downloads": -1, "filename": "simpy.io-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "324cffb587e39373a8d2002d52c356aa", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 71294, "upload_time": "2015-01-30T15:57:41", "url": "https://files.pythonhosted.org/packages/66/c8/19a56e09fb2af077d780eebcce626e86bfbfd6a4fdd3bd8f8060c381ca35/simpy.io-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "064944e3db16fe3789877878a8425cb0", "sha256": "b0d42ccb6dab0065a105cb3c1e47b7457cae86fefa23e47a3355068b0e26af59" }, "downloads": -1, "filename": "simpy.io-0.2.1.tar.gz", "has_sig": false, "md5_digest": "064944e3db16fe3789877878a8425cb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43443, "upload_time": "2015-01-30T15:57:45", "url": "https://files.pythonhosted.org/packages/8d/16/fe4f1ac8b05b6dc320bcad9702f2239b923733093dbdd792ba20dde3e3e9/simpy.io-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "91cc4adb153c98184f865f0731cb98e9", "sha256": "a9926de811a1d2422cd0d62f0895a759470c2e52721e6bf73e84c2e07fd5019d" }, "downloads": -1, "filename": "simpy.io-0.2.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "91cc4adb153c98184f865f0731cb98e9", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 71371, "upload_time": "2015-05-14T07:33:33", "url": "https://files.pythonhosted.org/packages/5a/c0/de4fb4d538ba7a850d9c944330b883fdef9f59b710c0bb071ebed1cbf11d/simpy.io-0.2.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7474fcf0691562d6aeb874579b85690f", "sha256": "4e1a495e6dfb138c4eb871b4a4bcb5c7ce329a4279818724609607df6dd9e644" }, "downloads": -1, "filename": "simpy.io-0.2.2.tar.gz", "has_sig": false, "md5_digest": "7474fcf0691562d6aeb874579b85690f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 43560, "upload_time": "2015-05-14T07:33:37", "url": "https://files.pythonhosted.org/packages/05/39/1d8376bf395e97944f351153244cbe522c58680903ab9f09102b0fb5b4d7/simpy.io-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "cf510af3dd77b73874452084b6829c55", "sha256": "62fa2974c9c64903b1384a37da54c16c9fb90aafcc4e21ba371a7a4537870504" }, "downloads": -1, "filename": "simpy.io-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf510af3dd77b73874452084b6829c55", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 71380, "upload_time": "2016-08-26T15:27:49", "url": "https://files.pythonhosted.org/packages/3e/21/dfc98e6240f82c8507c1955aaad9f2649cf9fb351dbf4f46e2f33e9bf25e/simpy.io-0.2.3-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cf510af3dd77b73874452084b6829c55", "sha256": "62fa2974c9c64903b1384a37da54c16c9fb90aafcc4e21ba371a7a4537870504" }, "downloads": -1, "filename": "simpy.io-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf510af3dd77b73874452084b6829c55", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 71380, "upload_time": "2016-08-26T15:27:49", "url": "https://files.pythonhosted.org/packages/3e/21/dfc98e6240f82c8507c1955aaad9f2649cf9fb351dbf4f46e2f33e9bf25e/simpy.io-0.2.3-py2.py3-none-any.whl" } ] }