loongson/pypi/: etcd3-0.8.1 metadata and description

Homepage Simple index

Python client for the etcd3 API

author Louis Taylor
author_email louis@kragniz.eu
classifiers
  • Development Status :: 2 - Pre-Alpha
  • Intended Audience :: Developers
  • License :: OSI Approved :: Apache Software License
  • Natural Language :: English
  • Programming Language :: Python :: 2
  • Programming Language :: Python :: 2.7
  • Programming Language :: Python :: 3
  • Programming Language :: Python :: 3.4
  • Programming Language :: Python :: 3.5
  • Programming Language :: Python :: 3.6
keywords etcd3
license Apache Software License 2.0
platform
  • UNKNOWN
requires_dist
  • grpcio (>=1.2.0)
  • tenacity (>=4.10.0)
  • protobuf (>=3.5.2.post1)

Because this project isn't in the mirror_whitelist, no releases from root/pypi are included.

File Tox results History
etcd3-0.8.1-py2.py3-none-any.whl
Size
42 KB
Type
Python Wheel
Python
2.7
etcd3-0.8.1.tar.gz
Size
59 KB
Type
Source

python-etcd3

https://img.shields.io/pypi/v/etcd3.svg https://img.shields.io/travis/kragniz/python-etcd3.svg Documentation Status Updates https://codecov.io/github/kragniz/python-etcd3/coverage.svg?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:

import etcd3

etcd = etcd3.client()

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

# locks
lock = etcd.lock('thing')
# 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)

History

0.1.0 (2016-09-30)

  • First release on PyPI.