python-sdk-local 0.0.43__tar.gz → 0.0.44__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.43 → python-sdk-local-0.0.44}/PKG-INFO +1 -1
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/python_sdk_local.egg-info/PKG-INFO +1 -1
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/mini_logger.py +33 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/setup.py +1 -1
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/README.md +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/pyproject.toml +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/python_sdk_local.egg-info/SOURCES.txt +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/python_sdk_local.egg-info/dependency_links.txt +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/python_sdk_local.egg-info/top_level.txt +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/__init__.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/__init__.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/constants.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/item.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/our_object.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/utilities.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/sdk/src/validate.py +0 -0
- {python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/setup.cfg +0 -0
|
@@ -4,6 +4,9 @@ from datetime import datetime
|
|
|
4
4
|
|
|
5
5
|
class MiniLogger:
|
|
6
6
|
|
|
7
|
+
# TODO Can we so one generic function call by all
|
|
8
|
+
# TODO Shall we user the Python logging package?
|
|
9
|
+
|
|
7
10
|
@staticmethod
|
|
8
11
|
def start(message: str = "", object: dict = None):
|
|
9
12
|
"""
|
|
@@ -44,6 +47,20 @@ class MiniLogger:
|
|
|
44
47
|
else:
|
|
45
48
|
print(f"{datetime.now()} - INFO {message} - {str(object)}")
|
|
46
49
|
|
|
50
|
+
@staticmethod
|
|
51
|
+
def warning(message: str = "", object: dict = None):
|
|
52
|
+
"""
|
|
53
|
+
Print a log message with the current time.
|
|
54
|
+
|
|
55
|
+
Parameters:
|
|
56
|
+
message (str): The message to be printed.
|
|
57
|
+
object (dict): The object to be printed.
|
|
58
|
+
"""
|
|
59
|
+
if object is None:
|
|
60
|
+
print(f"{datetime.now()} - WARNING - {message}")
|
|
61
|
+
else:
|
|
62
|
+
print(f"{datetime.now()} - WARNING {message} - {str(object)}")
|
|
63
|
+
|
|
47
64
|
@staticmethod
|
|
48
65
|
def error(message: str = "", object: dict = None):
|
|
49
66
|
"""
|
|
@@ -59,3 +76,19 @@ class MiniLogger:
|
|
|
59
76
|
else:
|
|
60
77
|
print(
|
|
61
78
|
f"{datetime.now()} - ERROR - {message} - {str(object)}", file=sys.stderr)
|
|
79
|
+
|
|
80
|
+
@staticmethod
|
|
81
|
+
def exception(message: str = "", object: dict = None):
|
|
82
|
+
"""
|
|
83
|
+
Print a log error message with the current time.
|
|
84
|
+
|
|
85
|
+
Parameters:
|
|
86
|
+
message (str): The message to be printed.
|
|
87
|
+
object (dict): The object to be printed.
|
|
88
|
+
"""
|
|
89
|
+
if object is None:
|
|
90
|
+
print(f"{datetime.now()} - EXCEPTION - {message}",
|
|
91
|
+
file=sys.stderr)
|
|
92
|
+
else:
|
|
93
|
+
print(
|
|
94
|
+
f"{datetime.now()} - EXCEPTION- {message} - {str(object)}", file=sys.stderr)
|
|
@@ -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.44', # 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
|
|
File without changes
|
{python-sdk-local-0.0.43 → python-sdk-local-0.0.44}/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
|
|
File without changes
|