Last updated:
0 purchases
asyncetcd3gw 0.8
async-etcd3gw
An async etcd3 grpc-gateway v3 API Python client, derived from etcd3gw.
Library Installation
$ pip install async-etcd3gw
Usage
You can find examples in examples folder.
Basic usage example:
import asyncio
from async_etcd3gw import AsyncEtcd3Client
async def main():
client = AsyncEtcd3Client(host="etcd", port=2379)
# Put key
await client.put(key="foo", value="bar")
# Get key
print("get key foo", await client.get(key="foo"))
# Get all keys
print("get all keys", await client.get_all())
# Create lease and use it
lease = await client.lease(ttl=100)
await client.put(key="foo", value="bar", lease=lease)
# Get lease keys
print("get lease keys", await lease.keys())
# Refresh lease
await lease.refresh()
# Release all acquired resources
await client.close()
if __name__ == "__main__":
asyncio.run(main())
Links
etcd
etcd gRPC API
etcd3gw, An etcd3 grpc-gateway v3 API Python client
etcd gRPC gateway
AIOHTTP, Asynchronous HTTP Client/Server for asyncio and Python.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.