initial commit
This commit is contained in:
parent
da3e006c80
commit
5a5881832b
0
utils/__init__.py
Normal file
0
utils/__init__.py
Normal file
7
utils/date_converter.py
Normal file
7
utils/date_converter.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
import datetime
|
||||
|
||||
|
||||
def datetime_from_timestamp(timestamp):
|
||||
dt_object = datetime.datetime.fromtimestamp(timestamp)
|
||||
formatted_datetime = dt_object.strftime('%Y-%m-%d %H:%M:%S')
|
||||
return formatted_datetime
|
7
utils/endpoint_converter.py
Normal file
7
utils/endpoint_converter.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
|
||||
def endpoint_id_to_name_converter(endpoints, endpoint_id):
|
||||
for endpoint in endpoints:
|
||||
if endpoint['id'] == endpoint_id:
|
||||
return endpoint['name']
|
||||
return "Unknown endpoint"
|
Loading…
Reference in a new issue