Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 223 for user_me (0.05 sec)

  1. tests/test_security_scopes_sub_dependency.py

        assert response.json() == {
            "user_me": {
                "user_me": "user_me_1",
                "current_user": {
                    "user": "user_1",
                    "scopes": ["me"],
                    "db_session": "db_session_1",
                },
            },
            "user_items": {
                "user_items": "user_items_1",
                "user_me": {
                    "user_me": "user_me_2",
                    "current_user": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2.9K bytes
    - Viewed (0)
  2. docs_src/extra_models/tutorial001_py310.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
    - 905 bytes
    - Viewed (0)
  3. 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)
  4. docs/ru/docs/features.md

    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Объявляем параметр как `str`
    # и получаем поддержку редактора кода внутри функции
    def main(user_id: str):
        return user_id
    
    
    # Модель Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Это можно использовать так:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Oct 11 17:48:49 UTC 2025
    - 16K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/extra-models.md

    ### About `**user_in.model_dump()` { #about-user-in-model-dump }
    
    #### Pydantic's `.model_dump()` { #pydantics-model-dump }
    
    `user_in` is a Pydantic model of class `UserIn`.
    
    Pydantic models have a `.model_dump()` method that returns a `dict` with the model's data.
    
    So, if we create a Pydantic object `user_in` like:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 6.9K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/extra-models.md

    ///
    
    ### Acerca de `**user_in.dict()` { #about-user-in-dict }
    
    #### `.dict()` de Pydantic { #pydantics-dict }
    
    `user_in` es un modelo Pydantic de la clase `UserIn`.
    
    Los modelos Pydantic tienen un método `.dict()` que devuelve un `dict` con los datos del modelo.
    
    Así que, si creamos un objeto Pydantic `user_in` como:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 7.6K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/extra-models.md

    Wenn wir also ein Pydantic-Objekt `user_in` erstellen, etwa so:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    ```
    
    und dann aufrufen:
    
    ```Python
    user_dict = user_in.model_dump()
    ```
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 8K bytes
    - Viewed (0)
  8. 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)
  9. docs/pt/docs/tutorial/extra-models.md

    ///
    
    ### Sobre `**user_in.dict()` { #about-user-in-dict }
    
    #### O `.dict()` do Pydantic { #pydantics-dict }
    
    `user_in` é um modelo Pydantic da classe `UserIn`.
    
    Os modelos Pydantic possuem um método `.dict()` que retorna um `dict` com os dados do modelo.
    
    Então, se criarmos um objeto Pydantic `user_in` como:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="******@****.***")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Nov 12 16:23:57 UTC 2025
    - 7.5K bytes
    - Viewed (0)
  10. docs/es/docs/features.md

    Escribes Python estándar con tipos:
    
    ```Python
    from datetime import date
    
    from pydantic import BaseModel
    
    # Declara una variable como un str
    # y obtiene soporte del editor dentro de la función
    def main(user_id: str):
        return user_id
    
    
    # Un modelo de Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Que luego puede ser usado como:
    
    ```Python
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 10:15:01 UTC 2025
    - 10.8K bytes
    - Viewed (0)
Back to top