--- id: py-consul version: "1.7.1" license: MIT license_treatment: permissive maintenance: active --- # py-consul — Python client for Consul (http://www.consul.io/) License: permissive · Maintenance: active · Downloads: 1.2M/mo ## What it is and what it does py-consul is a Python client for HashiCorp Consul, a distributed service mesh and configuration management system. It wraps Consul's HTTP API to let you interact with Consul's key-value store, service registration and discovery, health checks, and access control lists (ACLs) from Python code. The library supports both synchronous and asynchronous patterns and is maintained by Criteo as an active fork of the original python-consul project, which has been unmaintained since 2018. The package is designed for developers building applications that need to integrate with Consul for service discovery, distributed configuration, or health monitoring. It handles the HTTP communication with a Consul agent and provides a clean Python interface to common operations like storing and retrieving configuration values, registering services, querying service health, and managing ACL policies and tokens. Use it for: - Store and retrieve application configuration from Consul's key-value store with watch-based polling for updates. - Register microservices in Consul's service catalog and query for healthy instances of dependent services. - Manage ACL tokens and policies programmatically for fine-grained access control in a Consul cluster. - Monitor service health by querying Consul's health check endpoints and reacting to state changes. - Implement service-to-service authentication and authorization using Consul Connect policies. - Build configuration management tools that synchronize settings across distributed systems via Consul. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Python client library for HashiCorp Consul that provides programmatic access to Consul's key-value store, service catalog, health checks, and ACL management through a synchronous and asynchronous API. Yes. py-consul is actively maintained, has no known vulnerabilities, installs with minimal friction, and is the primary maintained Python client for Consul. Install it if you need to integrate Consul into a Python application for service discovery, configuration management, or health monitoring. The MIT license poses no restrictions. ## Install pip install py-consul uv add py-consul poetry add py-consul ## Installing py-consul Before you install: Low friction installation with a single runtime dependency (requests). Actively maintained by Criteo with recent releases; supports Python 3.10 through 3.14. Last commit was 2026-07-06. License in practice: MIT license (permissive) allows use in both open-source and commercial projects with minimal restrictions. Quickstart: pip install py-consul import consul c = consul.Consul() index, data = c.kv.get('foo') print(data['Value']) Requires Python 3.10 or later. When using behind a proxy server, http_proxy, https_proxy, and no_proxy environment variables may need to be set. Verify before relying: - Whether all Consul 1.20–1.22 endpoints are fully implemented or if some remain partially handled as the description suggests. - Async API capabilities and whether they are production-ready or still experimental. - Performance characteristics and connection pooling behavior with requests. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 1.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags consul python client, consul key-value store api, service discovery python, consul health checks, distributed configuration management, consul acl management, consul agent client, service-discovery, consul-client, distributed-systems [View on SkillFed](https://skillfed.io/packages/py-consul) · [View on PyPI](https://pypi.org/project/py-consul/)