gmr / consulate

Python client for the Consul HTTP API

Home Page:http://consulate.readthedocs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consulate: A Consul Client Library

Consulate is a Python client library and set of application for the Consul service discovery and configuration system.

Version Status Coverage

Installation

Consulate is available via via pypi and can be installed with easy_install or pip:

If you require communicating with Consul via a Unix socket, there is an extra dependency that is installed via:

Command Line Utilities

Consulate comes with two command line utilities that make working with Consul easier from a management perspective. The consulate application provides a cli wrapper for common tasks performed.

consulate

The consulate application provides a CLI interface for registering a service, backing up and restoring the contents of the KV database, and actions for getting, setting, and deleting keys from the KV database.

Service Registration Help:

KV Database Utilities Help:

Locking Operations Help:

Service listing Help:

API Usage Examples

The following examples highlight the usage of Consulate and does not document the scope of the full Consulate API.

Using Consulate with the Consul kv database:

Working with the Consulate.agent API:

Fetching health information from Consul:

For more examples, check out the Consulate documentation.

About

Python client for the Consul HTTP API

http://consulate.readthedocs.org

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Python 98.8%Language:Shell 1.2%