{"id":13461717,"url":"https://github.com/kragniz/python-etcd3","last_synced_at":"2025-05-14T06:13:56.119Z","repository":{"id":37602875,"uuid":"69691394","full_name":"kragniz/python-etcd3","owner":"kragniz","description":"Python client for the etcd API v3","archived":false,"fork":false,"pushed_at":"2024-12-09T08:00:19.000Z","size":895,"stargazers_count":439,"open_issues_count":199,"forks_count":186,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-13T22:18:44.353Z","etag":null,"topics":["etcd"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kragniz.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-30T18:26:16.000Z","updated_at":"2025-04-08T16:53:47.000Z","dependencies_parsed_at":"2025-04-13T21:23:09.736Z","dependency_job_id":"4a806281-8cf1-47a0-9de8-0df9c23bb7d3","html_url":"https://github.com/kragniz/python-etcd3","commit_stats":{"total_commits":514,"total_committers":47,"mean_commits":"10.936170212765957","dds":0.5291828793774319,"last_synced_commit":"e58a899579ba416449c4e225b61f039457c8072a"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kragniz%2Fpython-etcd3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kragniz%2Fpython-etcd3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kragniz%2Fpython-etcd3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kragniz%2Fpython-etcd3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kragniz","download_url":"https://codeload.github.com/kragniz/python-etcd3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254083780,"owners_count":22011902,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["etcd"],"created_at":"2024-07-31T11:00:54.192Z","updated_at":"2025-05-14T06:13:56.073Z","avatar_url":"https://github.com/kragniz.png","language":"Python","readme":"============\npython-etcd3\n============\n\n\n.. image:: https://img.shields.io/pypi/v/etcd3.svg\n        :target: https://pypi.python.org/pypi/etcd3\n\n.. image:: https://img.shields.io/travis/kragniz/python-etcd3.svg\n        :target: https://travis-ci.org/kragniz/python-etcd3\n\n.. image:: https://readthedocs.org/projects/python-etcd3/badge/?version=latest\n        :target: https://python-etcd3.readthedocs.io/en/latest/?badge=latest\n        :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/kragniz/python-etcd3/shield.svg\n     :target: https://pyup.io/repos/github/kragniz/python-etcd3/\n     :alt: Updates\n\n.. image:: https://codecov.io/github/kragniz/python-etcd3/coverage.svg?branch=master\n        :target: https://codecov.io/github/kragniz/python-etcd3?branch=master\n\n\nPython client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.\n\n**Warning: the API is mostly stable, but may change in the future**\n\nIf you're interested in using this library, please get involved.\n\n* Free software: Apache Software License 2.0\n* Documentation: https://python-etcd3.readthedocs.io.\n\nBasic usage:\n\n.. code-block:: python\n\n    import etcd3\n\n    etcd = etcd3.client()\n\n    etcd.get('foo')\n    etcd.put('bar', 'doot')\n    etcd.delete('bar')\n\n    # locks\n    lock = etcd.lock('thing')\n    lock.acquire()\n    # do something\n    lock.release()\n\n    with etcd.lock('doot-machine') as lock:\n        # do something\n\n    # transactions\n    etcd.transaction(\n        compare=[\n            etcd.transactions.value('/doot/testing') == 'doot',\n            etcd.transactions.version('/doot/testing') \u003e 0,\n        ],\n        success=[\n            etcd.transactions.put('/doot/testing', 'success'),\n        ],\n        failure=[\n            etcd.transactions.put('/doot/testing', 'failure'),\n        ]\n    )\n\n    # watch key\n    watch_count = 0\n    events_iterator, cancel = etcd.watch(\"/doot/watch\")\n    for event in events_iterator:\n        print(event)\n        watch_count += 1\n        if watch_count \u003e 10:\n            cancel()\n\n    # watch prefix\n    watch_count = 0\n    events_iterator, cancel = etcd.watch_prefix(\"/doot/watch/prefix/\")\n    for event in events_iterator:\n        print(event)\n        watch_count += 1\n        if watch_count \u003e 10:\n            cancel()\n\n    # recieve watch events via callback function\n    def watch_callback(event):\n        print(event)\n\n    watch_id = etcd.add_watch_callback(\"/anotherkey\", watch_callback)\n\n    # cancel watch\n    etcd.cancel_watch(watch_id)\n\n    # recieve watch events for a prefix via callback function\n    def watch_callback(event):\n        print(event)\n\n    watch_id = etcd.add_watch_prefix_callback(\"/doot/watch/prefix/\", watch_callback)\n\n    # cancel watch\n    etcd.cancel_watch(watch_id)\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkragniz%2Fpython-etcd3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkragniz%2Fpython-etcd3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkragniz%2Fpython-etcd3/lists"}