Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1391 - 1400 of 1,962 for fastapi (0.05 sec)

  1. docs/ja/docs/tutorial/debugging.md

    ///
    
    ## デバッガーでコードを実行
    
    コードから直接Uvicornサーバーを実行しているため、デバッガーから直接Pythonプログラム (FastAPIアプリケーション) を呼び出せます。
    
    ---
    
    例えば、Visual Studio Codeでは、次のことが可能です:
    
    * 「デバッグ」パネルに移動。
    * 「構成の追加...」
    * 「Python」を選択。
    * オプション「`Python: Current File (Integrated Terminal)`」を指定してデバッガーを実行。
    
    すると、**FastAPI** コードでサーバーが起動され、ブレークポイントで停止したりするでしょう。
    
    以下の様な画面になります:
    
    <img src="/img/tutorial/debugging/image01.png">
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_security/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.security.tutorial001 import app
    
    client = TestClient(app)
    
    
    def test_no_token():
        response = client.get("/items")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    def test_token():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_dependencies/test_tutorial008c_an_py39.py

    import pytest
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    from ...utils import needs_py39
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial008c_an_py39 import app
    
        client = TestClient(app)
        return client
    
    
    @needs_py39
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Feb 24 23:06:37 UTC 2024
    - 1.2K bytes
    - Viewed (0)
  4. docs_src/dataclasses/tutorial003.py

    from dataclasses import field  # (1)
    from typing import List, Union
    
    from fastapi import FastAPI
    from pydantic.dataclasses import dataclass  # (2)
    
    
    @dataclass
    class Item:
        name: str
        description: Union[str, None] = None
    
    
    @dataclass
    class Author:
        name: str
        items: List[Item] = field(default_factory=list)  # (3)
    
    
    app = FastAPI()
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Wed Jul 31 14:09:15 UTC 2024
    - 1.4K bytes
    - Viewed (0)
  5. docs/fr/docs/async.md

    ---
    
    **Note** : vous pouvez mélanger `def` et `async def` dans vos *fonctions de chemin* autant que nécessaire, **FastAPI** saura faire ce qu'il faut avec.
    
    Au final, peu importe le cas parmi ceux ci-dessus, **FastAPI** fonctionnera de manière asynchrone et sera extrêmement rapide.
    
    Mais si vous suivez bien les instructions ci-dessus, alors **FastAPI** pourra effectuer quelques optimisations et ainsi améliorer les performances.
    
    ## Détails techniques
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Aug 06 04:48:30 UTC 2024
    - 25.4K bytes
    - Viewed (0)
  6. docs_src/app_testing/app_b_py310/main.py

    from fastapi import FastAPI, Header, HTTPException
    from pydantic import BaseModel
    
    fake_secret_token = "coneofsilence"
    
    fake_db = {
        "foo": {"id": "foo", "title": "Foo", "description": "There goes my hero"},
        "bar": {"id": "bar", "title": "Bar", "description": "The bartenders"},
    }
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        id: str
        title: str
        description: str | None = None
    
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 09 14:44:08 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  7. docs/em/docs/deployment/index.md

    # 🛠️
    
    🛠️ **FastAPI** 🈸 📶 ⏩.
    
    ## ⚫️❔ 🔨 🛠️ ⛓
    
    **🛠️** 🈸 ⛓ 🎭 💪 📶 ⚒ ⚫️ **💪 👩‍💻**.
    
    **🕸 🛠️**, ⚫️ 🛎 🔌 🚮 ⚫️ **🛰 🎰**, ⏮️ **💽 📋** 👈 🚚 👍 🎭, ⚖, ♒️, 👈 👆 **👩‍💻** 💪 **🔐** 🈸 ♻ &amp; 🍵 🔁 ⚖️ ⚠.
    
    👉 🔅 **🛠️** ▶️, 🌐❔ 👆 🕧 🔀 📟, 💔 ⚫️ &amp; ♻ ⚫️, ⛔️ &amp; 🔁 🛠️ 💽, ♒️.
    
    ## 🛠️ 🎛
    
    📤 📚 🌌 ⚫️ ⚓️ 🔛 👆 🎯 ⚙️ 💼 &amp; 🧰 👈 👆 ⚙️.
    
    👆 💪 **🛠️ 💽** 👆 ⚙️ 🌀 🧰, 👆 💪 ⚙️ **☁ 🐕‍🦺** 👈 🔨 🍕 👷 👆, ⚖️ 🎏 💪 🎛.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jun 24 14:47:15 UTC 2023
    - 921 bytes
    - Viewed (0)
  8. fastapi/dependencies/models.py

    from dataclasses import dataclass, field
    from typing import Any, Callable, List, Optional, Sequence, Tuple
    
    from fastapi._compat import ModelField
    from fastapi.security.base import SecurityBase
    
    
    @dataclass
    class SecurityRequirement:
        security_scheme: SecurityBase
        scopes: Optional[Sequence[str]] = None
    
    
    @dataclass
    class Dependant:
        path_params: List[ModelField] = field(default_factory=list)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 31 20:19:30 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  9. docs/zh/docs/deployment/index.md

    # 部署
    
    部署 **FastAPI** 应用程序相对容易。
    
    ## 部署是什么意思
    
    **部署**应用程序意味着执行必要的步骤以使其**可供用户使用**。
    
    对于**Web API**来说,通常涉及将上传到**云服务器**中,搭配一个性能和稳定性都不错的**服务器程序**,以便你的**用户**可以高效地**访问**你的应用程序,而不会出现中断或其他问题。
    
    这与**开发**阶段形成鲜明对比,在**开发**阶段,你不断更改代码、破坏代码、修复代码, 来回停止和重启服务器等。
    
    ## 部署策略
    
    根据你的使用场景和使用的工具,有多种方法可以实现此目的。
    
    你可以使用一些工具自行**部署服务器**,你也可以使用能为你完成部分工作的**云服务**,或其他可能的选项。
    
    我将向你展示在部署 **FastAPI** 应用程序时你可能应该记住的一些主要概念(尽管其中大部分适用于任何其他类型的 Web 应用程序)。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Jan 09 15:37:29 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_response_model/test_tutorial003_01.py

    from dirty_equals import IsDict, IsOneOf
    from fastapi.testclient import TestClient
    
    from docs_src.response_model.tutorial003_01 import app
    
    client = TestClient(app)
    
    
    def test_post_user():
        response = client.post(
            "/user/",
            json={
                "username": "foo",
                "password": "fighter",
                "email": "******@****.***",
                "full_name": "Grave Dohl",
            },
        )
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Aug 04 20:47:07 UTC 2023
    - 5.6K bytes
    - Viewed (0)
Back to top