Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for SomeCustomClass (0.21 sec)

  1. tests/test_inherited_custom_class.py

            return {"fast_uuid": asyncpg_uuid}
    
        class SomeCustomClass(BaseModel):
            class Config:
                arbitrary_types_allowed = True
                json_encoders = {uuid.UUID: str}
    
            a_uuid: MyUuid
    
        @app.get("/get_custom_class")
        def return_some_user():
            # Test that the fix also works for custom pydantic classes
            return SomeCustomClass(a_uuid=MyUuid("b8799909-f914-42de-91bc-95c819218d01"))
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 3K bytes
    - Viewed (0)
Back to top