{ "info": { "author": "Gavin M. Roy", "author_email": "gavinr@aweber.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries", "Topic :: System :: Clustering", "Topic :: System :: Systems Administration" ], "description": "Consulate: A Consul Client Library\n==================================\n\nConsulate is a Python client library and set of application for the Consul\nservice discovery and configuration system.\n\n|Version| |Downloads| |Status| |Coverage| |License|\n\nInstallation\n------------\n\nConsulate is available via via `pypi `_\nand can be installed with easy_install or pip:\n\n.. code:: bash\n\n pip install consulate\n\nIf you require communicating with Consul via a Unix socket, there is an extra\ndependency that is installed via:\n\n.. code:: bash\n\n pip install consulate[unixsocket]\n\nCommand Line Utilities\n----------------------\nConsulate comes with two command line utilities that make working with Consul\neasier from a management perspective. The ``consulate`` application provides\na cli wrapper for common tasks performed.\n\nThe ``passport`` application has been moved to a stand-alone application and\nis available at https://github.com/gmr/passport.\n\nconsulate\n^^^^^^^^^\nThe consulate application provides a CLI interface for registering a service,\nbacking up and restoring the contents of the KV database, and actions for getting,\nsetting, and deleting keys from the KV database.\n\n.. code:: bash\n\n usage: consulate [-h] [--api-scheme API_SCHEME] [--api-host API_HOST]\n [--api-port API_PORT] [--datacenter DC] [--token TOKEN]\n {register,deregister,kv,run_once} ...\n\n CLI utilities for Consul\n\n optional arguments:\n -h, --help show this help message and exit\n --api-scheme API_SCHEME\n The scheme to use for connecting to Consul with\n --api-host API_HOST The consul host to connect on\n --api-port API_PORT The consul API port to connect to\n --datacenter DC The datacenter to specify for the connection\n --token TOKEN ACL token\n\n Commands:\n {register,deregister,kv,run_once}\n register Register a service for this node\n deregister Deregister a service for this node\n kv Key/Value Database Utilities\n run_once Lock command\n\n If the CONSUL_RPC_ADDR environment variable is set, it will be parsed and used\n for default values when connecting.\n\nService Registration Help:\n\n.. code:: bash\n\n usage: consulate register [-h] [-a ADDRESS] [-p PORT] [-s SERVICE_ID]\n [-t TAGS]\n name {check,httpcheck,no-check,ttl} ...\n\n positional arguments:\n name The service name\n\n optional arguments:\n -h, --help show this help message and exit\n -a ADDRESS, --address ADDRESS\n Specify an address\n -p PORT, --port PORT Specify a port\n -s SERVICE_ID, --service-id SERVICE_ID\n Specify a service ID\n -t TAGS, --tags TAGS Specify a comma delimited list of tags\n\n Service Check Options:\n {check,httpcheck,no-check,ttl}\n check Define an external script-based check\n httpcheck Define an HTTP-based check\n no-check Do not enable service monitoring\n ttl Define a duration based TTL check\n\nKV Database Utilities Help:\n\n.. code:: bash\n\n usage: consulate kv [-h] {backup,restore,ls,mkdir,get,set,rm} ...\n\n optional arguments:\n -h, --help show this help message and exit\n\n Key/Value Database Utilities:\n {backup,restore,ls,mkdir,get,set,rm}\n backup Backup to stdout or a JSON file\n restore Restore from stdin or a JSON file\n ls List all of the keys\n mkdir Create a folder\n get Get a key from the database\n set Set a key in the database\n rm Remove a key from the database\n\nLocking Operations Help:\n\n.. code:: bash\n\n usage: consulate [-h] run_once [-i INTERVAL] prefix command\n\n positional arguments:\n prefix the name of the lock which will be held in Consul.\n command the command to run\n\n optional arguments:\n -h, --help show this help message and exit\n -i, --interval hold the lock for INTERVAL seconds\n\nAPI Usage Examples\n------------------\nThe following examples highlight the usage of Consulate and does not document\nthe scope of the full Consulate API.\n\n*Using Consulate with the Consul kv database:*\n\n.. code:: python\n\n consul = consulate.Consul()\n\n # Set the key named release_flag to True\n consul.kv['release_flag'] = True\n\n # Get the value for the release_flag, if not set, raises AttributeError\n try:\n should_release_feature = consul.kv['release_flag']\n except AttributeError:\n should_release_feature = False\n\n # Delete the release_flag key\n del consul.kv['release_flag']\n\n # Find all keys that start with \"fl\"\n consul.kv.find('fl')\n\n # Find all keys that start with \"feature_flag\" terminated by \"/\" separator\n consul.kv.find('feature_flag', separator='/')\n\n # Check to see if a key called \"foo\" is set\n if \"foo\" in consul.kv:\n print 'Already Set'\n\n # Return all of the items in the key/value store\n consul.kv.items()\n\n*Working with the Consulate.agent API:*\n\n.. code:: python\n\n consul = consulate.Consul()\n\n # Get all of the service checks for the local agent\n checks = consul.agent.checks()\n\n # Get all of the services registered with the local agent\n services = consul.agent.services()\n\n # Add a service to the local agent\n consul.agent.service.register('redis',\n port=6379,\n tags=['master'],\n ttl='10s')\n\n\n*Fetching health information from Consul:*\n\n.. code:: python\n\n consul = consulate.Session()\n\n # Get the health of a individual node\n health = consul.health.node('my-node')\n\n # Get all checks that are critical\n checks = consul.heath.state('critical')\n\nFor more examples, check out the Consulate documentation.\n\n.. |Version| image:: https://img.shields.io/pypi/v/consulate.svg?\n :target: https://pypi.python.org/pypi/consulate\n\n.. |Status| image:: https://img.shields.io/travis/gmr/consulate.svg?\n :target: https://travis-ci.org/gmr/consulate\n\n.. |Coverage| image:: https://img.shields.io/codecov/c/github/gmr/consulate.svg?\n :target: https://codecov.io/github/gmr/consulate?branch=master\n\n.. |Downloads| image:: https://img.shields.io/pypi/dm/consulate.svg?\n :target: https://pypi.python.org/pypi/consulate\n\n.. |License| image:: https://img.shields.io/pypi/l/consulate.svg?\n :target: https://consulate.readthedocs.org\n", "description_content_type": null, "docs_url": "https://pythonhosted.org/consulate/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://consulate.readthedocs.org", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "consulate", "package_url": "https://pypi.org/project/consulate/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/consulate/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://consulate.readthedocs.org" }, "release_url": "https://pypi.org/project/consulate/0.6.0/", "requires_dist": null, "requires_python": null, "summary": "A Client library for the Consul", "version": "0.6.0" }, "last_serial": 1645157, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "9cf5d31da53bbda6321f737c8346c4e2", "sha256": "d9c41dee800b0bab44e4da65abc1c83a1d895ece0cbeeb084bca87bbd160b808" }, "downloads": -1, "filename": "consulate-0.1.1.tar.gz", "has_sig": false, "md5_digest": "9cf5d31da53bbda6321f737c8346c4e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13434, "upload_time": "2014-05-06T16:50:23", "url": "https://files.pythonhosted.org/packages/c9/c6/29713a2f740965043b7d6e8c7386772280ed1e892261d0a85eef05406364/consulate-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4c396e605e30b26e855a867f84477db6", "sha256": "2f4e71a7d5def13acc28d6dc74ed994a437ea1d38f03509e9f74ac14d894ba14" }, "downloads": -1, "filename": "consulate-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4c396e605e30b26e855a867f84477db6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13448, "upload_time": "2014-05-06T17:37:16", "url": "https://files.pythonhosted.org/packages/a7/41/44a00e7a6135f9e59bce6b97370695b7c52c5c4e918f7eaeff60297cd3ef/consulate-0.1.2.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "902cdad490f332316ac12b2391301700", "sha256": "17be21a522184dc0e5b223e400dd0199b1ff5d58d83c7919a63f784b9412d8ad" }, "downloads": -1, "filename": "consulate-0.2.0.tar.gz", "has_sig": false, "md5_digest": "902cdad490f332316ac12b2391301700", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12355, "upload_time": "2014-07-22T18:06:37", "url": "https://files.pythonhosted.org/packages/f6/a0/beb688174f69bb2550d36d88b887301d41c28919d2c60be18cacf53fed1f/consulate-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "28552a611d7d388be74c4a79a7bada75", "sha256": "a9fe4d8293f4dd2632dd109230f59c41d934c21ad1dd3b0531b2472921c38ec1" }, "downloads": -1, "filename": "consulate-0.3.0-py2-none-any.whl", "has_sig": false, "md5_digest": "28552a611d7d388be74c4a79a7bada75", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 13950, "upload_time": "2015-03-13T19:09:22", "url": "https://files.pythonhosted.org/packages/b9/5b/d3965ef72b3b5a3b8f63b9dc17145571baf6d626df9db9b86bc8c623a8fc/consulate-0.3.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b09bea7e28ab7a2bedf7a4bd40922d76", "sha256": "bf64eaddea9d20150d44c05391d83171fa0bab3fdd634098d72e9bd529271496" }, "downloads": -1, "filename": "consulate-0.3.0.tar.gz", "has_sig": false, "md5_digest": "b09bea7e28ab7a2bedf7a4bd40922d76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14011, "upload_time": "2015-03-13T19:09:19", "url": "https://files.pythonhosted.org/packages/1d/da/a9c73b964c90ab35ea8170c254b4dad96e3517d509047ccb3fd2f2834a1f/consulate-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "d24af475ab1d097807c4e0e1b591f7db", "sha256": "cd5b0aeb54c7b9fd85398654166a245ddf97776c3428ab3b8669ba38fc79e65f" }, "downloads": -1, "filename": "consulate-0.4.0-py2-none-any.whl", "has_sig": false, "md5_digest": "d24af475ab1d097807c4e0e1b591f7db", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 22476, "upload_time": "2015-03-14T05:31:58", "url": "https://files.pythonhosted.org/packages/64/e0/82eb325b3dc1648a49bee91e2aa50ef4e52c480a960d76d48726b8a26dab/consulate-0.4.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "afe5659a84b10c412321d4a33212eb42", "sha256": "69753f5f63073b9a149502279e23df3a1f7dc6fce29a7acca3c2db3f95a0e47b" }, "downloads": -1, "filename": "consulate-0.4.0.tar.gz", "has_sig": false, "md5_digest": "afe5659a84b10c412321d4a33212eb42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18168, "upload_time": "2015-03-14T05:31:56", "url": "https://files.pythonhosted.org/packages/99/c6/f808272882c209ac9eb1f300acf4364672ebefa04a8dfba6821898bd8288/consulate-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "0c01742cc7ddee666457324af230c4f8", "sha256": "befc415aa0d299ae24113a460ad0fbd56d1c4455d61690e15b42b54918bc1488" }, "downloads": -1, "filename": "consulate-0.5.0-py2-none-any.whl", "has_sig": false, "md5_digest": "0c01742cc7ddee666457324af230c4f8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23568, "upload_time": "2015-05-13T13:43:59", "url": "https://files.pythonhosted.org/packages/e2/cf/0fa7e6eccc42ab798c5c9fd757f46047b40c4dd7ff5854e1dfa5969c8718/consulate-0.5.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e75b1f8d492321a0b29da57a72b1eb1a", "sha256": "2fb7b3dd5f5befba439adac4077156c5d0126ab0949d174f515b0b22c9e56dcc" }, "downloads": -1, "filename": "consulate-0.5.0.tar.gz", "has_sig": false, "md5_digest": "e75b1f8d492321a0b29da57a72b1eb1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19173, "upload_time": "2015-05-13T13:43:56", "url": "https://files.pythonhosted.org/packages/2e/29/3a2988e097f9d0e183d14d33b85a5823ed9d7c2ee315e38b23f62994465f/consulate-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "87dbfd47687caccbe1eb177b0441f29c", "sha256": "55839ef60f8156ff5db64cf956994e10fb6534cc676b968a6eaddce73fc6a09c" }, "downloads": -1, "filename": "consulate-0.5.1-py2-none-any.whl", "has_sig": false, "md5_digest": "87dbfd47687caccbe1eb177b0441f29c", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 23572, "upload_time": "2015-05-13T17:52:38", "url": "https://files.pythonhosted.org/packages/73/9d/de6751536d2779b389cb58b18073a22782d43f6607fc0012a8b0f83b9855/consulate-0.5.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f8583e8d504963a361d3700b6e48b1e0", "sha256": "a11e7bf22e78c6c0a08703979c7c0aa85ab7a60d5ef1a5d2aa6a8ba0f6f2c403" }, "downloads": -1, "filename": "consulate-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f8583e8d504963a361d3700b6e48b1e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19183, "upload_time": "2015-05-13T17:52:35", "url": "https://files.pythonhosted.org/packages/ed/d7/194fb2dd2b320e9fd4dfaf6ab5db405d25d5eafd689d5a9464cf07a53786/consulate-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "db8cbd06f07699ae226916977dcc23f7", "sha256": "344a83570806db45a772380c7125762f669fceeb42a3dc2278e2a991b74a2719" }, "downloads": -1, "filename": "consulate-0.6.0-py2-none-any.whl", "has_sig": false, "md5_digest": "db8cbd06f07699ae226916977dcc23f7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 25843, "upload_time": "2015-07-22T15:36:31", "url": "https://files.pythonhosted.org/packages/45/73/712feb6bd02118d4650e7b26ba3431adb37454f3e9a14167e3ed85c01e14/consulate-0.6.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15bd25472f1a8c346f36903fdf54ece5", "sha256": "78a839e71e62ea8b725b60740ef3ba282a6af7f7db4df83546ee4e762810d757" }, "downloads": -1, "filename": "consulate-0.6.0.tar.gz", "has_sig": false, "md5_digest": "15bd25472f1a8c346f36903fdf54ece5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21612, "upload_time": "2015-07-22T15:36:28", "url": "https://files.pythonhosted.org/packages/1c/0b/5856e3b28e4b1d78b452a6a3a708ed2b80e3db68cb7dcc274b09abd8f983/consulate-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "db8cbd06f07699ae226916977dcc23f7", "sha256": "344a83570806db45a772380c7125762f669fceeb42a3dc2278e2a991b74a2719" }, "downloads": -1, "filename": "consulate-0.6.0-py2-none-any.whl", "has_sig": false, "md5_digest": "db8cbd06f07699ae226916977dcc23f7", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 25843, "upload_time": "2015-07-22T15:36:31", "url": "https://files.pythonhosted.org/packages/45/73/712feb6bd02118d4650e7b26ba3431adb37454f3e9a14167e3ed85c01e14/consulate-0.6.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "15bd25472f1a8c346f36903fdf54ece5", "sha256": "78a839e71e62ea8b725b60740ef3ba282a6af7f7db4df83546ee4e762810d757" }, "downloads": -1, "filename": "consulate-0.6.0.tar.gz", "has_sig": false, "md5_digest": "15bd25472f1a8c346f36903fdf54ece5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21612, "upload_time": "2015-07-22T15:36:28", "url": "https://files.pythonhosted.org/packages/1c/0b/5856e3b28e4b1d78b452a6a3a708ed2b80e3db68cb7dcc274b09abd8f983/consulate-0.6.0.tar.gz" } ] }