Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 96 for Bohn (0.14 sec)

  1. docs_src/security/tutorial003_an.py

    from pydantic import BaseModel
    from typing_extensions import Annotated
    
    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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  2. docs_src/security/tutorial003_an_py310.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 May 05 07:19:11 GMT 2024
    - Last Modified: Tue Mar 26 16:56:53 GMT 2024
    - 2.5K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_security/test_tutorial003_an.py

        response = client.get("/users/me", headers={"Authorization": "Bearer johndoe"})
        assert response.status_code == 200, response.text
        assert response.json() == {
            "username": "johndoe",
            "full_name": "John Doe",
            "email": "******@****.***",
            "hashed_password": "fakehashedsecret",
            "disabled": False,
        }
    
    
    def test_incorrect_token():
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 8K bytes
    - Viewed (0)
  4. tests/test_sub_callbacks.py

    
    app.include_router(subrouter, callbacks=events_callback_router.routes)
    
    client = TestClient(app)
    
    
    def test_get():
        response = client.post(
            "/invoices/", json={"id": "fooinvoice", "customer": "John", "total": 5.3}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {"msg": "Invoice received"}
    
    
    def test_openapi_schema():
        with client:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 13.8K bytes
    - Viewed (0)
  5. docs/ja/docs/python-types.md

        もしあなたがPythonの専門家で、すでに型ヒントについてすべて知っているのであれば、次の章まで読み飛ばしてください。
    
    ## 動機
    
    簡単な例から始めてみましょう:
    
    ```Python
    {!../../../docs_src/python_types/tutorial001.py!}
    ```
    
    このプログラムを実行すると以下が出力されます:
    
    ```
    John Doe
    ```
    
    この関数は以下のようなことを行います:
    
    * `first_name`と`last_name`を取得します。
    * `title()`を用いて、それぞれの最初の文字を大文字に変換します。
    * 真ん中にスペースを入れて<abbr title="次から次へと中身を入れて一つにまとめる">連結</abbr>します。
    
    ```Python hl_lines="2"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  6. docs/pl/docs/features.md

    
    # Model Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    A one będą mogły zostać później użyte w następujący sposób:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  7. docs/ru/docs/features.md

        return user_id
    
    
    # Модель Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Это можно использовать так:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info "Информация"
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005.py

            "/users/me", headers={"Authorization": f"Bearer {access_token}"}
        )
        assert response.status_code == 200, response.text
        assert response.json() == {
            "username": "johndoe",
            "full_name": "John Doe",
            "email": "******@****.***",
            "disabled": False,
        }
    
    
    def test_incorrect_token():
        response = client.get("/users/me", headers={"Authorization": "Bearer nonexistent"})
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 15.4K bytes
    - Viewed (0)
  9. docs/es/docs/features.md

        return user_id
    
    
    # Un modelo de Pydantic
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    Este puede ser usado como:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 10.9K bytes
    - Viewed (0)
  10. docs/fa/docs/features.md

    
    # A Pydantic model
    class User(BaseModel):
        id: int
        name: str
        joined: date
    ```
    
    که سپس میتوان به این شکل از آن استفاده کرد:
    
    ```Python
    my_user: User = User(id=3, name="John Doe", joined="2018-07-19")
    
    second_user_data = {
        "id": 4,
        "name": "Mary",
        "joined": "2018-11-30",
    }
    
    my_second_user: User = User(**second_user_data)
    ```
    
    !!! info
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 15K bytes
    - Viewed (0)
Back to top