python-consul
Python client for Consul (http://www.consul.io/)
What it is and what it does
python-consul is a Python client library for HashiCorp Consul, a distributed system for service discovery, configuration management, and orchestration. It exposes Consul's HTTP API through Python methods, allowing you to interact with Consul's key-value store, register and deregister services, query health checks, manage ACLs, and access the agent and catalog endpoints from your Python applications.
The library works by wrapping HTTP requests to a Consul server instance using the requests library. It provides a simple, object-oriented interface—for example, you can poll a key for updates in a loop or atomically write configuration values. However, the package has been abandoned since 2018 with no active maintenance, meaning it may not support recent Consul API features or receive security updates.
Use it for:
- Build service discovery clients that query Consul's catalog to locate available services and their network addresses
- Implement distributed configuration management by reading and writing key-value pairs in Consul from Python applications
- Register and deregister application instances with health checks as part of a service mesh or microservices architecture
- Monitor service health by querying Consul's health check endpoints and reacting to state changes
- Manage ACL tokens and policies programmatically for access control in a Consul cluster
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for Consul, a service discovery and configuration management system, providing programmatic access to Consul's key-value store, health checks, service catalog, and agent APIs.
No. While the package has low install friction and a permissive license, it is abandoned (last release 2018-07-09, repository archived 2024) with no active maintenance or security updates. For new projects, use an actively maintained Consul client library or the official Consul API directly. For legacy systems already using python-consul, evaluate migration urgently.
Install
python-consul on PyPI
pip
pip install python-consuluv
uv add python-consulpoetry
poetry add python-consulInstalling python-consul
Before you install
Low install friction with only two lightweight runtime dependencies (requests and six). However, the package is abandoned—last release was 2018-07-09 and the repository was archived in 2024. No active maintenance or security updates are being provided.
License in practice
MIT license is permissive and places minimal restrictions on use, modification, and distribution. You can use this package in commercial and proprietary projects without licensing obligations.
Quickstart
pip install python-consul
import consul
c = consul.Consul()
index, data = c.kv.get('foo', index=None)
print(data['Value'])
c.kv.put('foo', 'bar')
When using python-consul in an environment with a proxy server, http_proxy, https_proxy, and no_proxy environment variables may need to be set for proper functionality.
Verify before relying
- Current compatibility with modern Consul server versions (package last updated 2018, Consul has evolved significantly since)
- Whether requests and six dependencies remain compatible with current Python versions despite package age
- Active security vulnerabilities or compatibility issues that may have emerged since abandonment in 2024
Package facts
| License | MIT (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — requests, six |
| Maintenance | abandoned — 2,958 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 1,990,190/month — #3,382 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: python_consul-1.1.0-py2.py3-none-any.whl
Tags
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
psutilpsutil retrieves real-time information about…
permissive · top 1,000 on PyPI
pyOpenSSLpyOpenSSL wraps OpenSSL's SSL/TLS functionality…
permissive · top 1,000 on PyPI
uvloopuvloop is a drop-in replacement for Python's…
permissive · top 1,000 on PyPI
execnetexecnet lets you spawn and communicate with…
permissive · top 1,000 on PyPI
pyzmqPyZMQ provides Python bindings for ZeroMQ…
permissive · top 1,000 on PyPI
consulateConsulate is a Python client library for…
permissive · top 15,000 on PyPI
py-consulPython client library for HashiCorp Consul that…
permissive · top 5,000 on PyPI
python-etcdA Python client library for etcd, a distributed…
permissive · top 15,000 on PyPI
google-cloud-datacatalogA Python client library for Google Cloud Data…
permissive · top 1,000 on PyPI
patroniPatroni orchestrates PostgreSQL…
permissive · top 15,000 on PyPI
google-cloud-os-configPython client library for Google Cloud OS…
permissive · top 5,000 on PyPI
msldapmsldap is a Python library for querying and…
permissive · top 15,000 on PyPI