Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

async-etcd3gw

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-etcd3gw

An async Python client for etcd3 grpc-gateway v3 API

  • 0.8
  • PyPI
  • Socket score

Maintainers
3

async-etcd3gw

An async etcd3 grpc-gateway v3 API Python client, derived from etcd3gw.

Build Status PyPI version PyPI License: Apache 2 Code style: black

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())

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc