Registry / database / etcd3gw

etcd3gw

JSON →
library2.7.0pypypi✓ verified 89d ago

A Python client for the etcd v3 API via the etcd grpc-gateway. Version 2.6.0, requires Python >=3.10. Release cadence is irregular.

pip install etcd3gw
INSTALL
IMPORT
SIG · ETCD3GW
E
etcd3gw
databasepythonv2.7.0
Install
3.0s avg
Import
874ms
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v2.7.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.912s · 23.4MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 3.0s · import 0.836s · 24MB
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Etcd3Client
✓ from etcd3gw.client import Etcd3Client
✗ from etcd3gw import Etcd3Client
Etcd3Client is not exposed at package level in 2.x. Must import from submodule.
Etcd3Client
✓ from etcd3gw import Etcd3Client
In version 1.x, direct import worked. Version 2.x changed location.

Create a client, write a key, read it back.

from etcd3gw.client import Etcd3Client client = Etcd3Client(host='localhost', port=2379) client.put('/key', 'value') value, metadata = client.get('/key') print(value)
Debug
Known issues
breakingIn version 2.0, the import path changed from `etcd3gw` to `etcd3gw.client`. Code using `from etcd3gw import Etcd3Client` will break.
fix
Change imports to `from etcd3gw.client import Etcd3Client`.
affects: >=2.0.0
breakingThe `get()` method now returns a tuple `(value, metadata)` instead of just `value`. In v1, `client.get(key)` returned the value as a string. In v2, it returns `(value, metadata)`.
fix
Unpack the result: `value, metadata = client.get(key)`.
affects: >=2.0.0
deprecatedSupport for etcd v3.3 and earlier removed; requires etcd with v3 API and gateway endpoint.
fix
Ensure your etcd cluster exposes the grpc-gateway (port 2379 by default).
affects: >=2.0.0
gotchaClient initialization does not validate connectivity; exceptions only occur on first actual operation.
fix
Call a simple operation like `client.get('/health')` to verify connection.
affects: all
gotchaTimezone not handled in lease TTL; all times treated as UTC.
fix
Ensure your application works with UTC for lease TTL values.
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'etcd3gw'
Library not installed or installed in wrong environment.
fix
Run `pip install etcd3gw` in the correct Python environment.
ImportError: cannot import name 'Etcd3Client' from 'etcd3gw'
Using wrong import path for version 2.x.
fix
Use `from etcd3gw.client import Etcd3Client`.
TypeError: cannot unpack non-iterable str object
Calling `client.get(key)` and trying to unpack the result, but the library version returns a string (v1) instead of tuple (v2).
fix
Update to v2 and unpack: `value, metadata = client.get(key)`. If stuck on v1, do not unpack.
ConnectionError: HTTPConnectionPool ... Failed to establish a new connection
etcd gateway not running or unreachable at given host:port.
fix
Verify etcd is running and the gateway endpoint (usually port 2379) is accessible. Check host/port arguments.
Upgrade
Version history
2.7.0latest on PyPI · released Jun 9, 2026
Audit
Dependencies
requestsrequiredHTTP client for API calls
urllib3requiredUnderlying HTTP library
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
etcd3gw — pip install etcd3gw · libregistry