Skip to content

BaseSchema

UserSchema

fastauth.schema.BaseUserRead

Bases: BaseSchema, Generic[ID]

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

id instance-attribute

id

email instance-attribute

email

username instance-attribute

username

is_active instance-attribute

is_active

is_verified instance-attribute

is_verified

fastauth.schema.BaseUserCreate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

email instance-attribute

email

username class-attribute instance-attribute

username = None

password instance-attribute

password

is_active class-attribute instance-attribute

is_active = True

is_verified class-attribute instance-attribute

is_verified = False

fastauth.schema.BaseUserUpdate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

email class-attribute instance-attribute

email = None

username class-attribute instance-attribute

username = None

RoleSchema

fastauth.schema.BaseRoleRead

Bases: BaseSchema, Generic[PR_S]

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

id instance-attribute

id

codename instance-attribute

codename

permissions instance-attribute

permissions

fastauth.schema.BaseRoleCreate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

codename instance-attribute

codename

permissions class-attribute instance-attribute

permissions = []

fastauth.schema.BaseRoleUpdate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

codename class-attribute instance-attribute

codename = None

permissions class-attribute instance-attribute

permissions = None

PermissionSchema

fastauth.schema.BasePermissionRead

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

id instance-attribute

id

codename instance-attribute

codename

fastauth.schema.BasePermissionCreate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

codename instance-attribute

codename

fastauth.schema.BasePermissionUpdate

Bases: BaseSchema

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

codename class-attribute instance-attribute

codename = None

OAuthSchema

fastauth.schema.BaseOAuthRead

Bases: BaseSchema, Generic[ID]

model_config class-attribute instance-attribute

model_config = ConfigDict(from_attributes=True)

id instance-attribute

id

oauth_name instance-attribute

oauth_name

access_token instance-attribute

access_token

expires_at instance-attribute

expires_at

refresh_token instance-attribute

refresh_token

account_id instance-attribute

account_id

account_email instance-attribute

account_email

Mixins

fastauth.schema.RBACMixin

Bases: Generic[RR_S, PR_S]

__init_subclass__

__init_subclass__(**kwargs)
Source code in fastauth/schema/rbac.py
46
47
48
49
50
51
52
def __init_subclass__(cls, **kwargs):
    if cls.__name__.lower().endswith("read"):
        cls.__annotations__.update(
            {"role_id": int, "role": RR_S, "permissions": list[PR_S]}
        )
    else:
        cls.__annotations__.update({"role_id": int})

fastauth.schema.OAuthMixin

Bases: Generic[OAR_S]

oauth_accounts class-attribute instance-attribute

oauth_accounts = []

Types

fastauth.schema.UR_S module-attribute

UR_S = TypeVar('UR_S', bound=BaseUserRead)

fastauth.schema.UU_S module-attribute

UU_S = TypeVar('UU_S', bound=BaseUserUpdate)

fastauth.schema.UC_S module-attribute

UC_S = TypeVar('UC_S', bound=BaseUserCreate)

fastauth.schema.RR_S module-attribute

RR_S = TypeVar('RR_S', bound=BaseRoleRead)

fastauth.schema.RC_S module-attribute

RC_S = TypeVar('RC_S', bound=BaseRoleCreate)

fastauth.schema.RU_S module-attribute

RU_S = TypeVar('RU_S', bound=BaseRoleUpdate)

fastauth.schema.PC_S module-attribute

PC_S = TypeVar('PC_S', bound=BasePermissionCreate)

fastauth.schema.PR_S module-attribute

PR_S = TypeVar('PR_S', bound=BasePermissionRead)

fastauth.schema.PU_S module-attribute

PU_S = TypeVar('PU_S', bound=BasePermissionUpdate)

fastauth.schema.OAR_S module-attribute

OAR_S = TypeVar('OAR_S', bound=BaseOAuthRead)