python-sdk-remote 0.0.132__tar.gz → 0.0.134__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.

Files changed (20) hide show
  1. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/PKG-INFO +1 -1
  2. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/our_object.py +23 -9
  3. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote.egg-info/PKG-INFO +1 -1
  4. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/setup.py +1 -1
  5. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/README.md +0 -0
  6. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/pyproject.toml +0 -0
  7. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/__init__.py +0 -0
  8. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/constants.py +0 -0
  9. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/http_response.py +0 -0
  10. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/item.py +0 -0
  11. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/mini_logger.py +0 -0
  12. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/unified_json.py +0 -0
  13. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/utilities.py +0 -0
  14. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/valid_json_versions.py +0 -0
  15. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote/src/validate_environment.py +0 -0
  16. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote.egg-info/SOURCES.txt +0 -0
  17. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote.egg-info/dependency_links.txt +0 -0
  18. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote.egg-info/requires.txt +0 -0
  19. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/python_sdk_remote.egg-info/top_level.txt +0 -0
  20. {python_sdk_remote-0.0.132 → python_sdk_remote-0.0.134}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-sdk-remote
3
- Version: 0.0.132
3
+ Version: 0.0.134
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
@@ -1,36 +1,47 @@
1
1
  import json
2
- from abc import ABC, abstractmethod
2
+ from abc import ABC # , abstractmethod
3
3
 
4
4
  from .mini_logger import MiniLogger as logger
5
5
 
6
6
 
7
7
  # TODO Where are we using it? Shall we extend the usage of OurObject as the father of all our entities?
8
8
  class OurObject(ABC):
9
- def __init__(self, **kwargs):
9
+ def __init__(self, id_column_name, **kwargs):
10
10
  INIT_METHOD_NAME = '__init__'
11
11
  logger.start(INIT_METHOD_NAME, object={'kwargs': kwargs})
12
- self.kwargs = kwargs
12
+ setattr(self, 'id_column_name', id_column_name)
13
+ for field, value in kwargs.items():
14
+ # if field in event_fields:
15
+ setattr(self, field, value)
16
+
17
+ # self.kwargs = kwargs
13
18
  logger.end(INIT_METHOD_NAME, object={'kwargs': kwargs})
14
19
 
20
+ def get_id_column_name(self):
21
+ """Returns the id of the object"""
22
+ return self.get('id_column_name')
23
+
15
24
  # Commented so we can use it in database foreach()
16
- #@abstractmethod
25
+ # @abstractmethod
17
26
  def get_name(self):
18
27
  """Returns the name of the object"""
19
- #raise NotImplementedError(
20
- #"Subclasses must implement the 'get_name' method.")
28
+ # raise NotImplementedError(
29
+ # "Subclasses must implement the 'get_name' method.")
21
30
 
22
31
  def get(self, attr_name: str):
23
32
  """Returns the value of the attribute with the given name"""
24
33
  GET_METHOD_NAME = 'get'
25
34
  logger.start(GET_METHOD_NAME, object={'attr_name': attr_name})
26
- arguments = getattr(self, 'kwargs', None)
27
- value = arguments.get(attr_name, None)
35
+ # arguments = getattr(self, 'kwargs', None)
36
+ # value = arguments.get(attr_name, None)
37
+ value = self.__dict__.get(attr_name, None)
28
38
  logger.end(GET_METHOD_NAME, object={'attr_name': attr_name})
29
39
  return value
30
40
 
31
41
  def get_all_arguments(self):
32
42
  """Returns all the arguments passed to the constructor as a dictionary"""
33
- return getattr(self, 'kwargs', None)
43
+ # return getattr(self, 'kwargs', None)
44
+ return self.__dict__
34
45
 
35
46
  def to_json(self) -> str:
36
47
  """Returns a json string representation of this object"""
@@ -55,3 +66,6 @@ class OurObject(ABC):
55
66
  def __ne__(self, other) -> bool:
56
67
  """Checks if two objects are not equal"""
57
68
  return not self.__eq__(other)
69
+
70
+ def get_dict(self):
71
+ return self.__dict__
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-sdk-remote
3
- Version: 0.0.132
3
+ Version: 0.0.134
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
@@ -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.132', # https://pypi.org/project/python-sdk-remote/
10
+ version='0.0.134', # 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",