A Python client library for etcd. This library specifically targets and supports the etcd v2 API. The last release (0.4.5) was in March 2017, and it is no longer actively maintained. It has no stated release cadence.
pip install python-etcdVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize the etcd client, write a key-value pair, read it back, set a TTL, and delete a key. It assumes an etcd v2 server is running and accessible at the specified host and port. Remember this client is ONLY compatible with etcd v2.
For etcd v3+ clusters, use a dedicated etcd v3 client library like `python-etcd3` (or `etcd3-py` for more active maintenance) instead of `python-etcd`.
If working with etcd v2 is unavoidable, use with older Python environments (e.g., Python 3.3-3.7). For new projects, migrate to etcd v3 and use an appropriate client like `python-etcd3` or `etcd3-py`.
If you need locking/election with this client, you must use version <0.4.1 (e.g., 0.3.x). However, given the overall deprecation of etcd v2 and this library, it is strongly recommended to migrate to etcd v3 and use its built-in concurrency primitives or a dedicated library for v3.