Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Rashed (0.21 sec)

  1. docs_src/extra_models/tutorial001.py

    class UserInDB(BaseModel):
        username: str
        hashed_password: str
        email: EmailStr
        full_name: Union[str, None] = None
    
    
    def fake_password_hasher(raw_password: str):
        return "supersecret" + raw_password
    
    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.dict(), hashed_password=hashed_password)
        print("User saved! ..not really")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 943 bytes
    - Viewed (0)
  2. docs_src/nosql_databases/tutorial001.py

        username: str
        email: Union[str, None] = None
        full_name: Union[str, None] = None
        disabled: Union[bool, None] = None
    
    
    class UserInDB(User):
        type: str = USERPROFILE_DOC_TYPE
        hashed_password: str
    
    
    def get_user(bucket: Bucket, username: str):
        doc_id = f"userprofile::{username}"
        result = bucket.get(doc_id, quiet=True)
        if not result.value:
            return None
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 1.3K bytes
    - Viewed (0)
Back to top