skillfed

python-consul2

Python client for Consul (http://www.consul.io/)

python-consul2 v0.1.5 110.6K downloads/30d#12,449 on PyPI129
Permissive license MIT Abandoned released

What it is and what it does

python-consul2 is a Python client library that wraps Consul's HTTP API, enabling programmatic interaction with Consul for service discovery, configuration management, and health monitoring. It provides methods to read and write key-value pairs, query service catalogs, manage health checks, and handle ACL operations. The library uses requests for HTTP communication and six for Python 2/3 compatibility.

The package was forked from an earlier python-consul project to address maintenance gaps and add support for newer Consul features. It exposes Consul's API through a simple object-oriented interface, allowing developers to integrate service discovery and distributed configuration into Python applications without making raw HTTP calls.

Use it for:

  • Retrieve configuration values from Consul's key-value store in a Python application at runtime.
  • Query Consul's service catalog to discover available service instances and their health status.
  • Register or deregister services and health checks programmatically during application startup and shutdown.
  • Implement distributed configuration management by polling Consul for key updates.
  • Manage Consul ACL tokens and permissions from Python automation scripts.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Python client library for Consul, providing programmatic access to Consul's HTTP API for service discovery, key-value storage, and health checking.

No. The package is abandoned (last commit 2022-02-16, no updates for over 2 years) and unlikely to receive security patches or compatibility fixes. While it has low install friction and a permissive license, the lack of maintenance makes it risky for production use. Consider an actively maintained Consul client library instead.

Install

python-consul2 on PyPI

pip

pip install python-consul2

uv

uv add python-consul2

poetry

poetry add python-consul2

Installing python-consul2

Before you install

Low install friction with only two runtime dependencies (requests and six). However, the package is abandoned as of 2022-02-16 with no active maintenance, so security updates and bug fixes are unlikely.

License in practice

MIT license is permissive, allowing commercial and private use with minimal restrictions.

Quickstart

pip install python-consul2

import consul

c = consul.Consul()
index, data = c.kv.get('foo', index=index)
print(data['Value'])

c.kv.put('foo', 'bar')

Requires a running Consul server accessible at the configured address; proxy environments may require http_proxy, https_proxy, and no_proxy environment variables to be set.

Verify before relying

  • Whether the package works reliably with modern Consul versions beyond v1.6.1.
  • Current compatibility with Python versions beyond 3.7 listed in classifiers.
  • Whether all Consul HTTP API endpoints are fully implemented or if gaps remain.

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 2 — requests, six
Maintenance abandoned — 2,124 days since the last release
Last repo commit (repository archived)
First released
Downloads 110,644/month — #12,449 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: python_consul2-0.1.5-py2.py3-none-any.whl

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7

Tags

consul python clientservice discovery consulconsul key-value storeconsul http api wrapperdistributed service registryconsul health checksconsul configuration management
service-discoveryconsulabandoned

More Distributed Computing packages