def format_timestamp(timestamp):
"""
Method to return y-m-d date string from a timestamp (elapsed time from epoch)
:param timestamp: Timestamp to convert into datestring
:type timestamp: timestamp
:return: y-m-d representation of timestamp as a string
:rtype: string
"""
return datetime.fromtimestamp(timestamp).strftime("%y-%m-%d")
Docstrings
Add docstrings in sphinx format to the functions to clearly convey the parameters, return value and use of the method. https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html
e.g.