Skip to main content

Python client for Consul (

Project description

Python client for


Read the Docs


Build StatusCoverage Status


import consul

c = consul.Consul()

# poll a key for updates
index = None
while True:
    index, data = c.kv.get('foo', index=index)
    print data['Value']

# in another process
c.kv.put('foo', 'bar')


pip install python-consul


There’s a few API endpoints still to go to expose all features available in Consul v0.4.1. If you need an endpoint that’s not in the documentation, just open an issue and I’ll try and add it straight away.

Change log



  • Add support for the Catalog API (Consul.Catalog)

  • Add ability to set a default consistency mode for an entire client session

  • Add the ability to pass the consistency mode with kv.get



  • Add support for ACLs (Consul.ACL)

API changes (backwards incompatible)

  • For Consul.Agent.Service.register, rename check argument to script

Project details

Download files

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

Source Distribution

python-consul-0.3.1.tar.gz (9.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page