Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 77 for Doe (0.15 sec)

  1. tests/test_response_model_as_return_annotation.py

        return User(name="John", surname="Doe")
    
    
    @app.get("/no_response_model-no_annotation-return_dict")
    def no_response_model_no_annotation_return_dict():
        return {"name": "John", "surname": "Doe"}
    
    
    @app.get("/response_model-no_annotation-return_same_model", response_model=User)
    def response_model_no_annotation_return_same_model():
        return User(name="John", surname="Doe")
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial011.py

    
    class User(BaseModel):
        id: int
        name: str = "John Doe"
        signup_ts: Union[datetime, None] = None
        friends: List[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 498 bytes
    - Viewed (0)
  3. docs_src/python_types/tutorial011_py310.py

    from pydantic import BaseModel
    
    
    class User(BaseModel):
        id: int
        name: str = "John Doe"
        signup_ts: datetime | None = None
        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 461 bytes
    - Viewed (0)
  4. maven-core/src/test/java/org/apache/maven/toolchain/DefaultToolchainTest.java

            DefaultToolchain toolchain = newDefaultToolchain(model);
            toolchain.addProvideToken("name", RequirementMatcherFactory.createExactMatcher("Jane Doe"));
    
            assertFalse(toolchain.matchesRequirements(Collections.singletonMap("name", "John Doe")));
            verify(logger).debug("Toolchain {} doesn't match required property: {}", toolchain, "name");
        }
    
        @Test
        void testEquals() {
    Java
    - Registered: Sun Apr 28 03:35:10 GMT 2024
    - Last Modified: Fri Sep 22 09:07:17 GMT 2023
    - 4.9K bytes
    - Viewed (0)
  5. docs_src/python_types/tutorial011_py39.py

    
    class User(BaseModel):
        id: int
        name: str = "John Doe"
        signup_ts: Union[datetime, None] = None
        friends: list[int] = []
    
    
    external_data = {
        "id": "123",
        "signup_ts": "2017-06-01 12:22",
        "friends": [1, "2", b"3"],
    }
    user = User(**external_data)
    print(user)
    # > User id=123 name='John Doe' signup_ts=datetime.datetime(2017, 6, 1, 12, 22) friends=[1, 2, 3]
    print(user.id)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Sep 02 15:56:35 GMT 2023
    - 492 bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/extra-models.md

    ```
    
    就能以如下方式调用:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    现在,变量 `user_dict`中的就是包含数据的**字典**(变量 `user_dict` 是字典,不是 Pydantic 模型对象)。
    
    以如下方式调用:
    
    ```Python
    print(user_dict)
    ```
    
    输出的就是 Python **字典**:
    
    ```Python
    {
        'username': 'john',
        'password': 'secret',
        'email': 'john.doe@example.com',
        'full_name': None,
    }
    ```
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Apr 01 01:15:53 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  7. docs/de/docs/tutorial/extra-models.md

    Pydantic-Modelle haben eine `.dict()`-Methode, die ein `dict` mit den Daten des Modells zurückgibt.
    
    Wenn wir also ein Pydantic-Objekt `user_in` erstellen, etwa so:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    und wir rufen seine `.dict()`-Methode auf:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:26:47 GMT 2024
    - 8.7K bytes
    - Viewed (0)
  8. docs/ja/docs/tutorial/extra-models.md

    `user_in`は`UserIn`クラスのPydanticモデルです。
    
    Pydanticモデルには、モデルのデータを含む`dict`を返す`.dict()`メソッドがあります。
    
    そこで、以下のようなPydanticオブジェクト`user_in`を作成すると:
    
    ```Python
    user_in = UserIn(username="john", password="secret", email="john.doe@example.com")
    ```
    
    そして呼び出すと:
    
    ```Python
    user_dict = user_in.dict()
    ```
    
    これで変数`user_dict`のデータを持つ`dict`ができました。(これはPydanticモデルのオブジェクトの代わりに`dict`です)。
    
    そして呼び出すと:
    
    ```Python
    print(user_dict)
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Mon Jan 15 15:36:32 GMT 2024
    - 6.7K bytes
    - Viewed (0)
  9. docs_src/security/tutorial003_an_py39.py

    from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
    from pydantic import BaseModel
    
    fake_users_db = {
        "johndoe": {
            "username": "johndoe",
            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        },
        "alice": {
            "username": "alice",
            "full_name": "Alice Wonderson",
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  10. docs/ru/docs/python-types.md

    ## Мотивация
    
    Давайте начнем с простого примера:
    
    ```Python
    {!../../../docs_src/python_types/tutorial001.py!}
    ```
    
    Вызов этой программы выводит:
    
    ```
    John Doe
    ```
    
    Функция делает следующее:
    
    * Принимает `first_name` и `last_name`.
    * Преобразует первую букву содержимого каждой переменной в верхний регистр с `title()`.
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 14.6K bytes
    - Viewed (0)
Back to top