utils ¶
TranslatedStrEnum ¶
Bases: StrEnum
translation ¶
| Python | |
|---|---|
1 | |
Returns the Russian translation of the enumeration member.
Returns: str: The Russian translation of the enumeration member.
Source code in marketplace_apis/common/utils.py
| Python | |
|---|---|
57 58 59 60 61 62 63 64 65 66 | |
datetime_to_iso ¶
| Python | |
|---|---|
1 | |
Converts a datetime object to an ISO formatted string, adjusting for a specified timezone.
Parameters: dt (datetime): The datetime object to convert. tz (tzinfo, optional): The timezone to adjust the datetime object to. Defaults to UTC.
Returns: str: The ISO formatted string representation of the datetime object.
Source code in marketplace_apis/common/utils.py
| Python | |
|---|---|
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | |
dict_datetime_to_iso ¶
| Python | |
|---|---|
1 | |
Recursively converts all datetime objects in a dictionary to their ISO representation.
Parameters: dict_ (dict): The dictionary containing datetime objects to convert. tz (tzinfo, optional): The timezone to adjust the datetime objects to. Defaults to UTC.
Returns: None
Source code in marketplace_apis/common/utils.py
| Python | |
|---|---|
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | |