Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ModelWithDefault (0.26 sec)

  1. tests/test_jsonable_encoder.py

            model_config = {"use_enum_values": True}
        else:
    
            class Config:
                use_enum_values = True
    
    
    class ModelWithAlias(BaseModel):
        foo: str = Field(alias="Foo")
    
    
    class ModelWithDefault(BaseModel):
        foo: str = ...  # type: ignore
        bar: str = "bar"
        bla: str = "bla"
    
    
    def test_encode_dict():
        pet = {"name": "Firulais", "owner": {"name": "Foo"}}
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 9K bytes
    - Viewed (0)
Back to top