python-consul2
Python client for Consul (http://www.consul.io/)
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-consul2uv
uv add python-consul2poetry
poetry add python-consul2Installing 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
Tags
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework…
permissive · top 100 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
cloudpickleCloudpickle extends Python's standard pickle…
permissive · top 1,000 on PyPI
smart-openProvides a unified, open()-compatible Python…
permissive · top 1,000 on PyPI
portalockerPortalocker provides cross-platform file…
permissive · top 1,000 on PyPI
rayRay is a distributed computing framework that…
permissive · top 1,000 on PyPI
python-consulPython client library for Consul, a service…
permissive · top 5,000 on PyPI
py-consulPython client library for HashiCorp Consul that…
permissive · top 5,000 on PyPI
consulateConsulate is a Python client library for…
permissive · top 15,000 on PyPI
yalexsAsync Python client library for Yale Access…
permissive · top 15,000 on PyPI
facebook-sdkA Python client library for the Facebook Graph…
permissive · top 15,000 on PyPI
elastic-agent-clientA Python client library for communicating with…
unclear · top 15,000 on PyPI
hatch-cythonA Hatch build hook that integrates Cython…
permissive · top 15,000 on PyPI
mozilla-django-oidcIntegrates Django applications with OpenID…
copyleft · top 5,000 on PyPI
django-cloneDuplicates Django model instances with…
permissive · top 15,000 on PyPI