An async Python client for etcd3 grpc-gateway v3 API
Project description
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()
if __name__ == "__main__":
asyncio.run(main())
Links
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async_etcd3gw-0.5.tar.gz
(17.3 kB
view details)
Built Distribution
File details
Details for the file async_etcd3gw-0.5.tar.gz
.
File metadata
- Download URL: async_etcd3gw-0.5.tar.gz
- Upload date:
- Size: 17.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.9.6 requests/2.29.0 setuptools/67.7.2 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7520ba3637cd8616d7d51055f3937f0e6d53a9bc6fad4768d0a935b4c8746610 |
|
MD5 | 8bb427c41d94f0c9a7c77dcc8f64e41c |
|
BLAKE2b-256 | 8a010cef7ae6be55d3e4c1ba8054ccce46c787058e711275717b769d73eeaec2 |
File details
Details for the file async_etcd3gw-0.5-py2.py3-none-any.whl
.
File metadata
- Download URL: async_etcd3gw-0.5-py2.py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.9.6 requests/2.29.0 setuptools/67.7.2 requests-toolbelt/1.0.0 tqdm/4.65.0 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68b589e0db9466fff988412c450f63d1a8eca4afc9b12874143f04199f36c5cf |
|
MD5 | 840724ee18db77b401959a3f9012ce28 |
|
BLAKE2b-256 | 003977d40483d71f6e3886da9d2a8125b2bc4303ed7b539f84b37c62a11c1818 |