python-sdk-local 0.0.41__tar.gz → 0.0.43__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.
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/PKG-INFO +1 -1
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/python_sdk_local.egg-info/PKG-INFO +1 -1
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/python_sdk_local.egg-info/SOURCES.txt +2 -1
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/mini_logger.py +8 -8
- python-sdk-local-0.0.43/sdk/src/validate.py +13 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/setup.py +1 -1
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/README.md +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/pyproject.toml +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/python_sdk_local.egg-info/dependency_links.txt +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/python_sdk_local.egg-info/top_level.txt +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/__init__.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/__init__.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/constants.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/item.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/our_object.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/sdk/src/utilities.py +0 -0
- {python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/setup.cfg +0 -0
|
@@ -5,7 +5,7 @@ from datetime import datetime
|
|
|
5
5
|
class MiniLogger:
|
|
6
6
|
|
|
7
7
|
@staticmethod
|
|
8
|
-
def start(message: str, object: dict = None):
|
|
8
|
+
def start(message: str = "", object: dict = None):
|
|
9
9
|
"""
|
|
10
10
|
Print a log message with the current time.
|
|
11
11
|
|
|
@@ -15,10 +15,10 @@ class MiniLogger:
|
|
|
15
15
|
if object is None:
|
|
16
16
|
print(f"{datetime.now()} - START - {message}")
|
|
17
17
|
else:
|
|
18
|
-
print(f"{datetime.now()} - START - {message} - {object}")
|
|
18
|
+
print(f"{datetime.now()} - START - {message} - {str(object)}")
|
|
19
19
|
|
|
20
20
|
@staticmethod
|
|
21
|
-
def end(message: str, object: dict = None):
|
|
21
|
+
def end(message: str = "", object: dict = None):
|
|
22
22
|
"""
|
|
23
23
|
Print a log message with the current time.
|
|
24
24
|
|
|
@@ -28,10 +28,10 @@ class MiniLogger:
|
|
|
28
28
|
if object is None:
|
|
29
29
|
print(f"{datetime.now()} - END - {message}")
|
|
30
30
|
else:
|
|
31
|
-
print(f"{datetime.now()} - END - {message} - {object}")
|
|
31
|
+
print(f"{datetime.now()} - END - {message} - {str(object)}")
|
|
32
32
|
|
|
33
33
|
@staticmethod
|
|
34
|
-
def info(message: str, object: dict = None):
|
|
34
|
+
def info(message: str = "", object: dict = None):
|
|
35
35
|
"""
|
|
36
36
|
Print a log message with the current time.
|
|
37
37
|
|
|
@@ -42,10 +42,10 @@ class MiniLogger:
|
|
|
42
42
|
if object is None:
|
|
43
43
|
print(f"{datetime.now()} - INFO - {message}")
|
|
44
44
|
else:
|
|
45
|
-
print(f"{datetime.now()} - INFO {message} - {object}")
|
|
45
|
+
print(f"{datetime.now()} - INFO {message} - {str(object)}")
|
|
46
46
|
|
|
47
47
|
@staticmethod
|
|
48
|
-
def error(message: str, object: dict = None):
|
|
48
|
+
def error(message: str = "", object: dict = None):
|
|
49
49
|
"""
|
|
50
50
|
Print a log error message with the current time.
|
|
51
51
|
|
|
@@ -58,4 +58,4 @@ class MiniLogger:
|
|
|
58
58
|
file=sys.stderr)
|
|
59
59
|
else:
|
|
60
60
|
print(
|
|
61
|
-
f"{datetime.now()} - ERROR - {message} - {object}", file=sys.stderr)
|
|
61
|
+
f"{datetime.now()} - ERROR - {message} - {str(object)}", file=sys.stderr)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
def validate_enviroment_variables():
|
|
4
|
+
if(os.getenv("ENVIRONMENT_NAME") is None):
|
|
5
|
+
raise Exception("logger-local-python-package LoggerLocal.py please add Environment Variable called ENVIRONMENT_NAME=local or play1 (instead of ENVIRONMENT)")
|
|
6
|
+
if(os.getenv("PRODUCT_USER_IDENTIFIER") is None):
|
|
7
|
+
raise Exception("logger-local-python-package LoggerLocal.py please add Environment Variable called PRODUCT_USER_IDENTIFIER (instead of PRODUCT_USERNAME)")
|
|
8
|
+
if(os.getenv("PRODUCT_PASSWORD") is None):
|
|
9
|
+
raise Exception("logger-local-python-package LoggerLocal.py please add Environment Variable called PRODUCT_PASSWORD")
|
|
10
|
+
if(os.getenv("LOGZIO_TOKEN") is None):
|
|
11
|
+
raise Exception("logger-local-python-package LoggerLocal.py please add Environment Variable called LOGZIO_TOKEN=cXNHuVkkffkilnkKzZlWExECRlSKqopE")
|
|
12
|
+
|
|
13
|
+
|
|
@@ -3,7 +3,7 @@ import setuptools
|
|
|
3
3
|
# python -m build needs pyproject.toml or setup.py
|
|
4
4
|
setuptools.setup(
|
|
5
5
|
name='python-sdk-local',
|
|
6
|
-
version='0.0.
|
|
6
|
+
version='0.0.43', # https://pypi.org/project/python-sdk-local/
|
|
7
7
|
author="Circles",
|
|
8
8
|
author_email="info@circles.life",
|
|
9
9
|
description="PyPI Package for Circles Python SDK Local Python",
|
|
File without changes
|
|
File without changes
|
{python-sdk-local-0.0.41 → python-sdk-local-0.0.43}/python_sdk_local.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|