Utilities and helper functions.
-
@
panko.utils.
decimal_to_dt
[source]
Return a datetime from Decimal unixtime format.
-
@
panko.utils.
decode_unicode
[source]
Decode the unicode of the message, and encode it into utf-8.
-
@
panko.utils.
dt_to_decimal
[source]
Datetime to Decimal.
Some databases don’t store microseconds in datetime
so we always store as Decimal unixtime.
-
@
panko.utils.
recursive_keypairs
(d, separator=':')[source]
Generator that produces sequence of keypairs for nested dictionaries.
-
@
panko.utils.
sanitize_timestamp
[source]
Return a naive utc datetime object.
-
@
panko.utils.
update_nested
(original_dict, updates)[source]
Updates the leaf nodes in a nest dict.
Updates occur without replacing entire sub-dicts.