Compare commits
7 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 76fb0bdf79 | |||
| 24c53ba969 | |||
| b1893fc286 | |||
| 500141722c | |||
| d3515485c3 | |||
| 92483821a7 | |||
| 18400e61c2 |
4 changed files with 11 additions and 17 deletions
2
Pipfile
2
Pipfile
|
|
@ -6,7 +6,7 @@ verify_ssl = true
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
etcd3 = "*"
|
python-etcd3 = {editable = true,git = "https://github.com/kragniz/python-etcd3.git"}
|
||||||
|
|
||||||
[requires]
|
[requires]
|
||||||
python_version = "3.5"
|
python_version = "3.5"
|
||||||
|
|
|
||||||
14
Pipfile.lock
generated
14
Pipfile.lock
generated
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"_meta": {
|
"_meta": {
|
||||||
"hash": {
|
"hash": {
|
||||||
"sha256": "14cc97a4eba6bb9f5cb1267b0c4ab89b5af44b952c090232e54c1cbd84d094bc"
|
"sha256": "96b0d4c9f6534a0c2a5f28c91f4bb78eb0cc549c5874c05eea7902abc1c60f6e"
|
||||||
},
|
},
|
||||||
"pipfile-spec": 6,
|
"pipfile-spec": 6,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -16,13 +16,6 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"default": {
|
"default": {
|
||||||
"etcd3": {
|
|
||||||
"hashes": [
|
|
||||||
"sha256:25a524b9f032c6631ff0097532907dea81243eaa63c3744510fd1598cc4e0e87"
|
|
||||||
],
|
|
||||||
"index": "pypi",
|
|
||||||
"version": "==0.10.0"
|
|
||||||
},
|
|
||||||
"grpcio": {
|
"grpcio": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693",
|
"sha256:1303578092f1f6e4bfbc354c04ac422856c393723d3ffa032fff0f7cb5cfd693",
|
||||||
|
|
@ -81,6 +74,11 @@
|
||||||
],
|
],
|
||||||
"version": "==3.9.1"
|
"version": "==3.9.1"
|
||||||
},
|
},
|
||||||
|
"python-etcd3": {
|
||||||
|
"editable": true,
|
||||||
|
"git": "https://github.com/kragniz/python-etcd3.git",
|
||||||
|
"ref": "cdc4c48bde88a795230a02aa574df84ed9ccfa52"
|
||||||
|
},
|
||||||
"six": {
|
"six": {
|
||||||
"hashes": [
|
"hashes": [
|
||||||
"sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",
|
"sha256:3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c",
|
||||||
|
|
|
||||||
|
|
@ -3,15 +3,13 @@ import json
|
||||||
import queue
|
import queue
|
||||||
import copy
|
import copy
|
||||||
|
|
||||||
|
import etcd3.utils as utils
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"])
|
PseudoEtcdMeta = namedtuple("PseudoEtcdMeta", ["key"])
|
||||||
|
|
||||||
|
|
||||||
class EtcdEntry:
|
class EtcdEntry:
|
||||||
# key: str
|
|
||||||
# value: str
|
|
||||||
|
|
||||||
def __init__(self, meta, value, value_in_json=False):
|
def __init__(self, meta, value, value_in_json=False):
|
||||||
self.key = meta.key.decode("utf-8")
|
self.key = meta.key.decode("utf-8")
|
||||||
self.value = value.decode("utf-8")
|
self.value = value.decode("utf-8")
|
||||||
|
|
@ -24,7 +22,7 @@ class Etcd3Wrapper:
|
||||||
def __init__(self, *args, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.client = etcd3.client(*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)
|
_value, _key = self.client.get(*args, **kwargs)
|
||||||
if _key is None or _value is None:
|
if _key is None or _value is None:
|
||||||
return None
|
return None
|
||||||
|
|
|
||||||
6
setup.py
6
setup.py
|
|
@ -5,7 +5,7 @@ with open('README.md') as fh:
|
||||||
|
|
||||||
setuptools.setup(
|
setuptools.setup(
|
||||||
name='etcd3_wrapper',
|
name='etcd3_wrapper',
|
||||||
version='0.5.2',
|
version='0.5.5',
|
||||||
description='A wrapper around etcd3 package',
|
description='A wrapper around etcd3 package',
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
long_description_content_type='text/markdown',
|
long_description_content_type='text/markdown',
|
||||||
|
|
@ -13,9 +13,7 @@ setuptools.setup(
|
||||||
author='ungleich',
|
author='ungleich',
|
||||||
author_email='hacking@ungleich.ch',
|
author_email='hacking@ungleich.ch',
|
||||||
packages=setuptools.find_packages(),
|
packages=setuptools.find_packages(),
|
||||||
install_requires=[
|
install_requires=['etcd3'],
|
||||||
'etcd3',
|
|
||||||
],
|
|
||||||
classifiers=[
|
classifiers=[
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue