beem.utils module¶
-
beem.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-
.
Create a post identifier from comment/post object or arguments. Examples:
- ::
construct_authorperm(‘username’, ‘permlink’) construct_authorperm({‘author’: ‘username’,
‘permlink’: ‘permlink’})
Create a vote identifier from vote object or arguments. Examples:
- ::
construct_authorpermvoter(‘username’, ‘permlink’, ‘voter’) construct_authorpermvoter({‘author’: ‘username’,
‘permlink’: ‘permlink’, ‘voter’: ‘voter’})
-
beem.utils.
derive_permlink
(title, parent_permlink=None, parent_author=None)¶
-
beem.utils.
formatTime
(t)¶ Properly Format Time for permlinks
-
beem.utils.
formatTimeFromNow
(secs=0)¶ 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
-
beem.utils.
formatTimeString
(t)¶ Properly Format Time for permlinks
-
beem.utils.
parse_time
(block_time)¶ Take a string representation of time from the blockchain, and parse it into datetime object.
Correctly split a string containing an authorperm.
Splits the string into author and permlink with the following separator:
/
.
Correctly split a string containing an authorpermvoter.
Splits the string into author and permlink with the following separator:
/
and|
.
-
beem.utils.
sanitize_permlink
(permlink)¶
-
beem.utils.
test_proposal_in_buffer
(buf, operation_name, id)¶