python-sdk-remote 0.0.65__py3-none-any.whl → 0.0.66__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.
@@ -76,13 +76,13 @@ class MiniLogger:
76
76
  f"{datetime.now()} - ERROR - {message} - {object}", file=sys.stderr)
77
77
 
78
78
  @staticmethod
79
- def exception(message: str = "", object: Exception = None):
79
+ def exception(message: str = "", object: Exception | dict = None):
80
80
  """
81
81
  Print a log error message with the current time.
82
82
 
83
83
  Parameters:
84
84
  message (str): The message to be printed.
85
- object (dict): The object to be printed.
85
+ object (dict / Exception): The object / Exception to be printed.
86
86
  """
87
87
  if object is None:
88
88
  print(f"{datetime.now()} - EXCEPTION - {message}", file=sys.stderr)
@@ -2,16 +2,23 @@ from .valid_json_versions import valid_json_versions
2
2
 
3
3
 
4
4
  class UnifiedJson:
5
- def __init__(self, data: dict, version: str):
6
- if version not in valid_json_versions:
5
+ def __init__(self, data: dict, json_version: str):
6
+ if json_version not in valid_json_versions:
7
7
  raise Exception(
8
- f"version {version} is not in valid_json_versions {valid_json_versions}"
8
+ f"version {json_version} is not in valid_json_versions {valid_json_versions}, "
9
+ f"please make sure you run sql2code."
9
10
  )
10
- self.version = version
11
+ self.json_version = json_version
11
12
  self.data = data
12
13
 
13
14
  def get_unified_json(self):
14
- return {"version": self.version, "data": self.data}
15
+ return {"version": self.json_version, "data": self.data}
16
+
17
+ def get_data(self):
18
+ return self.data
19
+
20
+ def get_json_version(self):
21
+ return self.json_version
15
22
 
16
23
  def __str__(self):
17
24
  return self.get_unified_json()
@@ -170,6 +170,7 @@ def is_list_of_dicts(obj):
170
170
  return is_list_of_dicts_result
171
171
  except Exception as exception:
172
172
  logger.exception(IS_LIST_OF_DICTS_FUNCTION_NAME, exception)
173
+ logger.end(IS_LIST_OF_DICTS_FUNCTION_NAME)
173
174
  raise
174
175
 
175
176
 
@@ -1,4 +1,4 @@
1
1
  # Later we'll generate this file using Sql2Code (from json_version database schema)
2
2
  valid_json_versions = {
3
- "240109"
3
+ "240109": "Description"
4
4
  }
@@ -1,6 +1,7 @@
1
1
  from .constants import BRAND_NAME, ENVIRONMENT_NAME, LOGZIO_TOKEN
2
2
 
3
3
 
4
+ # TODO: I think this should be in logger-local, not here (akiva)
4
5
  # TODO Align with https://github.com/circles-zone/typescript-sdk-remote-typescript-package/edit/dev/typescript-sdk/src/utils/index.ts validateTenantEnvironmentVariables() # noqa501
5
6
  def validate_enviroment_variables(brand_name: str = BRAND_NAME, environment_name: str = ENVIRONMENT_NAME,
6
7
  logzio_token: str = LOGZIO_TOKEN):
