{ "info": { "author": "Vincent Anh Tran", "author_email": "tranvietanh1991@gmail.com", "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/tranvietanh1991/nameko-django/badge.svg)](https://coveralls.io/github/tranvietanh1991/nameko-django)\n| Branch | Build status |\n| ------- | ---------------------------------------- |\n| master | [![Build Status](https://travis-ci.org/tranvietanh1991/nameko-django.svg?branch=master)](https://travis-ci.org/tranvietanh1991/nameko-django) |\n| develop | [![Build Status](https://travis-ci.org/tranvietanh1991/nameko-django.svg?branch=develop)](https://travis-ci.org/tranvietanh1991/nameko-django) |\n\n# nameko-django\nDjango intergration for nameko microservice framework\n\n## Custom Kombu Serializer for django Object using msgpack and pickle\n\nThis serializer is fully compatible with msgpack so it can be used like this:\n\n```yaml\nserializer: 'django_msgpackpickle'\nACCEPT: ['msgpack', 'django_msgpackpickle']\nSERIALIZERS:\n msgpack:\n encoder: 'nameko_django.serializer.dumps'\n decoder: 'nameko_django.serializer.loads'\n content_type: 'application/x-msgpack'\n content_encoding: 'binary'\n```\n\nIn order to migrate an existing microservices stack (that use `msgpack` serializer) to use this new serializer \nfirst install and setup all project\n```yaml\nserializer: 'msgpack'\nACCEPT: ['msgpack', 'django_msgpackpickle']\nSERIALIZERS:\n msgpack:\n encoder: 'nameko_django.serializer.pack'\n decoder: 'nameko_django.serializer.loads'\n content_type: 'application/x-msgpack'\n content_encoding: 'binary'\n```\nThis will accept both of the `msgpack` and `django_msgpackpickle` but only output of result portfolio using `msgpack`\nOnce all service migrated, then switch to the first configuration\n\n## Features\n### This serializer will automatically encode and decode: \n- DateTime, Date, Time, Duration: \n object will be converted to string representation compatible with django.utils.dateparse \n and convert back using django.utils.dateparse()\n- Decimal:\n object will be converted to byte string and then recover back to Decimal\n- Django ORM instance:\n object will be pickled using python cPickle/pickle library and depickled back to ORM Model instance\n- Django ORM queryset:\n object will be deform to Model + Query then pickled to avoid sending a list of instance\n\n### String evaluation\nThis serializer can evaluate string that is compatible with `django.utils.dateparse` format \nand auto convert the string to either `DateTime`, `Date`, `Time`, `Duration` object.\n\nAlso it can evaluate string with format like this:\n`\"\"` this will be converted to an ORM instance: using `Model.objects.get(pk=ID)`\nFor example: ``\n\n`\"(app_name.model_name: RAW_QUERY_WITHOUT_SELECT_FROM)\"` this will be converted to an ORM queryset\nFor example: `(auth.User: id >= 1 and date_joined > '2018-11-22 00:47:14.263837')`", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tranvietanh1991/nameko-django", "keywords": "", "license": "GPLv2", "maintainer": "Vincent Anh Tran", "maintainer_email": "vincent.tran@bentoinvest.cloud", "name": "nameko-django", "package_url": "https://pypi.org/project/nameko-django/", "platform": "", "project_url": "https://pypi.org/project/nameko-django/", "project_urls": { "Homepage": "https://github.com/tranvietanh1991/nameko-django" }, "release_url": "https://pypi.org/project/nameko-django/1.1.0/", "requires_dist": null, "requires_python": "", "summary": "Django intergration for nameko microservice framework.", "version": "1.1.0" }, "last_serial": 6005354, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a7553f0222fa34261c5d2b36b4d1eb58", "sha256": "b2a95036527604d09aee503115cadf6ec1bc5b245a9884b4364ca14fb5c54e1d" }, "downloads": -1, "filename": "nameko_django-1.0.0-py2.7.egg", "has_sig": false, "md5_digest": "a7553f0222fa34261c5d2b36b4d1eb58", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 5646, "upload_time": "2019-09-02T11:00:04", "url": "https://files.pythonhosted.org/packages/16/3c/d93a9ba49cbb554929a1dcd30def8986a7968863e70f440a6aee40a67d31/nameko_django-1.0.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "74058760e5e469888c7e99f07706406c", "sha256": "e825cf5cd26615f2b4834eb9e9b041c6dc670397330f2fc5fab6e6606c252746" }, "downloads": -1, "filename": "nameko_django-1.0.0-py2-none-any.whl", "has_sig": false, "md5_digest": "74058760e5e469888c7e99f07706406c", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 15951, "upload_time": "2019-09-02T11:00:00", "url": "https://files.pythonhosted.org/packages/42/65/62126ff97833174744dc8af23a9c210c397aa8b3b5107a86f4b21655502c/nameko_django-1.0.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "aa13e0070e38d1454955dc05a16ada44", "sha256": "8f307ff365babf82b222ef00b63348143ed6af6714b9ac917a22231271ea9ac2" }, "downloads": -1, "filename": "nameko-django-1.0.0.tar.gz", "has_sig": false, "md5_digest": "aa13e0070e38d1454955dc05a16ada44", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15507, "upload_time": "2019-09-02T11:00:03", "url": "https://files.pythonhosted.org/packages/e5/36/98c1596653502f35cd90bd691b57bf45b3cd4ce712ddfc8eacd02608b669/nameko-django-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "5c6773513c2ee3455a67c6e68396751f", "sha256": "3693581ba6cbcfd30cf8783f685b16469ec49b5f0b07c657e80896913bd6cd1b" }, "downloads": -1, "filename": "nameko-django-1.0.1.tar.gz", "has_sig": false, "md5_digest": "5c6773513c2ee3455a67c6e68396751f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15836, "upload_time": "2019-09-05T02:59:27", "url": "https://files.pythonhosted.org/packages/14/b7/677355cc11c40a8ef69f00b3b0ac9f10b7778237e47d8c5397ecb750a2eb/nameko-django-1.0.1.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "2811b477f4873ef3e8e54545be632320", "sha256": "07c8b9d1f98339eda4694b5c2df610b4fafa91df73b9b7ca46de01d2914318a4" }, "downloads": -1, "filename": "nameko-django-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2811b477f4873ef3e8e54545be632320", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17698, "upload_time": "2019-10-21T03:30:18", "url": "https://files.pythonhosted.org/packages/61/cf/d9fb7a170a01d2e6607b5a6ed34e2ef0d32f18008242620a31c12aea28a2/nameko-django-1.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2811b477f4873ef3e8e54545be632320", "sha256": "07c8b9d1f98339eda4694b5c2df610b4fafa91df73b9b7ca46de01d2914318a4" }, "downloads": -1, "filename": "nameko-django-1.1.0.tar.gz", "has_sig": false, "md5_digest": "2811b477f4873ef3e8e54545be632320", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17698, "upload_time": "2019-10-21T03:30:18", "url": "https://files.pythonhosted.org/packages/61/cf/d9fb7a170a01d2e6607b5a6ed34e2ef0d32f18008242620a31c12aea28a2/nameko-django-1.1.0.tar.gz" } ] }