{ "info": { "author": "Simon Harrison", "author_email": "noisyboiler@googlemail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "|Travis|_ |Python27|_ |Python33|_ |Python34|_ |Python35|_ |Python36|_\n\n.. |Travis| image:: https://travis-ci.org/noisyboiler/nameko-wamp.svg?branch=master\n.. _Travis: https://travis-ci.org/noisyboiler/nameko-wamp\n\n.. |Python27| image:: https://img.shields.io/badge/python-2.7-blue.svg\n.. _Python27: https://pypi.python.org/pypi/nameko-wamp/\n\n.. |Python34| image:: https://img.shields.io/badge/python-3.4-blue.svg\n.. _Python34: https://pypi.python.org/pypi/nameko-wamp/\n\n.. |Python35| image:: https://img.shields.io/badge/python-3.5-blue.svg\n.. _Python35: https://pypi.python.org/pypi/nameko-wamp/\n\n.. |Python36| image:: https://img.shields.io/badge/python-3.6-blue.svg\n.. _Python36: https://pypi.python.org/pypi/nameko-wamp/\n\nnameko wamp\n===========\n\nWeb Application Messaging Protocol (WAMP) for the nameko microservices framework\n\nNameko Wamp provides Extensions for WAMP PUB-SUB and RPC. Here is a (silly) example service implementing WAMP entrypoints and dependencies.\n\n::\n\n from nameko_wamp.extensions.dependencies import Caller, Publisher\n from nameko_wamp.extensions.entrypoints import consume, callee\n\n\n class WeatherService:\n\n name = \"weather_service\"\n\n # a Dependency used to make remote procedure calls over WAMP.\n # note that we don't need to know what nameko service implements\n # a particular remote procedure.\n caller = Caller()\n # another Dependency to publish messages to Topics.\n publihser = Publisher()\n\n @callee\n def get_weather(self):\n # the weather is always sunny here!\n return \"sunny\"\n\n @consume\n def weather_updates(self, topic_data):\n # and do something with the new weather data here\n pass\n\n\nOne method is marked as a \"callee\", which is a WAMP Role, and another is marked as a WAMP \"caller\" Role. The former is callable over RPC and is (almost) exactly the same as the nameko ``rpc`` Extension. The latter consumes from a WAMP Topic and appears exactly the same as the nameko ``event_handler`` Extension.\n\nThere is also the dependency injection ``caller``. Yet another WAMP Role, this allows outgoing RPC calls from your service to other nameko services. Finally the WAMP Role ``publisher`` dependency which allows a service API to publish messages to WAMP Topics.\n\nWampy\n~~~~~\n\n**Important**\n\nUnder the hood **nameko-wamp** uses wampy_ as the Client Peer. Wampy uses **Gevent** by default for async networking whilst nameko uses **Eventlet**, so you must instruct wampy to use *eventlet* too.\n\n::\n\n $ export WAMPY_ASYNC_NAME=eventlet\n\nYou can use a stand-alone **wampy** Client to interact with your nameko services too. See the wampy_ project for more details, but the standard pattern is:\n\n::\n\n with Client(url=\"ws://example.com:8080\") as client:\n result = client.rpc.get_weather()\n assert result == \"sunny\"\n\n # and publish to a Topic\n client.publish(topic=\"foobar\", message={...})\n\nNote that when I call a remote procedure there is no reference to the service that provides it - and this is different to core nameko where a service name must be provided. This simpler behaviour is explained by the Router Peer which maintains all the registrations and subscriptions on behalf of WAMP clients implementing these Roles.\n\n\nRun Tests\n---------\n\n::\n\n $ pip install --editable .[dev]\n $ py.test ./test -vs\n\n\n.. _wampy: https://github.com/noisyboiler/wampy\n.. _nameko: https://github.com/nameko/nameko\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/noisyboiler/nameko_wamp", "keywords": "WAMP RPC", "license": "GNU GPLv3", "maintainer": "", "maintainer_email": "", "name": "nameko-wamp", "package_url": "https://pypi.org/project/nameko-wamp/", "platform": "", "project_url": "https://pypi.org/project/nameko-wamp/", "project_urls": { "Homepage": "https://github.com/noisyboiler/nameko_wamp" }, "release_url": "https://pypi.org/project/nameko-wamp/0.3.0/", "requires_dist": [ "eventlet (==0.20.1)", "nameko (==2.5.4)", "six (==1.10.0)", "wampy (==0.9.19)", "attrs (==17.4.0) ; extra == 'dev'", "crossbar (==0.15.0) ; extra == 'dev'", "autobahn (==0.17.2) ; extra == 'dev'", "Twisted (==17.9.0) ; extra == 'dev'", "pytest (==3.1.3) ; extra == 'dev'", "mock (==1.3.0) ; extra == 'dev'", "pytest-capturelog (==0.7) ; extra == 'dev'", "colorlog ; extra == 'dev'", "flake8 (==3.5.0) ; extra == 'dev'", "gevent-websocket (==0.10.1) ; extra == 'dev'", "coverage (>=3.7.1) ; extra == 'dev'" ], "requires_python": "", "summary": "WAMP extension for nameko", "version": "0.3.0" }, "last_serial": 4625267, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "b048f0e4db5c11b867d9f1a329b090a1", "sha256": "a5218d23741361975d96365fa6ee5bcb6be7ba719ac296bbe6e7f9864006915d" }, "downloads": -1, "filename": "nameko_wamp-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b048f0e4db5c11b867d9f1a329b090a1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8980, "upload_time": "2017-04-23T13:05:23", "url": "https://files.pythonhosted.org/packages/94/46/07e87f7bc16c8a4f6a623fc4415053e9076e5a7e162239106ca99f96f48a/nameko_wamp-0.1.0-py2.py3-none-any.whl" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0977485496dd5a01b5608f4f6409bccc", "sha256": "dfc7dbb0941aeaad83a77cf0ef932e3899e2af91f04a5c14f4a4e0adcd1f7ff9" }, "downloads": -1, "filename": "nameko_wamp-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0977485496dd5a01b5608f4f6409bccc", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9009, "upload_time": "2017-04-23T13:08:55", "url": "https://files.pythonhosted.org/packages/dc/a2/6123fba71af420b460cdbf388f19a8ed4034e08f7aa80611baa4ffc9ddb0/nameko_wamp-0.1.1-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "da35776e574c38b633322429ca9f7095", "sha256": "a3508509018cae5b6cd411a405890d4f18712d1d2f50e895905f0b3c67af21c2" }, "downloads": -1, "filename": "nameko_wamp-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "da35776e574c38b633322429ca9f7095", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 12358, "upload_time": "2017-09-11T09:22:23", "url": "https://files.pythonhosted.org/packages/bb/ad/82fb8c705da80d7feeb490afdb8ed6bb189bb1478e4d6756003be26814a8/nameko_wamp-0.2.0-py2.py3-none-any.whl" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "d6ce7bfbb2c24447fb8d054cc1808cbe", "sha256": "7be165170595a804d943fa3896d496e44ad1bd12cbb31ff3f04e962e13459bca" }, "downloads": -1, "filename": "nameko_wamp-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d6ce7bfbb2c24447fb8d054cc1808cbe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22626, "upload_time": "2018-12-21T14:26:33", "url": "https://files.pythonhosted.org/packages/e6/b0/7d01366d6f24d61f2856f2343533c8400bfc7b2b4494dcc3b94b17a404b7/nameko_wamp-0.3.0-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d6ce7bfbb2c24447fb8d054cc1808cbe", "sha256": "7be165170595a804d943fa3896d496e44ad1bd12cbb31ff3f04e962e13459bca" }, "downloads": -1, "filename": "nameko_wamp-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d6ce7bfbb2c24447fb8d054cc1808cbe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 22626, "upload_time": "2018-12-21T14:26:33", "url": "https://files.pythonhosted.org/packages/e6/b0/7d01366d6f24d61f2856f2343533c8400bfc7b2b4494dcc3b94b17a404b7/nameko_wamp-0.3.0-py2.py3-none-any.whl" } ] }