Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1551 - 1560 of 2,000 for Fastapi (0.08 sec)

  1. tests/test_tutorial/test_path_operation_configurations/test_tutorial002b.py

    from fastapi.testclient import TestClient
    
    from docs_src.path_operation_configuration.tutorial002b import app
    
    client = TestClient(app)
    
    
    def test_get_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == ["Portal gun", "Plumbus"]
    
    
    def test_get_users():
        response = client.get("/users/")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.7K bytes
    - Viewed (0)
  2. docs/en/docs/reference/openapi/models.md

    # OpenAPI `models`
    
    OpenAPI Pydantic models used to generate and validate the generated OpenAPI.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Oct 18 12:36:40 UTC 2023
    - 125 bytes
    - Viewed (0)
  3. docs_src/app_testing/test_main.py

    from fastapi.testclient import TestClient
    
    from .main import app
    
    client = TestClient(app)
    
    
    def test_read_main():
        response = client.get("/")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 238 bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/path-params.md

    /// check | "確認"
    
    繰り返しになりますが、Python型宣言を使用するだけで、**FastAPI**は対話的なAPIドキュメントを自動的に生成します(Swagger UIを統合)。
    
    パスパラメータが整数として宣言されていることに注意してください。
    
    ///
    
    ## 標準であることのメリット、ドキュメンテーションの代替物
    
    また、生成されたスキーマが <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md" class="external-link" target="_blank">OpenAPI</a> 標準に従っているので、互換性のあるツールが多数あります。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  5. docs/pt/docs/how-to/custom-request-and-route.md

    Por exemplo, se você quiser ler ou manipular o corpo da requisição antes que ele seja processado pela sua aplicação.
    
    /// danger | Perigo
    
    Isso é um recurso "avançado".
    
    Se você for um iniciante em **FastAPI** você deve considerar pular essa seção.
    
    ///
    
    ## Casos de Uso
    
    Alguns casos de uso incluem:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Oct 22 17:33:00 UTC 2024
    - 4.9K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_generate_clients/test_tutorial003.py

    from fastapi.testclient import TestClient
    
    from docs_src.generate_clients.tutorial003 import app
    
    client = TestClient(app)
    
    
    def test_post_items():
        response = client.post("/items/", json={"name": "Foo", "price": 5})
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Item received"}
    
    
    def test_post_users():
        response = client.post(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/openapi-callbacks.md

        * Dies erfolgt durch Senden eines POST-Requests (von *Ihrer API*) an eine *externe API*, die von diesem externen Entwickler bereitgestellt wird (das ist der „Callback“).
    
    ## Die normale **FastAPI**-Anwendung
    
    Sehen wir uns zunächst an, wie die normale API-Anwendung aussehen würde, bevor wir den Callback hinzufügen.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.8K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_behind_a_proxy/test_tutorial003.py

    from dirty_equals import IsOneOf
    from fastapi.testclient import TestClient
    
    from docs_src.behind_a_proxy.tutorial003 import app
    
    client = TestClient(app)
    
    
    def test_main():
        response = client.get("/app")
        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_extra_models/test_tutorial004.py

    from fastapi.testclient import TestClient
    
    from docs_src.extra_models.tutorial004 import app
    
    client = TestClient(app)
    
    
    def test_get_items():
        response = client.get("/items/")
        assert response.status_code == 200, response.text
        assert response.json() == [
            {"name": "Foo", "description": "There comes my hero"},
            {"name": "Red", "description": "It's my aeroplane"},
        ]
    
    
    def test_openapi_schema():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  10. docs/ja/docs/tutorial/body-fields.md

    ## `Field`のインポート
    
    まず、以下のようにインポートします:
    
    ```Python hl_lines="4"
    {!../../docs_src/body_fields/tutorial001.py!}
    ```
    
    /// warning | "注意"
    
    `Field`は他の全てのもの(`Query`、`Path`、`Body`など)とは違い、`fastapi`からではなく、`pydantic`から直接インポートされていることに注意してください。
    
    ///
    
    ## モデルの属性の宣言
    
    以下のように`Field`をモデルの属性として使用することができます:
    
    ```Python hl_lines="11 12 13 14"
    {!../../docs_src/body_fields/tutorial001.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top