Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for obj (0.14 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_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)
  5. docs/sts/web-identity.py

                                     config=Config(signature_version='s3v4'),
                                     region_name='us-east-1')
    
        bucket = s3_resource.Bucket('testbucket')
    
        for obj in bucket.objects.all():
            print(obj)
    
        return "success"
    
    
    if __name__ == '__main__':
    Python
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Wed Jul 28 01:37:51 GMT 2021
    - 2.9K bytes
    - Viewed (1)
  6. 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)
Back to top