python-sdk-local 0.0.2__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.
- python_sdk_local/__init__.py +0 -0
- python_sdk_local/src/__init__.py +0 -0
- python_sdk_local/src/utilities.py +35 -0
- python_sdk_local-0.0.2.dist-info/METADATA +13 -0
- python_sdk_local-0.0.2.dist-info/RECORD +7 -0
- python_sdk_local-0.0.2.dist-info/WHEEL +5 -0
- python_sdk_local-0.0.2.dist-info/top_level.txt +1 -0
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
|
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
|
+
def timedelta_to_time_format(timedelta: datetime.timedelta):
|
|
20
|
+
TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME = "timedelta_to_time_format"
|
|
21
|
+
logger.start(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME)
|
|
22
|
+
#The following line will cause TypeError: Object of type timedelta is not JSON serializable
|
|
23
|
+
#logger.start(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME, object={'timedelta': timedelta})
|
|
24
|
+
|
|
25
|
+
# Calculate the total seconds and convert to HH:MM:SS format
|
|
26
|
+
total_seconds = int(timedelta.total_seconds())
|
|
27
|
+
hours = total_seconds // 3600
|
|
28
|
+
minutes = (total_seconds % 3600) // 60
|
|
29
|
+
seconds = total_seconds % 60
|
|
30
|
+
|
|
31
|
+
# Format as "HH:MM:SS"
|
|
32
|
+
formatted_time = f"{hours:02d}:{minutes:02d}:{seconds:02d}"
|
|
33
|
+
|
|
34
|
+
logger.end(TIMEDELTA_TO_TIME_FORMAT_METHOD_NAME, object={'formatted_time': formatted_time})
|
|
35
|
+
return formatted_time
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: python-sdk-local
|
|
3
|
+
Version: 0.0.2
|
|
4
|
+
Summary: PyPI Package for Circles Python SDK Local Python
|
|
5
|
+
Home-page: https://github.com/circles
|
|
6
|
+
Author: Circles
|
|
7
|
+
Author-email: info@circles.life
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: License :: Other/Proprietary License
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
This is a package for sharing common XXX function used in different repositories
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
python_sdk_local/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
python_sdk_local/src/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
python_sdk_local/src/utilities.py,sha256=i0v5Pf3OJ9JTyGVyD0NQrd8jmxTKC3CzVgNi10_LzCs,1363
|
|
4
|
+
python_sdk_local-0.0.2.dist-info/METADATA,sha256=eV5s57bAVOh_Y2Azi2fsNXaz14uinTPYEGqi33byKws,470
|
|
5
|
+
python_sdk_local-0.0.2.dist-info/WHEEL,sha256=5sUXSg9e4bi7lTLOHcm6QEYwO5TIF1TNbTSVFVjcJcc,92
|
|
6
|
+
python_sdk_local-0.0.2.dist-info/top_level.txt,sha256=9MVrcsynSYg1-wsmAz7JKjcPdSy9H2sPikDDPR-oYpI,17
|
|
7
|
+
python_sdk_local-0.0.2.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
python_sdk_local
|