Total Complexity | 1 |
Total Lines | 13 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | from uuid import UUID |
||
2 | |||
3 | |||
4 | def default_uuid_serializer(obj: UUID, **kwargs) -> str: |
||
5 | """ |
||
6 | Serialize the given obj. By default, it is serialized as specified in RFC 4122. |
||
7 | e.g. '12345678-1234-1234-1234-123456789abc' |
||
8 | :param obj: an instance of an uuid.UUID. |
||
9 | :param kwargs: any keyword arguments. |
||
10 | :return: ``obj`` serialized as a string. |
||
11 | """ |
||
12 | return str(obj) |
||
13 |