Skip to content

profile

cast_serialize_profile(_data)

Cast/serialize round-trip for Profile data.

We use @validate_call because ProfileeCreate is a Union type and it cannot be instantiated directly.

Return

Serialized version of a valid profile object.

Source code in fractal_server/app/schemas/v2/profile.py
67
68
69
70
71
72
73
74
75
76
77
78
@validate_call
def cast_serialize_profile(_data: ProfileCreate) -> dict[str, Any]:
    """
    Cast/serialize round-trip for `Profile` data.

    We use `@validate_call` because `ProfileeCreate` is a `Union` type and it
    cannot be instantiated directly.

    Return:
        Serialized version of a valid profile object.
    """
    return _data.model_dump()