Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 201 - 210 of 691 for idct (0.02 seconds)

  1. docs/zh-hant/docs/advanced/additional-responses.md

    但對於這些額外回應,你必須直接回傳像 `JSONResponse` 這樣的 `Response`,並包含你的狀態碼與內容。
    
    ## 使用 `model` 的額外回應 { #additional-response-with-model }
    
    你可以在你的「路徑操作裝飾器」中傳入參數 `responses`。
    
    它接收一個 `dict`:鍵是各回應的狀態碼(例如 `200`),值是另一個 `dict`,其中包含每個回應的資訊。
    
    每個回應的 `dict` 都可以有一個鍵 `model`,包含一個 Pydantic 模型,與 `response_model` 類似。
    
    **FastAPI** 會取用該模型、產生其 JSON Schema,並把它放到 OpenAPI 中正確的位置。
    
    例如,要宣告一個狀態碼為 `404` 的額外回應,並使用 Pydantic 模型 `Message`,你可以這樣寫:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:05:38 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  2. docs/fr/docs/advanced/response-directly.md

    # Renvoyer directement une réponse { #return-a-response-directly }
    
    Lorsque vous créez un *chemin d'accès* **FastAPI**, vous pouvez normalement renvoyer n'importe quelle donnée : un `dict`, une `list`, un modèle Pydantic, un modèle de base de données, etc.
    
    Si vous déclarez un [Modèle de réponse](../tutorial/response-model.md), FastAPI l'utilise pour sérialiser les données en JSON, en utilisant Pydantic.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:37:13 GMT 2026
    - 4.8K bytes
    - Click Count (0)
  3. fastapi/sse.py

    from starlette.responses import StreamingResponse
    
    # Canonical SSE event schema matching the OpenAPI 3.2 spec
    # (Section 4.14.4 "Special Considerations for Server-Sent Events")
    _SSE_EVENT_SCHEMA: dict[str, Any] = {
        "type": "object",
        "properties": {
            "data": {"type": "string"},
            "event": {"type": "string"},
            "id": {"type": "string"},
            "retry": {"type": "integer", "minimum": 0},
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 09:21:52 GMT 2026
    - 6.2K bytes
    - Click Count (0)
  4. src/main/java/org/codelibs/fess/app/web/api/admin/dict/synonym/DownloadBody.java

     * either express or implied. See the License for the specific language
     * governing permissions and limitations under the License.
     */
    package org.codelibs.fess.app.web.api.admin.dict.synonym;
    
    import org.codelibs.fess.app.web.admin.dict.synonym.DownloadForm;
    
    /**
     * Download body for synonym dictionary API operations.
     * This class extends the DownloadForm to provide request body handling
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Jul 17 08:28:31 GMT 2025
    - 1.1K bytes
    - Click Count (0)
  5. scripts/label_approved.py

    default_config = {"approved-2": LabelSettings(await_label="awaiting-review", number=2)}
    
    
    class Settings(BaseSettings):
        github_repository: str
        token: SecretStr
        debug: bool | None = False
        config: dict[str, LabelSettings] | Literal[""] = default_config
    
    
    settings = Settings()
    if settings.debug:
        logging.basicConfig(level=logging.DEBUG)
    else:
        logging.basicConfig(level=logging.INFO)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Jun 17 07:50:19 GMT 2025
    - 2.2K bytes
    - Click Count (0)
  6. src/main/java/org/codelibs/fess/app/service/CharMappingService.java

    import org.codelibs.fess.Constants;
    import org.codelibs.fess.app.pager.CharMappingPager;
    import org.codelibs.fess.dict.DictionaryFile.PagingList;
    import org.codelibs.fess.dict.DictionaryManager;
    import org.codelibs.fess.dict.mapping.CharMappingFile;
    import org.codelibs.fess.dict.mapping.CharMappingItem;
    import org.codelibs.fess.mylasta.direction.FessConfig;
    import org.dbflute.optional.OptionalEntity;
    
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Thu Aug 07 03:06:29 GMT 2025
    - 6.1K bytes
    - Click Count (0)
  7. src/main/webapp/WEB-INF/view/admin/dict/synonym/admin_dict_synonym.jsp

        <jsp:include page="/WEB-INF/view/common/admin/sidebar.jsp">
            <jsp:param name="menuCategoryType" value="system"/>
            <jsp:param name="menuType" value="dict"/>
        </jsp:include>
        <main class="content-wrapper">
            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
    Created: Tue Mar 31 13:07:34 GMT 2026
    - Last Modified: Mon Feb 23 08:03:44 GMT 2026
    - 10.2K bytes
    - Click Count (0)
  8. docs/zh/docs/tutorial/body-updates.md

    比如,`item.model_dump(exclude_unset=True)`。
    
    这会生成一个 `dict`,只包含创建 `item` 模型时显式设置的数据,不包含默认值。
    
    然后再用它生成一个只含已设置(在请求中发送)数据、且省略默认值的 `dict`:
    
    {* ../../docs_src/body_updates/tutorial002_py310.py hl[32] *}
    
    ### 使用 Pydantic 的 `update` 参数 { #using-pydantics-update-parameter }
    
    接下来,用 `.model_copy()` 为已有模型创建副本,并传入 `update` 参数,值为包含更新数据的 `dict`。
    
    例如,`stored_item_model.model_copy(update=update_data)`:
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  9. docs/es/docs/tutorial/dependencies/classes-as-dependencies.md

    ## Un `dict` del ejemplo anterior { #a-dict-from-the-previous-example }
    
    En el ejemplo anterior, estábamos devolviendo un `dict` de nuestra dependencia ("dependable"):
    
    {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[9] *}
    
    Pero luego obtenemos un `dict` en el parámetro `commons` de la *path operation function*.
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Feb 13 13:41:41 GMT 2026
    - 7.1K bytes
    - Click Count (0)
  10. tests/test_dependency_yield_except_httpexception.py

    
    @app.put("/invalid-user/{user_id}")
    def put_invalid_user(
        user_id: str, name: str = Body(), db: dict = Depends(get_database)
    ):
        db[user_id] = name
        raise HTTPException(status_code=400, detail="Invalid user")
    
    
    @app.put("/user/{user_id}")
    def put_user(user_id: str, name: str = Body(), db: dict = Depends(get_database)):
        db[user_id] = name
        return {"message": "OK"}
    
    
    @pytest.fixture(autouse=True)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Mon Sep 29 03:29:38 GMT 2025
    - 1.9K bytes
    - Click Count (0)
Back to Top