All Projects → kragniz → Python Etcd3

kragniz / Python Etcd3

Licence: apache-2.0
Python client for the etcd API v3

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Python Etcd3

kube-toolkit
Toolkit for creating gRPC-based CLI and web tools for Kubernetes
Stars: ✭ 74 (-74.48%)
Mutual labels:  etcd
logCollect
日志收集解决方案,动态管理、轻量级日志收集客户端
Stars: ✭ 24 (-91.72%)
Mutual labels:  etcd
Jupiter
Jupiter是斗鱼开源的面向服务治理的Golang微服务框架
Stars: ✭ 3,455 (+1091.38%)
Mutual labels:  etcd
kubedr
An open source, disaster-recovery, Kubernetes project that backs up, and restores, etcd cluster data.
Stars: ✭ 61 (-78.97%)
Mutual labels:  etcd
seagull
Configuration server submodule for all SeaSerives
Stars: ✭ 19 (-93.45%)
Mutual labels:  etcd
pink
分布式任务调度平台
Stars: ✭ 61 (-78.97%)
Mutual labels:  etcd
etcd-grpc
A gRPC based etcd client for NodeJS targeting etcd V3.
Stars: ✭ 23 (-92.07%)
Mutual labels:  etcd
Kubernetes Under The Hood
This tutorial is someone planning to install a Kubernetes cluster and wants to understand how everything fits together.
Stars: ✭ 279 (-3.79%)
Mutual labels:  etcd
golearn
🔥 Golang basics and actual-combat (including: crawler, distributed-systems, data-analysis, redis, etcd, raft, crontab-task)
Stars: ✭ 36 (-87.59%)
Mutual labels:  etcd
Burry.sh
Cloud Native Infrastructure BackUp & RecoveRY
Stars: ✭ 260 (-10.34%)
Mutual labels:  etcd
go interview
Interview Questions & Answers For Experienced Go Developers | 互联网 GO 工程师面经交流,学习
Stars: ✭ 522 (+80%)
Mutual labels:  etcd
etcdv3-browser
etcd v3 browser - web UI client for browsing (and optionally, editing) etcd3 contents
Stars: ✭ 20 (-93.1%)
Mutual labels:  etcd
laracom
laracom driven by go micro services
Stars: ✭ 37 (-87.24%)
Mutual labels:  etcd
etcdv3-ruby
Etcd v3 Ruby Client
Stars: ✭ 48 (-83.45%)
Mutual labels:  etcd
Manba
HTTP API Gateway
Stars: ✭ 3,000 (+934.48%)
Mutual labels:  etcd
terranetes
Terraform boilerplate for production-grade Kubernetes clusters on AWS (optionally includes kube-system components, OpenVPN, an ingress controller, monitoring services...)
Stars: ✭ 15 (-94.83%)
Mutual labels:  etcd
samsahai
Dependencies verification system with Kubernetes Operator
Stars: ✭ 66 (-77.24%)
Mutual labels:  etcd
Nestcloud
A NodeJS micro-service solution, writing by Typescript language and NestJS framework.
Stars: ✭ 290 (+0%)
Mutual labels:  etcd
Kotlin Cn
【已下线】https://discuss.kotliner.cn 的第一个实验版本,尝试使用Kotlin编写构建的 Kotlin China 论坛,etcd+自研tpc协议RPC
Stars: ✭ 276 (-4.83%)
Mutual labels:  etcd
resilient-transport-service
Resilient demo application - Transport Service
Stars: ✭ 37 (-87.24%)
Mutual labels:  etcd

============ python-etcd3

.. image:: https://img.shields.io/pypi/v/etcd3.svg :target: https://pypi.python.org/pypi/etcd3

.. image:: https://img.shields.io/travis/kragniz/python-etcd3.svg :target: https://travis-ci.org/kragniz/python-etcd3

.. image:: https://readthedocs.org/projects/python-etcd3/badge/?version=latest :target: https://python-etcd3.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://pyup.io/repos/github/kragniz/python-etcd3/shield.svg :target: https://pyup.io/repos/github/kragniz/python-etcd3/ :alt: Updates

.. image:: https://codecov.io/github/kragniz/python-etcd3/coverage.svg?branch=master :target: https://codecov.io/github/kragniz/python-etcd3?branch=master

Python client for the etcd API v3, supported under python 2.7, 3.4 and 3.5.

Warning: the API is mostly stable, but may change in the future

If you're interested in using this library, please get involved.

Basic usage:

.. code-block:: python

import etcd3

etcd = etcd3.client()

etcd.get('foo')
etcd.put('bar', 'doot')
etcd.delete('bar')

# locks
lock = etcd.lock('thing')
lock.acquire()
# do something
lock.release()

with etcd.lock('doot-machine') as lock:
    # do something

# transactions
etcd.transaction(
    compare=[
        etcd.transactions.value('/doot/testing') == 'doot',
        etcd.transactions.version('/doot/testing') > 0,
    ],
    success=[
        etcd.transactions.put('/doot/testing', 'success'),
    ],
    failure=[
        etcd.transactions.put('/doot/testing', 'failure'),
    ]
)

# watch key
watch_count = 0
events_iterator, cancel = etcd.watch("/doot/watch")
for event in events_iterator:
    print(event)
    watch_count += 1
    if watch_count > 10:
        cancel()

# watch prefix
watch_count = 0
events_iterator, cancel = etcd.watch_prefix("/doot/watch/prefix/")
for event in events_iterator:
    print(event)
    watch_count += 1
    if watch_count > 10:
        cancel()

# recieve watch events via callback function
def watch_callback(event):
    print(event)

watch_id = etcd.add_watch_callback("/anotherkey", watch_callback)

# cancel watch
etcd.cancel_watch(watch_id)

# recieve watch events for a prefix via callback function
def watch_callback(event):
    print(event)

watch_id = etcd.add_watch_prefix_callback("/doot/watch/prefix/", watch_callback)

# cancel watch
etcd.cancel_watch(watch_id)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].