{ "info": { "author": "Andrew Dunai", "author_email": "andrew@dun.ai", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# django-nameko\n\n## Travis-CI [![Coverage Status](https://coveralls.io/repos/github/and3rson/django-nameko/badge.svg)](https://coveralls.io/github/and3rson/django-nameko)\n| Branch | Build status |\n| ------- | ---------------------------------------- |\n| master | [![Build Status](https://travis-ci.org/and3rson/django-nameko.svg?branch=master)](https://travis-ci.org/and3rson/django-nameko) |\n| develop | [![Build Status](https://travis-ci.org/and3rson/django-nameko.svg?branch=develop)](https://travis-ci.org/and3rson/django-nameko) |\n\n\nDjango wrapper for [Nameko] microservice framework.\n\n\n# support\ntested with \n\n- python 2.7, 3.5, 3.6, 3.7\n- django 1.11, 2.0, 2.1, 2.2\n- nameko 2.11, 2.12\n\n# How to use\n\n```python\nfrom django_nameko import get_pool \n\n# Within some view or model:\nwith get_pool().next() as rpc:\n rpc.mailer.send_mail(foo='bar')\n```\n\n# Installation\n\n```sh\npip install django-nameko\n```\n\n# Configuration\n\n```python\n# Config to be passed to ClusterRpcProxy \nNAMEKO_CONFIG = { \n 'AMQP_URI': 'amqp://127.0.0.1:5672/'\n} \n\n# Number of proxies to create \n# Each proxy is a single threaded standalone ClusterRpcProxy\nNAMEKO_POOL_SIZE = 4\n# Set timeout for RPC\nNAMEKO_TIMEOUT = 15 # timeout 15 seconds\n# Add this dictionary to context_data of every RPC\nNAMEKO_CONTEXT_DATA = {\n 'hostname': \"my.example.com\"\n}\n\n# Create multiple ClusterRpcProxy pool each one assoiate with a name\n# Every pool with pool name different than 'default' will use 'default' pool config as default configuration\nNAMEKO_CONFIG={\n 'default': {\n 'AMQP_URI': 'amqp://',\n 'POOL_SIZE': 4,\n 'POOL_CONTEXT_DATA': {\"common\": \"multi\"},\n 'POOL_TIMEOUT': None\n },\n 'pool1': {\n 'AMQP_URI': 'amqp://pool2',\n 'POOL_CONTEXT_DATA': {\"name\": \"pool1\", \"data\": 123},\n },\n 'pool2': {\n 'AMQP_URI': 'amqp://pool3',\n 'POOL_CONTEXT_DATA': {\"name\": \"pool2\", \"data\": 321},\n 'POOL_TIMEOUT': 60\n },\n 'pool3': {\n 'POOL_SIZE': 8,\n 'POOL_TIMEOUT': 60\n }\n}\n# Use multi pool by putting pool name in get_pool(..)\nfrom django_nameko import get_pool\n\nwith get_pool('pool1').next() as rpc:\n rpc.mailer.send_mail(foo='bar')\n \n# call get_pool() without argument will return the 'default' pool\n# but you can override the rpc context data before call, example below.\n# it will auto revert back to POOL_CONTEXT_DATA when exit the with block\nwith get_pool().next() as rpc:\n rpc._worker_ctx.data['SMTP_SECRET'] = 'SECRETXXX'\n rpc.mailer.send_mail(foo='bar')\n\n# try to call rpc outside of with statement block will raise an AttributeError exception \nrpc.mailer.send_mail(bar='foo')\n# File \"/usr/local/lib/python2.7/site-packages/django_nameko/rpc.py\", line 69, in __getattr__\n# raise AttributeError(item)\n# AttributeError: mailer\n\n```\n\n# contribute\n\nto run the tests:\n1. run a local rabbitmq\n2. execute tox \n```bash\ndocker run --rm -p 15672:15672 -p 5672:5672 -p 5671:5671 --name nameko-rabbitmq nameko/nameko-rabbitmq:3.6.6\n# open another shell then run\npython setup.py test\n# to run full test with coverage use\ntox \n```\n\n# Credits\nThanks to guys who made an awesome [Nameko] framework.\n\nMaintainers:\n - Andrew Dunai ([@and3rson](https://github.com/and3rson))\n - Vincent Anh Tran ([@tranvietanh1991](https://github.com/tranvietanh1991))\n\n[Nameko]: https://github.com/nameko/nameko", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/and3rson/django-nameko", "keywords": "", "license": "GPLv2", "maintainer": "Vincent Anh Tran", "maintainer_email": "tranvietanh1991@gmail.com", "name": "django-nameko", "package_url": "https://pypi.org/project/django-nameko/", "platform": "", "project_url": "https://pypi.org/project/django-nameko/", "project_urls": { "Homepage": "http://github.com/and3rson/django-nameko" }, "release_url": "https://pypi.org/project/django-nameko/0.6.1/", "requires_dist": null, "requires_python": "", "summary": "Django wrapper for nameko microservice framework.", "version": "0.6.1" }, "last_serial": 5791767, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "526b24c901c4c0991ab1848707e528f9", "sha256": "c6f8740bc9affd7283fc67f82b6b6a405a52919e7e403cd2f413f28ec9b38c48" }, "downloads": -1, "filename": "django-nameko-0.1.tar.gz", "has_sig": false, "md5_digest": "526b24c901c4c0991ab1848707e528f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2240, "upload_time": "2016-09-14T15:29:35", "url": "https://files.pythonhosted.org/packages/93/05/3574acf1bed897ac240eb9d6ec40fa60a8781c88470e360d8436d700e7a0/django-nameko-0.1.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "0a666a61f18a6a0bbb43e3990345b96b", "sha256": "87abd7f413ca58acd20361159f102af7920e5cf5c8d473c43f5ba495e23504d6" }, "downloads": -1, "filename": "django-nameko-0.5.1.tar.gz", "has_sig": false, "md5_digest": "0a666a61f18a6a0bbb43e3990345b96b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4483, "upload_time": "2019-02-14T05:29:07", "url": "https://files.pythonhosted.org/packages/d7/3d/688fcac34cda6ed2e9fe70b65331b6705384d2e6c600e0bb3c03eb0d626c/django-nameko-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "eade18b1ec35c14ceb51df02717f16ed", "sha256": "ef7e63c9a3a6c710ab29217779c29b9f526777d0a8063d300f50cd52b7361d9d" }, "downloads": -1, "filename": "django-nameko-0.5.2.tar.gz", "has_sig": false, "md5_digest": "eade18b1ec35c14ceb51df02717f16ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4568, "upload_time": "2019-03-13T10:37:58", "url": "https://files.pythonhosted.org/packages/1b/4c/2fd98534c1fdd1d3d04b4091427c6fb60e7e9896d810f75e88f0f0b44859/django-nameko-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "cd3649c62eb4a00b208c204582a55c0c", "sha256": "18eedfa995556bf9d45c474d7f4a5a551a00cf08cc3fd712f1251b753613fc4a" }, "downloads": -1, "filename": "django-nameko-0.5.3.tar.gz", "has_sig": false, "md5_digest": "cd3649c62eb4a00b208c204582a55c0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17397, "upload_time": "2019-04-12T02:53:03", "url": "https://files.pythonhosted.org/packages/58/08/5a7e1c24977f28a0ea958ebb8a80822dee4c1f62c5b3432a0f818a30499f/django-nameko-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "fe877146000f7935d1353d0c5856ab93", "sha256": "fb174b6edc9b1a729e9c6c01d3017cba67d0b20efa49dede2797f99ba15a8605" }, "downloads": -1, "filename": "django-nameko-0.5.4.tar.gz", "has_sig": false, "md5_digest": "fe877146000f7935d1353d0c5856ab93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17758, "upload_time": "2019-04-17T08:26:43", "url": "https://files.pythonhosted.org/packages/f9/92/8d661226cf1c9580890221de6318136c074094e9c6f7df22b59603236b55/django-nameko-0.5.4.tar.gz" } ], "0.5.5": [ { "comment_text": "", "digests": { "md5": "f3dc7a737c0649bb0b7467ec6b80acef", "sha256": "87bfb2cac3c4db66136e5470787a59b9e2fc7fddafed42fbb074a11db0e52bb2" }, "downloads": -1, "filename": "django-nameko-0.5.5.tar.gz", "has_sig": false, "md5_digest": "f3dc7a737c0649bb0b7467ec6b80acef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20273, "upload_time": "2019-07-02T11:29:38", "url": "https://files.pythonhosted.org/packages/5d/44/67770aedc633e51a36916c95ed8aa839c5610d0b0d418eb6ea159bec1351/django-nameko-0.5.5.tar.gz" } ], "0.5.6": [ { "comment_text": "", "digests": { "md5": "da9e0bfb91759a54a4f522ddef8cdcec", "sha256": "46a307e3a860a664a4d386de9c8bda988440f45c70d0c7a1b015ba7ff30b1851" }, "downloads": -1, "filename": "django-nameko-0.5.6.tar.gz", "has_sig": false, "md5_digest": "da9e0bfb91759a54a4f522ddef8cdcec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20267, "upload_time": "2019-07-03T04:08:38", "url": "https://files.pythonhosted.org/packages/50/bc/d54f8a38428bad3ee4865ee844cb4e4fc018cf6441353a13cbd51ac6e3ce/django-nameko-0.5.6.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "5bd899501e4457ebb872e06f661239aa", "sha256": "371e21b679bf3f38c45c6ad1d4ee2c8e39b3dd072029819491a39692adfbb5d2" }, "downloads": -1, "filename": "django-nameko-0.6.0.tar.gz", "has_sig": false, "md5_digest": "5bd899501e4457ebb872e06f661239aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20691, "upload_time": "2019-08-16T05:34:52", "url": "https://files.pythonhosted.org/packages/d3/e9/dcc5bc3053fc47800e70688635bfbc48251e74c12a037acb1f729676abdb/django-nameko-0.6.0.tar.gz" } ], "0.6.1": [ { "comment_text": "", "digests": { "md5": "e9b8d374325e9f589623d1db9f1b8d1e", "sha256": "09fd6efe39374a8dde75133b8a936f73b4c3fdf372777e224d8102b8c581dba9" }, "downloads": -1, "filename": "django-nameko-0.6.1.tar.gz", "has_sig": false, "md5_digest": "e9b8d374325e9f589623d1db9f1b8d1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20723, "upload_time": "2019-09-06T11:48:26", "url": "https://files.pythonhosted.org/packages/65/6a/35a59033282581fd27bc7deb5514533545e841bbaa3ed3563e1239655828/django-nameko-0.6.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9b8d374325e9f589623d1db9f1b8d1e", "sha256": "09fd6efe39374a8dde75133b8a936f73b4c3fdf372777e224d8102b8c581dba9" }, "downloads": -1, "filename": "django-nameko-0.6.1.tar.gz", "has_sig": false, "md5_digest": "e9b8d374325e9f589623d1db9f1b8d1e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20723, "upload_time": "2019-09-06T11:48:26", "url": "https://files.pythonhosted.org/packages/65/6a/35a59033282581fd27bc7deb5514533545e841bbaa3ed3563e1239655828/django-nameko-0.6.1.tar.gz" } ] }