def convert_user_raw_data_to_dict(user_raw_data, with_id=False):
    if with_id:
        fields_tuple = USER_MODEL_FIELDS
    else:
        fields_tuple = USER_MODEL_FIELDS_WITHOUT_PK

    bool_fields = ('is_superuser', 'is_staff', 'is_user', 'is_active')
    user_data = convert_db_row_to_dict(user_raw_data, fields_tuple)
    for field in bool_fields:
        user_data[field] = bool(user_data[field])
    return user_data
Convert database row to the dictionary object.
dataset/ETHPy150Open Relrin/aiorest-ws/aiorest_ws/auth/user/utils.py/convert_user_raw_data_to_dict