python-sdk-local 0.0.7__tar.gz → 0.0.8__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.7 → python-sdk-local-0.0.8}/PKG-INFO +1 -1
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/python_sdk_local.egg-info/PKG-INFO +1 -1
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/python_sdk_local.egg-info/SOURCES.txt +4 -1
- python-sdk-local-0.0.8/python_sdk_local.egg-info/top_level.txt +1 -0
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/setup.py +1 -1
- python-sdk-local-0.0.8/utilities/__init__.py +0 -0
- python-sdk-local-0.0.8/utilities/src/__init__.py +0 -0
- python-sdk-local-0.0.8/utilities/src/utilities.py +37 -0
- python-sdk-local-0.0.7/python_sdk_local.egg-info/top_level.txt +0 -1
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/README.md +0 -0
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/pyproject.toml +0 -0
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/python_sdk_local.egg-info/dependency_links.txt +0 -0
- {python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/setup.cfg +0 -0
|
@@ -4,4 +4,7 @@ setup.py
|
|
|
4
4
|
python_sdk_local.egg-info/PKG-INFO
|
|
5
5
|
python_sdk_local.egg-info/SOURCES.txt
|
|
6
6
|
python_sdk_local.egg-info/dependency_links.txt
|
|
7
|
-
python_sdk_local.egg-info/top_level.txt
|
|
7
|
+
python_sdk_local.egg-info/top_level.txt
|
|
8
|
+
utilities/__init__.py
|
|
9
|
+
utilities/src/__init__.py
|
|
10
|
+
utilities/src/utilities.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
utilities
|
|
@@ -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.8', # 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
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from logger_local.LoggerComponentEnum import LoggerComponentEnum
|
|
3
|
+
from dotenv import load_dotenv
|
|
4
|
+
load_dotenv()
|
|
5
|
+
from logger_local.Logger import Logger # noqa: E402
|
|
6
|
+
|
|
7
|
+
PYTHON_SDK_LOCAL_COMPONENT_ID = 184
|
|
8
|
+
PYTHON_SDK_LOCAL_COMPONENT_NAME = 'python_sdk_local/src/utilities.py'
|
|
9
|
+
|
|
10
|
+
obj = {
|
|
11
|
+
'component_id': PYTHON_SDK_LOCAL_COMPONENT_ID,
|
|
12
|
+
'component_name': PYTHON_SDK_LOCAL_COMPONENT_NAME,
|
|
13
|
+
'component_category': LoggerComponentEnum.ComponentCategory.Code.value,
|
|
14
|
+
'developer_email': 'tal.g@circ.zone'
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
logger = Logger.create_logger(object=obj)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def timedelta_to_time_format(timedelta: datetime.timedelta):
|
|
21
|
+
TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME = "timedelta_to_time_format"
|
|
22
|
+
logger.start(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME)
|
|
23
|
+
# The following line will cause TypeError: Object of type timedelta is not JSON serializable
|
|
24
|
+
# logger.start(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME, object={'timedelta': timedelta})
|
|
25
|
+
|
|
26
|
+
# Calculate the total seconds and convert to HH:MM:SS format
|
|
27
|
+
total_seconds = int(timedelta.total_seconds())
|
|
28
|
+
hours = total_seconds // 3600
|
|
29
|
+
minutes = (total_seconds % 3600) // 60
|
|
30
|
+
seconds = total_seconds % 60
|
|
31
|
+
|
|
32
|
+
# Format as "HH:MM:SS"
|
|
33
|
+
formatted_time = f"{hours:02d}:{minutes:02d}:{seconds:02d}"
|
|
34
|
+
|
|
35
|
+
logger.end(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME,
|
|
36
|
+
object={'formatted_time': formatted_time})
|
|
37
|
+
return formatted_time
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
File without changes
|
|
File without changes
|
{python-sdk-local-0.0.7 → python-sdk-local-0.0.8}/python_sdk_local.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|