adpay.utils package
This package provides the generic functionality for this application.
The responsibility break down is:
- adpay.utils.consts is the module hosting configuration
- adpay.utils.logs provides logging initialization
- adpay.utils.utils provides generic functions used in many different places
adpay.utils.utils module
-
adpay.utils.utils.genkey(key, val, delimiter='_')[source]
Generate keyword identifier, ex. {‘animal’: ‘dog’} becomes ‘animal_dog’
| Parameters: |
- key – Key
- val – Value
- delimiter – Delimiter, default “_”
|
| Returns: | Generated identifier
|
-
adpay.utils.utils.timestamp2hour(timestamp)[source]
Get epoch timestamp of the hour of the timestamp.
| Parameters: | timestamp – timestamp |
| Returns: | timestamp of the hour (floored) |