Module zep_python.user.models
Expand source code
from datetime import datetime
from typing import Any, Dict, Optional
from uuid import UUID
from pydantic import BaseModel
class User(BaseModel):
"""
Represents a user object with a unique identifier, metadata,
and other attributes.
Attributes
----------
uuid : Optional[UUID]
A unique identifier for the user. Used internally as a primary key.
id : Optional[int]
The ID of the user. Used as a cursor for pagination.
created_at : Optional[datetime]
The timestamp when the user was created.
updated_at : Optional[datetime]
The timestamp when the user was last updated.
deleted_at : Optional[datetime]
The timestamp when the user was deleted.
user_id : str
The unique identifier of the user.
email : Optional[str]
The email of the user.
first_name : Optional[str]
The first name of the user.
last_name : Optional[str]
The last name of the user.
metadata : Optional[Dict[str, Any]]
The metadata associated with the user.
"""
uuid: Optional[UUID] = None
id: Optional[int] = None
created_at: Optional[datetime] = None
updated_at: Optional[datetime] = None
deleted_at: Optional[datetime] = None
user_id: str
email: Optional[str] = None
first_name: Optional[str] = None
last_name: Optional[str] = None
metadata: Optional[Dict[str, Any]] = None
class CreateUserRequest(BaseModel):
"""
Represents a request to create a user.
Attributes
----------
user_id : str
The unique identifier of the user.
email : Optional[str]
The email of the user.
first_name : Optional[str]
The first name of the user.
last_name : Optional[str]
The last name of the user.
metadata : Optional[Dict[str, Any]]
The metadata associated with the user.
"""
user_id: str
email: Optional[str] = None
first_name: Optional[str] = None
last_name: Optional[str] = None
metadata: Optional[Dict[str, Any]] = None
class UpdateUserRequest(BaseModel):
"""
Represents a request to update a user.
Attributes
----------
uuid : Optional[UUID]
A unique identifier for the user.
user_id : str
The unique identifier of the user.
email : Optional[str]
The email of the user.
first_name : Optional[str]
The first name of the user.
last_name : Optional[str]
The last name of the user.
metadata : Optional[Dict[str, Any]]
The metadata associated with the user.
"""
uuid: Optional[UUID] = None
user_id: str
email: Optional[str] = None
first_name: Optional[str] = None
last_name: Optional[str] = None
metadata: Optional[Dict[str, Any]] = None
Classes
class CreateUserRequest (**data: Any)
-
Represents a request to create a user.
Attributes
user_id
:str
- The unique identifier of the user.
email
:Optional[str]
- The email of the user.
first_name
:Optional[str]
- The first name of the user.
last_name
:Optional[str]
- The last name of the user.
metadata
:Optional[Dict[str, Any]]
- The metadata associated with the user.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.Expand source code
class CreateUserRequest(BaseModel): """ Represents a request to create a user. Attributes ---------- user_id : str The unique identifier of the user. email : Optional[str] The email of the user. first_name : Optional[str] The first name of the user. last_name : Optional[str] The last name of the user. metadata : Optional[Dict[str, Any]] The metadata associated with the user. """ user_id: str email: Optional[str] = None first_name: Optional[str] = None last_name: Optional[str] = None metadata: Optional[Dict[str, Any]] = None
Ancestors
- pydantic.main.BaseModel
Class variables
var email : Optional[str]
var first_name : Optional[str]
var last_name : Optional[str]
var metadata : Optional[Dict[str, Any]]
var model_computed_fields
var model_config
var model_fields
var user_id : str
class UpdateUserRequest (**data: Any)
-
Represents a request to update a user.
Attributes
uuid
:Optional[UUID]
- A unique identifier for the user.
user_id
:str
- The unique identifier of the user.
email
:Optional[str]
- The email of the user.
first_name
:Optional[str]
- The first name of the user.
last_name
:Optional[str]
- The last name of the user.
metadata
:Optional[Dict[str, Any]]
- The metadata associated with the user.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.Expand source code
class UpdateUserRequest(BaseModel): """ Represents a request to update a user. Attributes ---------- uuid : Optional[UUID] A unique identifier for the user. user_id : str The unique identifier of the user. email : Optional[str] The email of the user. first_name : Optional[str] The first name of the user. last_name : Optional[str] The last name of the user. metadata : Optional[Dict[str, Any]] The metadata associated with the user. """ uuid: Optional[UUID] = None user_id: str email: Optional[str] = None first_name: Optional[str] = None last_name: Optional[str] = None metadata: Optional[Dict[str, Any]] = None
Ancestors
- pydantic.main.BaseModel
Class variables
var email : Optional[str]
var first_name : Optional[str]
var last_name : Optional[str]
var metadata : Optional[Dict[str, Any]]
var model_computed_fields
var model_config
var model_fields
var user_id : str
var uuid : Optional[uuid.UUID]
class User (**data: Any)
-
Represents a user object with a unique identifier, metadata, and other attributes.
Attributes
uuid
:Optional[UUID]
- A unique identifier for the user. Used internally as a primary key.
id
:Optional[int]
- The ID of the user. Used as a cursor for pagination.
created_at
:Optional[datetime]
- The timestamp when the user was created.
updated_at
:Optional[datetime]
- The timestamp when the user was last updated.
deleted_at
:Optional[datetime]
- The timestamp when the user was deleted.
user_id
:str
- The unique identifier of the user.
email
:Optional[str]
- The email of the user.
first_name
:Optional[str]
- The first name of the user.
last_name
:Optional[str]
- The last name of the user.
metadata
:Optional[Dict[str, Any]]
- The metadata associated with the user.
Create a new model by parsing and validating input data from keyword arguments.
Raises [
ValidationError
][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.self
is explicitly positional-only to allowself
as a field name.Expand source code
class User(BaseModel): """ Represents a user object with a unique identifier, metadata, and other attributes. Attributes ---------- uuid : Optional[UUID] A unique identifier for the user. Used internally as a primary key. id : Optional[int] The ID of the user. Used as a cursor for pagination. created_at : Optional[datetime] The timestamp when the user was created. updated_at : Optional[datetime] The timestamp when the user was last updated. deleted_at : Optional[datetime] The timestamp when the user was deleted. user_id : str The unique identifier of the user. email : Optional[str] The email of the user. first_name : Optional[str] The first name of the user. last_name : Optional[str] The last name of the user. metadata : Optional[Dict[str, Any]] The metadata associated with the user. """ uuid: Optional[UUID] = None id: Optional[int] = None created_at: Optional[datetime] = None updated_at: Optional[datetime] = None deleted_at: Optional[datetime] = None user_id: str email: Optional[str] = None first_name: Optional[str] = None last_name: Optional[str] = None metadata: Optional[Dict[str, Any]] = None
Ancestors
- pydantic.main.BaseModel
Class variables
var created_at : Optional[datetime.datetime]
var deleted_at : Optional[datetime.datetime]
var email : Optional[str]
var first_name : Optional[str]
var id : Optional[int]
var last_name : Optional[str]
var metadata : Optional[Dict[str, Any]]
var model_computed_fields
var model_config
var model_fields
var updated_at : Optional[datetime.datetime]
var user_id : str
var uuid : Optional[uuid.UUID]