skillfed

python-consul

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

python-consul v1.1.0 2.0M downloads/30d#3,382 on PyPI458
Permissive license MIT Abandoned released

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-consul

uv

uv add python-consul

poetry

poetry add python-consul

Installing 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

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.6

Tags

consul python clientservice discovery consulconsul key-value storeconsul health checksconsul service catalogdistributed configuration managementconsul agent api
service-discoveryabandonedconsul-client

More Networking packages