async-etcd3gw


Nameasync-etcd3gw JSON
Version 0.8 PyPI version JSON
download
home_pagehttps://github.com/DLBD-Department/async_etcd3gw
SummaryAn async Python client for etcd3 grpc-gateway v3 API
upload_time2023-05-19 09:40:11
maintainer
docs_urlNone
authorAlkemy spa
requires_python>=3.9
licenseApache License 2.0
keywords etcd asyncio aiohttp
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # async-etcd3gw
An async etcd3 grpc-gateway v3 API Python client, derived from [etcd3gw](https://opendev.org/openstack/etcd3gw).

[![Build Status](https://github.com//DLBD-Department/async_etcd3gw/workflows/Tests/badge.svg)](https://github.com//DLBD-Department/async_etcd3gw/actions)
[![PyPI version](https://badge.fury.io/py/async-etcd3gw.svg)](https://badge.fury.io/py/async-etcd3gw)
[![PyPI](https://img.shields.io/pypi/pyversions/async-etcd3gw.svg)](https://pypi.org/project/async-etcd3gw)
[![License: Apache 2](https://img.shields.io/pypi/l/async-etcd3gw)](https://www.apache.org/licenses/LICENSE-2.0.html)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

### Library Installation

```
$ pip install async-etcd3gw
```

### Usage

You can find examples in examples folder.

Basic usage example:

```python
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](https://etcd.io)
* [etcd gRPC API](https://etcd.io/docs/v3.5/learning/api/)
* [etcd3gw, An etcd3 grpc-gateway v3 API Python client](https://opendev.org/openstack/etcd3gw)
* [etcd gRPC gateway](https://etcd.io/docs/v3.5/dev-guide/api_grpc_gateway/)
* [AIOHTTP, Asynchronous HTTP Client/Server for asyncio and Python.](https://docs.aiohttp.org/en/stable/)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/DLBD-Department/async_etcd3gw",
    "name": "async-etcd3gw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "",
    "keywords": "etcd,asyncio,aiohttp",
    "author": "Alkemy spa",
    "author_email": "DLBDDepartment@alkemy.com",
    "download_url": "https://files.pythonhosted.org/packages/b7/53/9cc7500be8deba52991cc28513bc4060f6f49415cb1c5b4d10d0f03a4e87/async_etcd3gw-0.8.tar.gz",
    "platform": "any",
    "description": "# async-etcd3gw\nAn async etcd3 grpc-gateway v3 API Python client, derived from [etcd3gw](https://opendev.org/openstack/etcd3gw).\n\n[![Build Status](https://github.com//DLBD-Department/async_etcd3gw/workflows/Tests/badge.svg)](https://github.com//DLBD-Department/async_etcd3gw/actions)\n[![PyPI version](https://badge.fury.io/py/async-etcd3gw.svg)](https://badge.fury.io/py/async-etcd3gw)\n[![PyPI](https://img.shields.io/pypi/pyversions/async-etcd3gw.svg)](https://pypi.org/project/async-etcd3gw)\n[![License: Apache 2](https://img.shields.io/pypi/l/async-etcd3gw)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n### Library Installation\n\n```\n$ pip install async-etcd3gw\n```\n\n### Usage\n\nYou can find examples in examples folder.\n\nBasic usage example:\n\n```python\nimport asyncio\nfrom async_etcd3gw import AsyncEtcd3Client\n\nasync def main():\n    client = AsyncEtcd3Client(host=\"etcd\", port=2379)\n\n    # Put key\n    await client.put(key=\"foo\", value=\"bar\")\n\n    # Get key\n    print(\"get key foo\", await client.get(key=\"foo\"))\n\n    # Get all keys\n    print(\"get all keys\", await client.get_all())\n\n    # Create lease and use it\n    lease = await client.lease(ttl=100)\n    await client.put(key=\"foo\", value=\"bar\", lease=lease)\n\n    # Get lease keys\n    print(\"get lease keys\", await lease.keys())\n\n    # Refresh lease\n    await lease.refresh()\n\n    # Release all acquired resources\n    await client.close()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n### Links\n\n* [etcd](https://etcd.io)\n* [etcd gRPC API](https://etcd.io/docs/v3.5/learning/api/)\n* [etcd3gw, An etcd3 grpc-gateway v3 API Python client](https://opendev.org/openstack/etcd3gw)\n* [etcd gRPC gateway](https://etcd.io/docs/v3.5/dev-guide/api_grpc_gateway/)\n* [AIOHTTP, Asynchronous HTTP Client/Server for asyncio and Python.](https://docs.aiohttp.org/en/stable/)\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "An async Python client for etcd3 grpc-gateway v3 API",
    "version": "0.8",
    "project_urls": {
        "Bug Tracker": "https://github.com/DLBD-Department/async_etcd3gw/issues",
        "Homepage": "https://github.com/DLBD-Department/async_etcd3gw",
        "Source Code": "https://github.com/DLBD-Department/async_etcd3gw"
    },
    "split_keywords": [
        "etcd",
        "asyncio",
        "aiohttp"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f1766b0e27d337c7d934a76bd8ab1f4afb9366518917f0bce1e47b157425c36d",
                "md5": "649b32d4298ea6925850b39f20a0d550",
                "sha256": "86e6ceb34a5619f8f1ae7699f78bfb21ccc37dd75dee34b1bd99cb74fa2beb3a"
            },
            "downloads": -1,
            "filename": "async_etcd3gw-0.8-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "649b32d4298ea6925850b39f20a0d550",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.9",
            "size": 19136,
            "upload_time": "2023-05-19T09:40:09",
            "upload_time_iso_8601": "2023-05-19T09:40:09.465787Z",
            "url": "https://files.pythonhosted.org/packages/f1/76/6b0e27d337c7d934a76bd8ab1f4afb9366518917f0bce1e47b157425c36d/async_etcd3gw-0.8-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7539cc7500be8deba52991cc28513bc4060f6f49415cb1c5b4d10d0f03a4e87",
                "md5": "64bfc34d3d679bf4a056455c7eb0941b",
                "sha256": "fd91ada153a5bd81b3d389eab6562a4f3da4b94a7aefe371721d529c638d9179"
            },
            "downloads": -1,
            "filename": "async_etcd3gw-0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "64bfc34d3d679bf4a056455c7eb0941b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 17680,
            "upload_time": "2023-05-19T09:40:11",
            "upload_time_iso_8601": "2023-05-19T09:40:11.120159Z",
            "url": "https://files.pythonhosted.org/packages/b7/53/9cc7500be8deba52991cc28513bc4060f6f49415cb1c5b4d10d0f03a4e87/async_etcd3gw-0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-19 09:40:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "DLBD-Department",
    "github_project": "async_etcd3gw",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "async-etcd3gw"
}
        
Elapsed time: 0.06461s