Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 261 - 264 of 264 for tutorial004_py310 (0.5 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. docs/zh/docs/tutorial/query-params-str-validations.md

    # 查询参数和字符串校验
    
    **FastAPI** 允许你为参数声明额外的信息和校验。
    
    让我们以下面的应用程序为例:
    
    {* ../../docs_src/query_params_str_validations/tutorial001_py310.py hl[7] *}
    
    查询参数 `q` 的类型为 `str`,默认值为 `None`,因此它是可选的。
    
    ## 额外的校验
    
    我们打算添加约束条件:即使 `q` 是可选的,但只要提供了该参数,则该参数值**不能超过50个字符的长度**。
    
    ### 导入 `Query`
    
    为此,首先从 `fastapi` 导入 `Query`:
    
    {* ../../docs_src/query_params_str_validations/tutorial002.py hl[1] *}
    
    ## 使用 `Query` 作为默认值
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Sat Feb 15 16:23:59 GMT 2025
    - 7.7K bytes
    - Click Count (0)
  2. docs/ru/docs/advanced/custom-response.md

    #### Вернуть `HTMLResponse` напрямую { #return-an-htmlresponse-directly }
    
    Например, это может быть что-то вроде:
    
    {* ../../docs_src/custom_response/tutorial004_py39.py hl[7,21,23] *}
    
    В этом примере функция `generate_html_response()` уже генерирует и возвращает `Response` вместо возврата HTML в `str`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 19.7K bytes
    - Click Count (0)
  3. docs/pt/docs/advanced/custom-response.md

    #### Retornando uma `HTMLResponse` diretamente { #return-an-htmlresponse-directly }
    
    Por exemplo, poderia ser algo como:
    
    {* ../../docs_src/custom_response/tutorial004_py39.py hl[7,21,23] *}
    
    Neste exemplo, a função `generate_html_response()` já cria e retorna uma `Response` em vez de retornar o HTML em uma `str`.
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 13.8K bytes
    - Click Count (0)
  4. docs/de/docs/advanced/behind-a-proxy.md

    Wenn Sie nicht möchten, dass **FastAPI** einen automatischen Server inkludiert, welcher `root_path` verwendet, können Sie den Parameter `root_path_in_servers=False` verwenden:
    
    {* ../../docs_src/behind_a_proxy/tutorial004_py39.py hl[9] *}
    
    Dann wird er nicht in das OpenAPI-Schema aufgenommen.
    
    ## Mounten einer Unteranwendung { #mounting-a-sub-application }
    
    Created: Sun Dec 28 07:19:09 GMT 2025
    - Last Modified: Wed Dec 17 20:41:43 GMT 2025
    - 18.6K bytes
    - Click Count (0)
Back to Top