{ "info": { "author": "Thomas Kluyver", "author_email": "thomas@kluyver.me.uk", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python", "Programming Language :: Python :: 3" ], "description": "Zantedeschia is an experimental alternative integration between asyncio and\nZeroMQ sockets.\n\nI started trying to use `aiozmq `_, but I\nobjected to some of the design decisions. I borrowed ideas from that code, but\ndid a few things differently:\n\n1. ``aiozmq`` is built around asyncio's protocol and transport APIs, which I\n find hard to use; even the simplest examples involve subclassing\n ``ZmqProtocol``. Zantedeschia uses a single AsyncZMQSocket wrapper class,\n with simple semantics.\n2. Zantedeschia does not include an RPC framework.\n3. Zantedeschia expects the user to create and connect ZMQ sockets using PyZMQ,\n then wrap them in an AsyncZMQSocket object.\n\n*Zantedeschia* is a genus of flowers. Asyncio itself was originally codenamed\n'tulip', and a tradition developed of naming asyncio libraries after flowers.\n\nUse this at your own risk. MinRK, the author of PyZMQ, told me that I definitely\nshouldn't rely on the ZMQ file descriptors for an event loop, but I'm doing\nexactly that.\n\nPing server example:\n\n.. code:: python\n\n import asyncio, zmq, zantedeschia\n\n ctx = zmq.Context()\n s = ctx.socket(zmq.REP)\n s.bind('tcp://127.0.0.1:8123')\n async_sock = zantedeschia.AsyncZMQSocket(s)\n\n def pong():\n while True:\n msg_parts = yield from async_sock.recv_multipart()\n yield from async_sock.send_multipart(msg_parts)\n\n asyncio.get_event_loop().run_until_complete(pong())\n\nUsing the ``on_recv`` API instead:\n\n.. code:: python\n\n import asyncio, zmq, zantedeschia\n\n ctx = zmq.Context()\n s = ctx.socket(zmq.REP)\n s.bind('tcp://127.0.0.1:8123')\n async_sock = zantedeschia.AsyncZMQSocket(s)\n\n @async_sock.on_recv\n def pong(msg_parts):\n async_sock.send_multipart(msg_parts)\n\n asyncio.get_event_loop().run_forever()", "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/takluyver/Zantedeschia", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "Zantedeschia", "package_url": "https://pypi.org/project/Zantedeschia/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Zantedeschia/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/takluyver/Zantedeschia" }, "release_url": "https://pypi.org/project/Zantedeschia/0.1/", "requires_dist": null, "requires_python": null, "summary": "ZeroMQ sockets integrated with the AsyncIO event loop", "version": "0.1" }, "last_serial": 1415548, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e0d02a1d681c9e5a1cb558ec44cd840b", "sha256": "48104800c103189d4f45f8a18f353791a723ab797967a0be6afba3c75c1309d8" }, "downloads": -1, "filename": "Zantedeschia-0.1.tar.gz", "has_sig": false, "md5_digest": "e0d02a1d681c9e5a1cb558ec44cd840b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4006, "upload_time": "2015-02-09T01:29:53", "url": "https://files.pythonhosted.org/packages/ba/3b/7ce39b5a9ac82e3e441eff56bb1898479c29d7455d9d30c86ac98256b364/Zantedeschia-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e0d02a1d681c9e5a1cb558ec44cd840b", "sha256": "48104800c103189d4f45f8a18f353791a723ab797967a0be6afba3c75c1309d8" }, "downloads": -1, "filename": "Zantedeschia-0.1.tar.gz", "has_sig": false, "md5_digest": "e0d02a1d681c9e5a1cb558ec44cd840b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4006, "upload_time": "2015-02-09T01:29:53", "url": "https://files.pythonhosted.org/packages/ba/3b/7ce39b5a9ac82e3e441eff56bb1898479c29d7455d9d30c86ac98256b364/Zantedeschia-0.1.tar.gz" } ] }