@@ -17,8 +18,9 @@ def validate_enviroment_variables(brand_name: str = BRAND_NAME, environment_name
17
18
 
18
19
  def validate_environment_name(environment_name: str = ENVIRONMENT_NAME):
19
20
  if environment_name is None:
20
- raise Exception("logger-local-python-package LoggerLocal.py please add Environment Variable called "
21
- "ENVIRONMENT_NAME=local or play1 (instead of ENVIRONMENT)")
21
+ raise Exception(
22
+ "logger-local-python-package LoggerLocal.py in case of Play1 environment, please add Environment Variable called "
23
+ "ENVIRONMENT_NAME=local or play1 (instead of ENVIRONMENT)")
22
24
 
23
25
 
24
26
  def validate_brand_name(brand_name: str = BRAND_NAME):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: python-sdk-remote
3
- Version: 0.0.65
3
+ Version: 0.0.66
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
@@ -0,0 +1,13 @@
1
+ python_sdk_remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ python_sdk_remote/constants.py,sha256=x8lavZy0egJw9GGQBJlACrC5OjmpM174meeiLhbciII,962
3
+ python_sdk_remote/item.py,sha256=HnSLHkZTKTLNhlaZoPhKAwqG-yHPsd7zvqPPOqnrKVg,287
4
+ python_sdk_remote/mini_logger.py,sha256=ajBalf_chM027FkjIYRv6qi54RqK-bvSIwaQScEPIkc,2898
5
+ python_sdk_remote/our_object.py,sha256=7EA0E43GYJSc2C4ren-1pnALYWUJ2Wm9KQlHUFMpS_k,1997
6
+ python_sdk_remote/unified_json.py,sha256=z26ewUJIJg9duYVcfHMs29ZEJ1iZ6stSO84klKNYC7g,772
7
+ python_sdk_remote/utilities.py,sha256=u2VAco_-ZyB8Kly66eBPJfxygfNlRZ94QlMHt_7Kme4,11344
8
+ python_sdk_remote/valid_json_versions.py,sha256=-ZU65JYI6gTEfK8o6gu9Dmm9SQmwzj5pDbEXiyUbBhQ,138
9
+ python_sdk_remote/validate_environment.py,sha256=HI1Quey-EuaWU27o46F7wOi_qQ4Jpm_Olz_BVTxnXS8,1937
10
+ python_sdk_remote-0.0.66.dist-info/METADATA,sha256=rxr6dIqBvH1LT6NqcK_D45opGYfaUCiaMthx8poHXoI,536
11
+ python_sdk_remote-0.0.66.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
+ python_sdk_remote-0.0.66.dist-info/top_level.txt,sha256=JTpEq_svPlI5hTlPq30Ne-NkR-u5464gjVDP2U74PvE,18
13
+ python_sdk_remote-0.0.66.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- python_sdk_remote/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- python_sdk_remote/constants.py,sha256=x8lavZy0egJw9GGQBJlACrC5OjmpM174meeiLhbciII,962
3
- python_sdk_remote/item.py,sha256=HnSLHkZTKTLNhlaZoPhKAwqG-yHPsd7zvqPPOqnrKVg,287
4
- python_sdk_remote/mini_logger.py,sha256=Wq4lAfbqleXxlkIObb88_BsZmWymPcT5DLX1rNoxJNs,2867
5
- python_sdk_remote/our_object.py,sha256=7EA0E43GYJSc2C4ren-1pnALYWUJ2Wm9KQlHUFMpS_k,1997
6
- python_sdk_remote/unified_json.py,sha256=9qO-fuDtpGrCTmbBAklYrayk1lYoQzUr7RjDYnTE7NY,570
7
- python_sdk_remote/utilities.py,sha256=YyiRjwUdPF4O9ClYnBa_z9nX7oGnV_aqUbu2FFy3lF0,11293
8
- python_sdk_remote/valid_json_versions.py,sha256=vUU8yxRyjxMJQHVAPzI_wz3BrIuoly8e49oxOUxCXdo,123
9
- python_sdk_remote/validate_environment.py,sha256=7B-qtV7vYWTHYOKpjG_d1gWUpmiGASxrm0T7KzzpMtk,1841
10
- python_sdk_remote-0.0.65.dist-info/METADATA,sha256=O3Nqd0bqro57UNnDSwSSiJXEtyNBJHiImECNELyVcwQ,536
11
- python_sdk_remote-0.0.65.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
12
- python_sdk_remote-0.0.65.dist-info/top_level.txt,sha256=JTpEq_svPlI5hTlPq30Ne-NkR-u5464gjVDP2U74PvE,18
13
- python_sdk_remote-0.0.65.dist-info/RECORD,,