{ "info": { "author": "Richard Lander", "author_email": "lander2k2@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "====================\ndjango-microservices\n====================\nDjango-microservices helps you manage the development and interaction\nof microservices built in Django.\n\n--------\nUse Case\n--------\nYou are using Django to build an application with a microservices architecture.\nYou have serveral services that communicate to each over HTTP and each service\nis it's own Django project. You need to run ``./manage.py runserver [port]`` for\neach service to bring it up and have the application function when developing.\n\nDjango-microservices helps by:\n\n#. giving you a single ``/.manage.py runcluster`` command to fire up the development\n server for each project\n#. providing a service discovery API that will allow your services to find one another\n\n------------\nRequirements\n------------\nDjango\n\n-------\nInstall\n-------\nCreate a *new* virutual environment and django project alongside the django\nprojects that make up your micoservices application::\n \n $ mkvirutalenv myapp_service_manager\n $ pip install django django-microservices psycopg2 # for postgres database\n $ django-admin startproject service_manager\n $ cd service_manager\n\nCreate your service manager database::\n\n $ createdb myapp_service_manager # if using postgres\n\nEdit the settings in your new service manager project. Add ``microservices``\nto the ``INSTALLED_APPS`` add the database settings::\n\n # service_manager/settings.py\n \n INSTALLED_APPS = (\n 'django.contrib.admin',\n 'django.contrib.auth',\n ...\n 'microservices',\n )\n\n # for postgres database\n DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.postgresql_psycopg2',\n 'NAME': 'myapp_service_manager',\n 'USER': 'db_user',\n 'PASSWORD': 'secret',\n 'HOST': 'localhost',\n 'PORT': '5432',\n }\n }\n \nCreate database tables::\n\n $ ./manage.py migrate\n\nCreate an admin user::\n\n $ ./manage.py createsuperuser\n\nEdit the root urls file to look like this::\n\n # service_manager/urls.py\n\n from django.conf.urls import include, url\n from django.contrib import admin\n\n from microservices.admin import services_admin_site\n\n urlpatterns = [\n url(r'^', include('microservices.urls')),\n url(r'^admin/', include(services_admin_site.urls)),\n ]\n\n\n-----\nUsage\n-----\n\nIn your service manager project, run ``./manage.py runcluster`` then navigate\nto ``http://127.0.0.1:8000``.\n\nThe first time you do this, you won't see any services registerd. Click\non the \"Admin\" link, log in and register services by clicking on \"Services\"\nin the Microservices admin. Click \"Add service\" to add each new service\nin your app.\n\nNow at the index page of the service manager project you will see a list of \nservices with links to each.\n\nFor any application that needs to find services in the cluster, add this to\nthe settings.py file::\n\n import requests\n\n SERVICES = requests.get('http://127.0.0.1:8000/services/').json()\n\nThen use ``settings.SERVICES[service_name]`` to get the correct IP for any service\nin your application.\n\n", "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/lander2k2/django-microservices", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-microservices", "package_url": "https://pypi.org/project/django-microservices/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-microservices/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/lander2k2/django-microservices" }, "release_url": "https://pypi.org/project/django-microservices/0.1/", "requires_dist": null, "requires_python": null, "summary": "A framework for building microservices with Django.", "version": "0.1" }, "last_serial": 1533371, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "f807f5fd3517ab4cc8a70c0dfa8ee951", "sha256": "82dd46b530bb45bcc6b983449203822325657ae2bfe1209f1b0166b01defebe8" }, "downloads": -1, "filename": "django-microservices-0.1.tar.gz", "has_sig": false, "md5_digest": "f807f5fd3517ab4cc8a70c0dfa8ee951", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2015-05-05T02:04:31", "url": "https://files.pythonhosted.org/packages/f7/ab/5fd564750568f0e106dfdf1edd53169a872b54d253fd0adff39e4fa4ea4c/django-microservices-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f807f5fd3517ab4cc8a70c0dfa8ee951", "sha256": "82dd46b530bb45bcc6b983449203822325657ae2bfe1209f1b0166b01defebe8" }, "downloads": -1, "filename": "django-microservices-0.1.tar.gz", "has_sig": false, "md5_digest": "f807f5fd3517ab4cc8a70c0dfa8ee951", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3814, "upload_time": "2015-05-05T02:04:31", "url": "https://files.pythonhosted.org/packages/f7/ab/5fd564750568f0e106dfdf1edd53169a872b54d253fd0adff39e4fa4ea4c/django-microservices-0.1.tar.gz" } ] }