Search Options

Results per page
Sort
Preferred Languages
Advance

Results 611 - 620 of 924 for docs_src (0.04 sec)

  1. docs/zh/docs/tutorial/dependencies/index.md

    * 类型为 `int` 的可选查询参数 `skip`,默认值是 `0`
    * 类型为 `int` 的可选查询参数 `limit`,默认值是 `100`
    
    然后,依赖项函数返回包含这些值的 `dict`。
    
    ### 导入 `Depends`
    
    {* ../../docs_src/dependencies/tutorial001.py hl[3] *}
    
    ### 声明依赖项
    
    与在*路径操作函数*参数中使用 `Body`、`Query` 的方式相同,声明依赖项需要使用 `Depends` 和一个新的参数:
    
    {* ../../docs_src/dependencies/tutorial001.py hl[15,20] *}
    
    虽然,在路径操作函数的参数中使用 `Depends` 的方式与 `Body`、`Query` 相同,但 `Depends` 的工作方式略有不同。
    
    这里只能传给 Depends 一个参数。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 7K bytes
    - Viewed (0)
  2. scripts/playwright/separate_openapi_schemas/image02.py

            path="docs/en/docs/img/tutorial/separate-openapi-schemas/image02.png"
        )
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["uvicorn", "docs_src.separate_openapi_schemas.tutorial001:app"]
    )
    try:
        with sync_playwright() as playwright:
            run(playwright)
    finally:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Sep 13 09:14:46 UTC 2024
    - 1K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_extra_models/test_tutorial005.py

    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial005_py39"),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.extra_models.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test_get_items(client: TestClient):
        response = client.get("/keyword-weights/")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_background_tasks/test_tutorial002.py

            "tutorial002_an_py39",
            pytest.param("tutorial002_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.background_tasks.{request.param}")
    
        client = TestClient(mod.app)
        return client
    
    
    def test(client: TestClient):
        log = Path("log.txt")
        if log.is_file():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 996 bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/dependencies/global-dependencies.md

    In that case, they will be applied to all the *path operations* in the application:
    
    {* ../../docs_src/dependencies/tutorial012_an_py39.py hl[17] *}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.1K bytes
    - Viewed (0)
  6. docs/zh/docs/tutorial/request-forms.md

    例如,`pip install python-multipart`。
    
    ///
    
    ## 导入 `Form`
    
    从 `fastapi` 导入 `Form`:
    
    {* ../../docs_src/request_forms/tutorial001.py hl[1] *}
    
    ## 定义 `Form` 参数
    
    创建表单(`Form`)参数的方式与 `Body` 和 `Query` 一样:
    
    {* ../../docs_src/request_forms/tutorial001.py hl[7] *}
    
    例如,OAuth2 规范的 "密码流" 模式规定要通过表单字段发送 `username` 和 `password`。
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 2.1K bytes
    - Viewed (0)
  7. scripts/playwright/sql_databases/image02.py

        page.screenshot(path="docs/en/docs/img/tutorial/sql-databases/image02.png")
    
        # ---------------------
        context.close()
        browser.close()
    
    
    process = subprocess.Popen(
        ["fastapi", "run", "docs_src/sql_databases/tutorial002.py"],
    )
    try:
        for _ in range(3):
            try:
                response = httpx.get("http://localhost:8000/docs")
            except httpx.ConnectError:
                time.sleep(1)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Oct 09 19:44:42 UTC 2024
    - 1.1K bytes
    - Viewed (0)
  8. docs/ru/docs/how-to/authentication-error-status-code.md

    Например, вы можете создать подкласс `HTTPBearer`, который будет возвращать ошибку `403 Forbidden` вместо стандартной `401 Unauthorized`:
    
    {* ../../docs_src/authentication_error_status_code/tutorial001_an_py39.py hl[9:13] *}
    
    /// tip | Совет
    
    Обратите внимание, что функция возвращает экземпляр исключения, не вызывает его. Выброс выполняется остальным внутренним кодом.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Thu Dec 11 21:25:03 UTC 2025
    - 1.8K bytes
    - Viewed (0)
  9. docs/tr/docs/advanced/wsgi.md

    ## `WSGIMiddleware` Kullanımı
    
    `WSGIMiddleware`'ı projenize dahil edin.
    
    Ardından WSGI (örneğin Flask) uygulamanızı middleware ile sarmalayın.
    
    Son olarak da bir yol altında bağlama işlemini gerçekleştirin.
    
    {* ../../docs_src/wsgi/tutorial001.py hl[2:3,23] *}
    
    ## Kontrol Edelim
    
    Artık `/v1/` yolunun altındaki her istek Flask uygulaması tarafından işlenecektir.
    
    Geri kalanı ise **FastAPI** tarafından işlenecektir.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Mon Nov 18 02:25:44 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/dependencies/global-dependencies.md

    Nesse caso, elas serão aplicadas a todas as *operações de rota* da aplicação:
    
    {* ../../docs_src/dependencies/tutorial012_an_py39.py hl[17] *}
    
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 1.2K bytes
    - Viewed (0)
Back to top