Compare commits

..

No commits in common. "wip" and "master" have entirely different histories.

4 changed files with 17 additions and 11 deletions

View file

@ -6,7 +6,7 @@ verify_ssl = true
[dev-packages]
[packages]
python-etcd3 = {editable = true,git = "https://github.com/kragniz/python-etcd3.git"}
etcd3 = "*"
[requires]
python_version = "3.5"

14
Pipfile.lock generated
View file

@ -1,7 +1,7 @@
{
"_meta": {
"hash": {
"sha256": "96b0d4c9f6534a0c2a5f28c91f4bb78eb0cc549c5874c05eea7902abc1c60f6e"
"sha256": "14cc97a4eba6bb9f5cb1267b0c4ab89b5af44b952c090232e54c1cbd84d094bc"
},
"pipfile-spec": 6,
"requires": {
@ -16,6 +16,13 @@
]
},
"default": {
"etcd3": {
"hashes": [
"sha256:25a524b9f032c6631ff0097532907dea81243eaa63c3744510fd1598cc4e0e87"
],
"index": "pypi",
"version": "==0.10.0"
},
"grpcio": {
"hashes": [
"sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693",
@ -74,11 +81,6 @@
],
"version": "==3.9.1"
},
"python-etcd3": {
"editable": true,
"git": "https://github.com/kragniz/python-etcd3.git",
"ref": "cdc4c48bde88a795230a02aa574df84ed9ccfa52"
},
"six": {
"hashes": [
"sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",

View file

@ -3,13 +3,15 @@ import json
import queue
import copy
import etcd3.utils as utils
from collections import namedtuple
PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"])
class EtcdEntry:
# key: str
# value: str
def __init__(self, meta, value, value_in_json=False):
self.key = meta.key.decode("utf-8")
self.value = value.decode("utf-8")
@ -22,7 +24,7 @@ class Etcd3Wrapper:
def __init__(self, *args, **kwargs):
self.client = etcd3.client(*args, **kwargs)
def get(self, *args, value_in_json=False, **kwargs):
def get(self, *args, value_in_json=False, **kwargs):
_value, _key = self.client.get(*args, **kwargs)
if _key is None or _value is None:
return None

View file

@ -5,7 +5,7 @@ with open('README.md') as fh:
setuptools.setup(
name='etcd3_wrapper',
version='0.5.5',
version='0.5.2',
description='A wrapper around etcd3 package',
long_description=long_description,
long_description_content_type='text/markdown',
@ -13,7 +13,9 @@ setuptools.setup(
author='ungleich',
author_email='hacking@ungleich.ch',
packages=setuptools.find_packages(),
install_requires=['etcd3'],
install_requires=[
'etcd3',
],
classifiers=[
'Programming Language :: Python :: 3',
],