python-sdk-remote 0.0.140__py3-none-any.whl → 0.0.141__py3-none-any.whl

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.
@@ -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 = entity_name
28
- self.id = id # Shell we user self.set_id_value(id)?
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 set_id_value(self, id: int) -> int:
52
+ def set_id(self, id: int) -> None:
51
53
  self.id = id
52
54
 
53
- def get_id_value(self) -> int:
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})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-sdk-remote
3
- Version: 0.0.140
3
+ Version: 0.0.141
4
4
  Summary: PyPI Package for Circles Python SDK Local Python
5
5
  Home-page: https://github.com/circles-zone/python-sdk-remote-python-package
6
6
  Author: Circles
@@ -3,12 +3,12 @@ python_sdk_remote/constants.py,sha256=0bg3t_4wzZLWFapseENer7qSx3NvniEF5n0H8AZ2G3
3
3
  python_sdk_remote/http_response.py,sha256=8VQXIkt5jpoIKNsFXPONiaxdiXmTDU4iEDzmu1fgvTM,6073
4
4
  python_sdk_remote/item.py,sha256=6DQs1nBKbEmnHjE50vZtkMr14ECS_9b8cvE7ItPAbhE,322
5
5
  python_sdk_remote/mini_logger.py,sha256=E6OUZ39uBkPN_cjemO6hfJcRcYtP1xh1ZwaCFyZYsXA,4132
6
- python_sdk_remote/our_object.py,sha256=z1VcfIk2x4yaa9GEnncg3viIYwORD4uwX1hCmLn5ruA,3570
6
+ python_sdk_remote/our_object.py,sha256=RYjfiFBB9WCB5pCRn0cp3J3_H92cf45QoBdmCHT4urI,3582
7
7
  python_sdk_remote/unified_json.py,sha256=tLkikIVpFAtpioYwtovkGX8-3U9YElGWe4Ph34qDTq4,837
8
8
  python_sdk_remote/utilities.py,sha256=OBI9dUhU11ippo84hxcNmOQAYqSNq4A0uFiK4MGTWfk,15099
9
9
  python_sdk_remote/valid_json_versions.py,sha256=-ZU65JYI6gTEfK8o6gu9Dmm9SQmwzj5pDbEXiyUbBhQ,138
10
10
  python_sdk_remote/validate_environment.py,sha256=nzCHZDw56G56ekrTQT3gG48utjsU4VCwQi9dVsBDas0,2268
11
- python_sdk_remote-0.0.140.dist-info/METADATA,sha256=1b3XrqFoZlQS5A1REsVtKI_BFaQ2xQEAc8w4YQeOXDk,729
12
- python_sdk_remote-0.0.140.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
13
- python_sdk_remote-0.0.140.dist-info/top_level.txt,sha256=JTpEq_svPlI5hTlPq30Ne-NkR-u5464gjVDP2U74PvE,18
14
- python_sdk_remote-0.0.140.dist-info/RECORD,,
11
+ python_sdk_remote-0.0.141.dist-info/METADATA,sha256=oUoA3dod9YIS-6RKQJ-odokyxknyxWbCAY7RHuSpBYI,729
12
+ python_sdk_remote-0.0.141.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
13
+ python_sdk_remote-0.0.141.dist-info/top_level.txt,sha256=JTpEq_svPlI5hTlPq30Ne-NkR-u5464gjVDP2U74PvE,18
14
+ python_sdk_remote-0.0.141.dist-info/RECORD,,