care.emr.api.otp_viewsets.login module

rand_pass(size)
class OTPLoginRequestSpec(*, phone_number: str)

Bases: BaseModel

phone_number: str
classmethod validate_phone_number(value)
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'phone_number': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class OTPLoginSpec(*, phone_number: str, otp: Annotated[str, MinLen(min_length=5), MaxLen(max_length=5)])

Bases: OTPLoginRequestSpec

otp: str
model_computed_fields: ClassVar[Dict[str, ComputedFieldInfo]] = {}

A dictionary of computed field names and their corresponding ComputedFieldInfo objects.

model_config: ClassVar[ConfigDict] = {}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

model_fields: ClassVar[Dict[str, FieldInfo]] = {'otp': FieldInfo(annotation=str, required=True, metadata=[MinLen(min_length=5), MaxLen(max_length=5)]), 'phone_number': FieldInfo(annotation=str, required=True)}

Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo] objects.

This replaces Model.__fields__ from Pydantic V1.

class OTPLoginView(**kwargs)

Bases: EMRBaseViewSet

authentication_classes = []
permission_classes = []
send(request)
login(request)