graphenecommon.utils module

graphenecommon.utils.assets_from_string(text)

Correctly split a string containing an asset pair.

Splits the string into two assets with the separator being on of the following: :, /, or -.

graphenecommon.utils.formatTime(t)

Properly Format Time for permlinks

graphenecommon.utils.formatTimeFromNow(secs=None)

Properly Format Time that is x seconds in the future

Parameters:secs (int) – Seconds to go in the future (x>0) or the past (x<0)
Returns:Properly formated time for Graphene (%Y-%m-%dT%H:%M:%S)
Return type:str
graphenecommon.utils.formatTimeString(t)

Properly Format Time for permlinks

graphenecommon.utils.parse_time(block_time)

Take a string representation of time from the blockchain, and parse it into datetime object.