{ "info": { "author": "Raphael Bernardi Zanluchi", "author_email": "raphael.zanluchi@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Build Tools" ], "description": "[![Build Status](https://travis-ci.org/rzanluchi/keyard.svg?branch=dev)](https://travis-ci.org/rzanluchi/keyard)\n# Keyard #\n\nThis project is a implementation of a Service Registry to work with the service discovery system.\n\n\n# Getting started #\n\nAswe are not on pypi you need to clone this repo to use it\n\n```\ngit clone git@github.com:rzanluchi/keyard.git\ncd keyard\npip install .\n```\n\nProbably you want to use a virtualenv\n\n# Configuring #\n\nKeyard uses a json file configuration where you can set and etcd connection or use a in memory store\n\n```\n{\n \"store_type\": \"etcd\",\n \"etcd\": {\n \"host\": \"localhost\",\n \"base_path\": \"/services\"\n }\n}\n```\nstore_type can be 'etcd' or 'simple'\n\nAnd to load the config create a python file like this bellow\n\n```\nfrom keyard import app\nfrom keyard.helpers import config\n\nconfig.load_file('example/config.json')\napp = app.create_app()\n``` \n\nthe create_app prepares all keyard resources and routes\n\n\n# Running #\n\nYou will need some WSGI server like gunicorn\n\n```\ngunicorn your_file:app -b 0.0.0.0:8000\n\n```\n\n# How to use it? #\n\nNow you have a service running at port 8000 and you have a resource on :8000/keyard where you can perform all the valid operations\n\n## GET ##\nA get will return the list of the services available based on the query string parameters \n* service_name -> name of the service you want (required)\n* version -> version of the service you want (not required)\n* load_balancer_strategy -> defines the load balancer strategy on server (not required)(only have 'random' for now)\n\nNot using version will return all matches for the service_name for all version.\nNot using load_balancer_strategy will return a list of all location available, using random the server chooses one and return it\n\n## POST ##\nA post will register a service on keyard. In the data you need service_name, version and a location. Version is not required and when not passe keyard assumes 1.0\n\n## PUT ##\nThis method is intended for health_check calls. Health check calls are made to inform keyard that a location is still up. \n\nIt uses the same data as post.\n\n## DELETE ##\nA delete will remove a location from keyard. Uses the same data as post\n\n\n# Example #\n\nThere is a example app for you to check. Start an etcd application localhost and\n```\ngunicorn example.keyard_app:app -b 0.0.0.0:8000\ngunicorn example.app2:app -b 0.0.0.0:8002\ngunicorn example.app1:app -b 0.0.0.0:8001\n\ncurl 0.0.0.0:8001/app1\n```\n\nThat curl should return you \"Hello World\"\n\n\n# License #\n\nThe MIT License (MIT)\n\nCopyright (c) 2015, Raphael Bernardi Zanluchi\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/rzanluchi/keyard/tarball/0.1.1", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rzanluchi/keyard", "keywords": "service registry", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "keyard", "package_url": "https://pypi.org/project/keyard/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/keyard/", "project_urls": { "Download": "https://github.com/rzanluchi/keyard/tarball/0.1.1", "Homepage": "https://github.com/rzanluchi/keyard" }, "release_url": "https://pypi.org/project/keyard/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Simple Service Registry", "version": "0.1.1" }, "last_serial": 1896488, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "14a6d688633b3975ca9f76ba77694a00", "sha256": "c2990ae10fc7c0296dd051298d4351753bcb5470bbb0c25a283a679f9230768e" }, "downloads": -1, "filename": "keyard-0.1.zip", "has_sig": false, "md5_digest": "14a6d688633b3975ca9f76ba77694a00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17620, "upload_time": "2015-12-25T14:12:04", "url": "https://files.pythonhosted.org/packages/9c/12/8d449fc2bab85aa926bbe72b6d4a997609123d087cb168a9c0f15eafd8be/keyard-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6a97bbab1a0e6d7744b2d63f817dd18f", "sha256": "f8002e3dcfcb2ff241610efa098825433719600707dc40cc265a61e0bf00444f" }, "downloads": -1, "filename": "keyard-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6a97bbab1a0e6d7744b2d63f817dd18f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8856, "upload_time": "2016-01-09T13:21:43", "url": "https://files.pythonhosted.org/packages/3f/27/ac401ebea261b2988ca33ef9d149b4dcb4beff2b50b76b6bc45c8ad680d4/keyard-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a97bbab1a0e6d7744b2d63f817dd18f", "sha256": "f8002e3dcfcb2ff241610efa098825433719600707dc40cc265a61e0bf00444f" }, "downloads": -1, "filename": "keyard-0.1.1.tar.gz", "has_sig": false, "md5_digest": "6a97bbab1a0e6d7744b2d63f817dd18f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8856, "upload_time": "2016-01-09T13:21:43", "url": "https://files.pythonhosted.org/packages/3f/27/ac401ebea261b2988ca33ef9d149b4dcb4beff2b50b76b6bc45c8ad680d4/keyard-0.1.1.tar.gz" } ] }