Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 243 for userid (0.03 sec)

  1. docs_src/extra_models/tutorial001_py39.py

    
    def fake_save_user(user_in: UserIn):
        hashed_password = fake_password_hasher(user_in.password)
        user_in_db = UserInDB(**user_in.model_dump(), hashed_password=hashed_password)
        print("User saved! ..not really")
        return user_in_db
    
    
    @app.post("/user/", response_model=UserOut)
    async def create_user(user_in: UserIn):
        user_saved = fake_save_user(user_in)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 949 bytes
    - Viewed (0)
  2. docs_src/extra_models/tutorial002_py310.py

        full_name: str | None = None
    
    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    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)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 798 bytes
    - Viewed (0)
  3. docs_src/extra_models/tutorial002_py39.py

        full_name: Union[str, None] = None
    
    
    class UserIn(UserBase):
        password: str
    
    
    class UserOut(UserBase):
        pass
    
    
    class UserInDB(UserBase):
        hashed_password: str
    
    
    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)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 830 bytes
    - Viewed (0)
  4. src/main/java/org/codelibs/fess/opensearch/user/cbean/UserCB.java

     * governing permissions and limitations under the License.
     */
    package org.codelibs.fess.opensearch.user.cbean;
    
    import org.codelibs.fess.opensearch.user.cbean.bs.BsUserCB;
    
    /**
     * @author ESFlute (using FreeGen)
     */
    public class UserCB extends BsUserCB {
    Registered: Sat Dec 20 09:19:18 UTC 2025
    - Last Modified: Sat Mar 15 06:53:53 UTC 2025
    - 816 bytes
    - Viewed (0)
  5. docs/es/docs/tutorial/extra-models.md

    Como en el ejemplo anterior obtuvimos `user_dict` de `user_in.dict()`, este código:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    sería equivalente a:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...porque `user_in.dict()` es un `dict`, y luego hacemos que Python lo "desempaquete" al pasarlo a `UserInDB` con el prefijo `**`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  6. docs/de/docs/tutorial/extra-models.md

    Da wir im obigen Beispiel `user_dict` von `user_in.model_dump()` bekommen haben, wäre dieser Code:
    
    ```Python
    user_dict = user_in.model_dump()
    UserInDB(**user_dict)
    ```
    
    gleichwertig zu:
    
    ```Python
    UserInDB(**user_in.model_dump())
    ```
    
    ... weil `user_in.model_dump()` ein `dict` ist, und dann lassen wir Python es „entpacken“, indem wir es an `UserInDB` mit vorangestelltem `**` übergeben.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8K bytes
    - Viewed (0)
  7. docs/ru/docs/tutorial/extra-models.md

    ///
    
    ### Про `**user_in.dict()` { #about-user-in-dict }
    
    #### `.dict()` из Pydantic { #pydantics-dict }
    
    `user_in` - это Pydantic-модель класса `UserIn`.
    
    У Pydantic-моделей есть метод `.dict()`, который возвращает `dict` с данными модели.
    
    Поэтому, если мы создадим Pydantic-объект `user_in` таким способом:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  8. docs/pt/docs/tutorial/extra-models.md

    Como no exemplo acima, obtivemos o `user_dict` a partir do `user_in.dict()`, este código:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    seria equivalente a:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...porque `user_in.dict()` é um `dict`, e depois fazemos o Python "desembrulhá-lo" passando-o para `UserInDB` precedido por `**`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  9. docs/zh/docs/tutorial/extra-models.md

        full_name = user_dict["full_name"],
    )
    ```
    
    #### 用其它模型中的内容生成 Pydantic 模型
    
    上例中 ,从 `user_in.dict()` 中得到了 `user_dict`,下面的代码:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    等效于:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ……因为 `user_in.dict()` 是字典,在传递给 `UserInDB` 时,把 `**` 加在  `user_in.dict()` 前,可以让 Python 进行**解包**。
    
    这样,就可以用其它 Pydantic 模型中的数据生成 Pydantic 模型。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  10. docs/ko/docs/tutorial/extra-models.md

    )
    ```
    
    #### 다른 모델 데이터로 새 Pydantic 모델 생성
    
    위의 예제에서 `user_in.dict()`로부터 `user_dict`를 생성한 것처럼, 아래 코드는:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    다음과 동일합니다:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...왜냐하면 `user_in.dict()`는 `dict`이며, 이를 `**`로 Python이 "언팩(unpack)"하도록 하여 `UserInDB`에 전달하기 때문입니다.
    
    따라서, 다른 Pydantic 모델의 데이터를 사용하여 새로운 Pydantic 모델을 생성할 수 있습니다.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri May 30 13:38:33 UTC 2025
    - 8.4K bytes
    - Viewed (0)
Back to top