Search Options

Results per page
Sort
Preferred Languages
Advance

Results 411 - 420 of 924 for docs_src (0.46 sec)

  1. docs/ko/docs/tutorial/dependencies/classes-as-dependencies.md

    그래서, 우리는 위 예제에서의 `common_paramenters` 의존성을 클래스 `CommonQueryParams`로 바꿀 수 있습니다.
    
    {* ../../docs_src/dependencies/tutorial002.py hl[11:15] *}
    
    클래스의 인스턴스를 생성하는 데 사용되는 `__init__` 메서드에 주목하기 바랍니다:
    
    {* ../../docs_src/dependencies/tutorial002.py hl[12] *}
    
    ...이전 `common_parameters`와 동일한 매개변수를 가집니다:
    
    {* ../../docs_src/dependencies/tutorial001.py hl[9] *}
    
    이 매개변수들은 **FastAPI**가 의존성을 "해결"하기 위해 사용할 것입니다
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  2. docs/es/docs/advanced/response-cookies.md

    ## Usar un parámetro `Response` { #use-a-response-parameter }
    
    Puedes declarar un parámetro de tipo `Response` en tu *path operation function*.
    
    Y luego puedes establecer cookies en ese objeto de response *temporal*.
    
    {* ../../docs_src/response_cookies/tutorial002_py39.py hl[1, 8:9] *}
    
    Y entonces puedes devolver cualquier objeto que necesites, como normalmente lo harías (un `dict`, un modelo de base de datos, etc).
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 2.5K bytes
    - Viewed (0)
  3. docs/zh/docs/advanced/security/http-basic-auth.md

    ## 简单的 HTTP 基础授权
    
    * 导入 `HTTPBasic` 与 `HTTPBasicCredentials`
    * 使用 `HTTPBasic` 创建**安全概图**
    * 在*路径操作*的依赖项中使用 `security`
    * 返回类型为 `HTTPBasicCredentials` 的对象:
        * 包含发送的 `username` 与 `password`
    
    {* ../../docs_src/security/tutorial006_an_py39.py hl[4,8,12] *}
    
    第一次打开 URL(或在 API 文档中点击 **Execute** 按钮)时,浏览器要求输入用户名与密码:
    
    <img src="/img/tutorial/security/image12.png">
    
    ## 检查用户名
    
    以下是更完整的示例。
    
    使用依赖项检查用户名与密码是否正确。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_response_cookies/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_cookies.tutorial001_py39 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 408 bytes
    - Viewed (0)
  5. tests/test_tutorial/test_response_cookies/test_tutorial002.py

    from fastapi.testclient import TestClient
    
    from docs_src.response_cookies.tutorial002_py39 import app
    
    client = TestClient(app)
    
    
    def test_path_operation():
        response = client.post("/cookie-and-object/")
        assert response.status_code == 200, response.text
        assert response.json() == {"message": "Come to the dark side, we have cookies"}
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 419 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_testing/test_tutorial001.py

    from docs_src.app_testing.tutorial001_py39 import client, test_read_main
    
    
    def test_main():
        test_read_main()
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/": {
                    "get": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 826 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_wsgi/test_tutorial001.py

    from fastapi.testclient import TestClient
    
    from docs_src.wsgi.tutorial001_py39 import app
    
    client = TestClient(app)
    
    
    def test_flask():
        response = client.get("/v1/")
        assert response.status_code == 200, response.text
        assert response.text == "Hello, World from Flask!"
    
    
    def test_app():
        response = client.get("/v2")
        assert response.status_code == 200, response.text
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 441 bytes
    - Viewed (1)
  8. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

    例えば、これを使ってデータベースセッションを作成し、終了後にそれを閉じることができます。
    
    レスポンスを送信する前に`yield`文を含む前のコードのみが実行されます。
    
    {* ../../docs_src/dependencies/tutorial007.py hl[2,3,4] *}
    
    生成された値は、*path operations*や他の依存関係に注入されるものです:
    
    {* ../../docs_src/dependencies/tutorial007.py hl[4] *}
    
    `yield`文に続くコードは、レスポンスが送信された後に実行されます:
    
    {* ../../docs_src/dependencies/tutorial007.py hl[5,6] *}
    
    /// tip | 豆知識
    
    `async`や通常の関数を使用することができます。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  9. docs/ru/docs/tutorial/request-forms.md

    ```
    
    ///
    
    ## Импорт `Form` { #import-form }
    
    Импортируйте `Form` из `fastapi`:
    
    {* ../../docs_src/request_forms/tutorial001_an_py39.py hl[3] *}
    
    ## Определение параметров `Form` { #define-form-parameters }
    
    Создайте параметры формы так же, как это делается для `Body` или `Query`:
    
    {* ../../docs_src/request_forms/tutorial001_an_py39.py hl[9] *}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Sep 30 11:24:39 UTC 2025
    - 4.4K bytes
    - Viewed (0)
  10. docs/en/docs/tutorial/extra-data-types.md

    Here's an example *path operation* with parameters using some of the above types.
    
    {* ../../docs_src/extra_data_types/tutorial001_an_py310.py hl[1,3,12:16] *}
    
    Note that the parameters inside the function have their natural data type, and you can, for example, perform normal date manipulations, like:
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Aug 31 09:15:41 UTC 2025
    - 2.7K bytes
    - Viewed (0)
Back to top