python-sdk-remote 0.0.140__tar.gz → 0.0.142__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of python-sdk-remote might be problematic. Click here for more details.
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/PKG-INFO +1 -1
- python_sdk_remote-0.0.142/python_sdk_remote/src/is_test_data.py +4 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/our_object.py +14 -9
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/PKG-INFO +1 -1
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/SOURCES.txt +1 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/setup.py +1 -1
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/README.md +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/pyproject.toml +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/__init__.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/constants.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/http_response.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/item.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/mini_logger.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/unified_json.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/utilities.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/valid_json_versions.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/validate_environment.py +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/requires.txt +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/top_level.txt +0 -0
- {python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/setup.cfg +0 -0
|
@@ -8,7 +8,6 @@ from .mini_logger import MiniLogger as logger
|
|
|
8
8
|
class OurObject(ABC):
|
|
9
9
|
|
|
10
10
|
entity_name = None
|
|
11
|
-
# TODO Shall we remame it to id_value or get_id()?
|
|
12
11
|
id = None
|
|
13
12
|
|
|
14
13
|
# Needed by print_our_object_with_id()
|
|
@@ -24,8 +23,8 @@ class OurObject(ABC):
|
|
|
24
23
|
def __init__(self, entity_name: str = None, id: int = None, **kwargs):
|
|
25
24
|
INIT_METHOD_NAME = '__init__'
|
|
26
25
|
logger.start(INIT_METHOD_NAME, object={'kwargs': kwargs})
|
|
27
|
-
self.entity_name
|
|
28
|
-
self.
|
|
26
|
+
self.set_entity_name(entity_name)
|
|
27
|
+
self.set_id(id)
|
|
29
28
|
self.kwargs = kwargs
|
|
30
29
|
logger.end(INIT_METHOD_NAME, object={'kwargs': kwargs})
|
|
31
30
|
|
|
@@ -42,25 +41,28 @@ class OurObject(ABC):
|
|
|
42
41
|
else:
|
|
43
42
|
setattr(self, field, None)
|
|
44
43
|
|
|
44
|
+
def set_entity_name(self, entity_name: str) -> None:
|
|
45
|
+
self.entity_name = entity_name
|
|
46
|
+
|
|
45
47
|
def get_id_column_name(self) -> str:
|
|
46
48
|
"""Returns the name of the column that is used as the id of the object"""
|
|
47
49
|
id_column_name = self.entity_name + "_id"
|
|
48
50
|
return id_column_name
|
|
49
51
|
|
|
50
|
-
def
|
|
52
|
+
def set_id(self, id: int) -> None:
|
|
51
53
|
self.id = id
|
|
52
54
|
|
|
53
|
-
def
|
|
55
|
+
def get_id(self) -> int:
|
|
54
56
|
return self.id
|
|
55
57
|
|
|
56
58
|
# Commented so we can use it in database foreach()
|
|
57
59
|
# @abstractmethod
|
|
58
|
-
def get_name(self):
|
|
60
|
+
def get_name(self) -> str:
|
|
59
61
|
"""Returns the name of the object"""
|
|
60
62
|
# raise NotImplementedError(
|
|
61
63
|
# "Subclasses must implement the 'get_name' method.")
|
|
62
64
|
|
|
63
|
-
def get(self, attr_name: str):
|
|
65
|
+
def get(self, attr_name: str) -> None:
|
|
64
66
|
"""Returns the value of the attribute with the given name"""
|
|
65
67
|
GET_METHOD_NAME = 'get'
|
|
66
68
|
logger.start(GET_METHOD_NAME, object={'attr_name': attr_name})
|
|
@@ -75,7 +77,8 @@ class OurObject(ABC):
|
|
|
75
77
|
|
|
76
78
|
def to_json(self) -> str:
|
|
77
79
|
"""Returns a json string representation of this object"""
|
|
78
|
-
|
|
80
|
+
to_json_result = json.dumps(self.__dict__)
|
|
81
|
+
return to_json_result
|
|
79
82
|
|
|
80
83
|
def from_json(self, json_string: str) -> 'OurObject':
|
|
81
84
|
"""Returns an instance of the class from a json string"""
|
|
@@ -101,7 +104,9 @@ class OurObject(ABC):
|
|
|
101
104
|
return self.entity_name + ": " + str(self.__dict__)
|
|
102
105
|
|
|
103
106
|
def __repr__(self):
|
|
104
|
-
|
|
107
|
+
# TODO make sure both of them is not None
|
|
108
|
+
repr_result = self.entity_name + ": " + str(self.__dict__)
|
|
109
|
+
return repr_result
|
|
105
110
|
|
|
106
111
|
def to_dict(self):
|
|
107
112
|
return self.__dict__
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/SOURCES.txt
RENAMED
|
@@ -9,6 +9,7 @@ python_sdk_remote.egg-info/top_level.txt
|
|
|
9
9
|
python_sdk_remote/src/__init__.py
|
|
10
10
|
python_sdk_remote/src/constants.py
|
|
11
11
|
python_sdk_remote/src/http_response.py
|
|
12
|
+
python_sdk_remote/src/is_test_data.py
|
|
12
13
|
python_sdk_remote/src/item.py
|
|
13
14
|
python_sdk_remote/src/mini_logger.py
|
|
14
15
|
python_sdk_remote/src/our_object.py
|
|
@@ -7,7 +7,7 @@ package_dir = PACKAGE_NAME.replace("-", "_")
|
|
|
7
7
|
# python -m build needs pyproject.toml or setup.py
|
|
8
8
|
setuptools.setup(
|
|
9
9
|
name=PACKAGE_NAME,
|
|
10
|
-
version='0.0.
|
|
10
|
+
version='0.0.142', # https://pypi.org/project/python-sdk-remote/
|
|
11
11
|
author="Circles",
|
|
12
12
|
author_email="info@circlez.ai",
|
|
13
13
|
description="PyPI Package for Circles Python SDK Local Python",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/http_response.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/mini_logger.py
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/unified_json.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote/src/valid_json_versions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/requires.txt
RENAMED
|
File without changes
|
{python_sdk_remote-0.0.140 → python_sdk_remote-0.0.142}/python_sdk_remote.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|