Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 478 for dica (0.02 sec)

  1. src/main/java/org/codelibs/fess/app/web/api/admin/dict/synonym/ApiAdminDictSynonymAction.java

    import org.codelibs.fess.app.web.CrudMode;
    import org.codelibs.fess.app.web.admin.dict.synonym.UploadForm;
    import org.codelibs.fess.app.web.api.ApiResult;
    import org.codelibs.fess.app.web.api.admin.FessApiAdminAction;
    import org.codelibs.fess.dict.synonym.SynonymFile;
    import org.codelibs.fess.dict.synonym.SynonymItem;
    import org.lastaflute.web.Execute;
    import org.lastaflute.web.response.JsonResponse;
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 7.1K bytes
    - Viewed (0)
  2. docs/zh/docs/tutorial/encoder.md

    在某些情况下,您可能需要将数据类型(如Pydantic模型)转换为与JSON兼容的数据类型(如`dict`、`list`等)。
    
    比如,如果您需要将其存储在数据库中。
    
    对于这种要求, **FastAPI**提供了`jsonable_encoder()`函数。
    
    ## 使用`jsonable_encoder`
    
    让我们假设你有一个数据库名为`fake_db`,它只能接收与JSON兼容的数据。
    
    例如,它不接收`datetime`这类的对象,因为这些对象与JSON不兼容。
    
    因此,`datetime`对象必须将转换为包含<a href="https://en.wikipedia.org/wiki/ISO_8601" class="external-link" target="_blank">ISO格式化</a>的`str`类型对象。
    
    同样,这个数据库也不会接收Pydantic模型(带有属性的对象),而只接收`dict`。
    
    对此你可以使用`jsonable_encoder`。
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  3. docs/ja/docs/tutorial/extra-models.md

    #### 別のモデルからつくるPydanticモデル
    
    上述の例では`user_in.dict()`から`user_dict`をこのコードのように取得していますが:
    
    ```Python
    user_dict = user_in.dict()
    UserInDB(**user_dict)
    ```
    
    これは以下と同等です:
    
    ```Python
    UserInDB(**user_in.dict())
    ```
    
    ...なぜなら`user_in.dict()`は`dict`であり、`**`を付与して`UserInDB`を渡してPythonに「展開」させているからです。
    
    そこで、別のPydanticモデルのデータからPydanticモデルを取得します。
    
    #### `dict`の展開と追加引数
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.7K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/encoder.md

    같은 방식으로 이 데이터베이스는 Pydantic 모델(속성이 있는 객체)을 받지 않고, `dict` 만을 받습니다.
    
    이를 위해 `jsonable_encoder` 를 사용할 수 있습니다.
    
    Pydantic 모델과 같은 객체를 받고 JSON 호환 가능한 버전으로 반환합니다:
    
    ```Python hl_lines="5  22"
    {!../../docs_src/encoder/tutorial001.py!}
    ```
    
    이 예시는 Pydantic 모델을 `dict`로, `datetime` 형식을 `str`로 변환합니다.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 1.9K bytes
    - Viewed (0)
  5. tests/test_invalid_sequence_param.py

            @app.get("/items/")
            def read_items(q: Dict[str, Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_simple_dict():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: Optional[dict] = Query(default=None)):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri May 13 23:38:22 UTC 2022
    - 1.2K bytes
    - Viewed (0)
  6. fastapi/_compat.py

        ) -> Any:
            return {}
    
        def get_model_definitions(
            *,
            flat_models: Set[Union[Type[BaseModel], Type[Enum]]],
            model_name_map: Dict[Union[Type[BaseModel], Type[Enum]], str],
        ) -> Dict[str, Any]:
            definitions: Dict[str, Dict[str, Any]] = {}
            for model in flat_models:
                m_schema, m_definitions, m_nested_models = model_process_schema(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Oct 12 09:36:32 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  7. fastapi/types.py

    import types
    from enum import Enum
    from typing import Any, Callable, Dict, Set, Type, TypeVar, Union
    
    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 12 00:29:03 UTC 2023
    - 383 bytes
    - Viewed (0)
  8. docs/de/docs/tutorial/body-updates.md

    /// info
    
    In Pydantic v1 hieß diese Methode `.dict()`, in Pydantic v2 wurde sie deprecated (aber immer noch unterstützt) und in `.model_dump()` umbenannt.
    
    Die Beispiele hier verwenden `.dict()` für die Kompatibilität mit Pydantic v1, Sie sollten jedoch stattdessen `.model_dump()` verwenden, wenn Sie Pydantic v2 verwenden können.
    
    ///
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  9. src/main/webapp/WEB-INF/view/admin/dict/stemmeroverride/admin_dict_stemmeroverride_download.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>
        <div class="content-wrapper">
            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 13 07:47:04 UTC 2020
    - 6K bytes
    - Viewed (0)
  10. src/main/webapp/WEB-INF/view/admin/dict/mapping/admin_dict_mapping_download.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>
        <div class="content-wrapper">
            <div class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 13 07:47:04 UTC 2020
    - 5.9K bytes
    - Viewed (0)
Back to top