Skip to main content

Python client for Consul (

Project description


> Python client for [Consul][1]

A dummy, one-file, implementation on top of the [HTTP API][5] of Consul.


* Install Consul following [the official guide][3] or this one-liner:

$ # Install consul 0.1.0_linux_amd64 under /usr/local/bin
$ wget -qO- | (sudo) bash

* Install pyconsul library

$ git clone
$ cd pyconsul && (sudo) python install

Getting started

I strongly advise you to go through [the official Consul documentation][4]
before playing around with pyconsul.

Make sure an agent is running, for example with :

consul agent -server -bootstrap \
-data-dir /tmp/consul \
-node=agent-one \

Then you can talk to it

from pyconsul import Consul

# On the same server
consul_ = Consul()
print consul_.status

# Access key / value storage
consul_.set('node/name', 'test')

# Or manage local agent (incomplete)
print consul_.local_agent.members

... in construction ...


Copyright 2014 Xavier Bruhiere.

PyConsul is available under the [MIT Licence][2].


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyconsul, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pyconsul-0.0.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page