async-etcd3gw
An async etcd3 grpc-gateway v3 API Python client, derived from etcd3gw.
![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)
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)
await client.put(key="foo", value="bar")
print("get key foo", await client.get(key="foo"))
print("get all keys", await client.get_all())
lease = await client.lease(ttl=100)
await client.put(key="foo", value="bar", lease=lease)
print("get lease keys", await lease.keys())
await lease.refresh()
await client.close()
if __name__ == "__main__":
asyncio.run(main())
Links