Skip to main content

Parameters

ParameterTypeDefaultDescription
user_idUserIdRequiredThe unique identifier for the user, of type UserId. This is the primary key
profile_dataDict[str, Any]{}A flexible key-value store for persistent user metadata
created_atfloattime.time()The Unix timestamp when the user profile was first created
updated_atfloattime.time()The Unix timestamp when the user profile was last updated

Functions

to_dict

Serializes the user profile model to a dictionary. Returns:
  • Dict[str, Any]: Dictionary representation of the user profile

from_dict

Creates a UserProfile instance from a dictionary. Parameters:
  • data (Dict[str, Any]): Dictionary data to create UserProfile from
Returns:
  • UserProfile: The created UserProfile instance
I