Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for obj (0.18 sec)

  1. .github/actions/notify-translations/app/main.py

        )
        response = AddCommentResponse.parse_obj(data)
        return response.data.addDiscussionComment.comment
    
    
    def update_comment(*, settings: Settings, comment_id: str, body: str):
        data = get_graphql_response(
            settings=settings,
            query=update_comment_mutation,
            comment_id=comment_id,
            body=body,
        )
        response = UpdateCommentResponse.parse_obj(data)
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Wed Sep 27 23:01:46 GMT 2023
    - 12.4K bytes
    - Viewed (0)
  2. tests/test_jsonable_encoder.py

            else:
    
                class Config:
                    arbitrary_types_allowed = True
    
        test_path = PurePath("/foo", "bar")
        obj = ModelWithPath(path=test_path)
        assert jsonable_encoder(obj) == {"path": str(test_path)}
    
    
    def test_encode_model_with_pure_posix_path():
        class ModelWithPath(BaseModel):
            path: PurePosixPath
    
            if PYDANTIC_V2:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
  3. fastapi/encoders.py

            )
        if isinstance(obj, Enum):
            return obj.value
        if isinstance(obj, PurePath):
            return str(obj)
        if isinstance(obj, (str, int, float, type(None))):
            return obj
        if isinstance(obj, UndefinedType):
            return None
        if isinstance(obj, dict):
            encoded_dict = {}
            allowed_keys = set(obj.keys())
            if include is not None:
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. docs/em/docs/how-to/sql-databases-peewee.md

    , ๐Ÿ‘† ๐Ÿ”œ โฒ โšซ๏ธ โฎ๏ธ:
    
    ```Python hl_lines="3-4"
    async def reset_db_state():
        database.db.obj._state._state.set(db_state_default.copy())
        database.db.obj._state.reset()
    ```
    
    ### โœ ๐Ÿ‘† **FastAPI** *โžก ๐Ÿ› ๏ธ*
    
    ๐Ÿ”œ, ๐Ÿ˜’, ๐Ÿ“ฅ ๐Ÿฉ **FastAPI** *โžก ๐Ÿ› ๏ธ* ๐Ÿ“Ÿ.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 19.2K bytes
    - Viewed (0)
  5. docs_src/sql_databases_peewee/sql_app/schemas.py

    import peewee
    from pydantic import BaseModel
    from pydantic.utils import GetterDict
    
    
    class PeeweeGetterDict(GetterDict):
        def get(self, key: Any, default: Any = None):
            res = getattr(self._obj, key, default)
            if isinstance(res, peewee.ModelSelect):
                return list(res)
            return res
    
    
    class ItemBase(BaseModel):
        title: str
        description: Union[str, None] = None
    
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 868 bytes
    - Viewed (0)
  6. docs/en/docs/advanced/path-operation-advanced-configuration.md

        ```Python hl_lines="26-33"
        {!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!}
        ```
    
    !!! info
        In Pydantic version 1 the method to parse and validate an object was `Item.parse_obj()`, in Pydantic version 2, the method is called `Item.model_validate()`.
    
    !!! tip
        Here we re-use the same Pydantic model.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 7.7K bytes
    - Viewed (0)
  7. docs/de/docs/advanced/path-operation-advanced-configuration.md

        {!> ../../../docs_src/path_operation_advanced_configuration/tutorial007_pv1.py!}
        ```
    
    !!! info
        In Pydantic Version 1 war die Methode zum Parsen und Validieren eines Objekts `Item.parse_obj()`, in Pydantic Version 2 heiรŸt die Methode `Item.model_validate()`.
    
    !!! tip "Tipp"
        Hier verwenden wir dasselbe Pydantic-Modell wieder.
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Mar 30 20:27:23 GMT 2024
    - 8.5K bytes
    - Viewed (0)
  8. docs_src/path_operation_advanced_configuration/tutorial007_pv1.py

        raw_body = await request.body()
        try:
            data = yaml.safe_load(raw_body)
        except yaml.YAMLError:
            raise HTTPException(status_code=422, detail="Invalid YAML")
        try:
            item = Item.parse_obj(data)
        except ValidationError as e:
            raise HTTPException(status_code=422, detail=e.errors())
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 789 bytes
    - Viewed (0)
  9. docs/en/docs/how-to/sql-databases-peewee.md

    So, you would reset it with:
    
    ```Python hl_lines="3-4"
    async def reset_db_state():
        database.db.obj._state._state.set(db_state_default.copy())
        database.db.obj._state.reset()
    ```
    
    ### Create your **FastAPI** *path operations*
    
    Plain Text
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Jan 16 13:23:25 GMT 2024
    - 23.6K bytes
    - Viewed (0)
Back to top