Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for Clauss (0.15 sec)

  1. tests/test_validate_response_recursive/app_pv1.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class RecursiveItem(BaseModel):
        sub_items: List["RecursiveItem"] = []
        name: str
    
    
    RecursiveItem.update_forward_refs()
    
    
    class RecursiveSubitemInSubmodel(BaseModel):
        sub_items2: List["RecursiveItemViaSubmodel"] = []
        name: str
    
    
    class RecursiveItemViaSubmodel(BaseModel):
        sub_items1: List[RecursiveSubitemInSubmodel] = []
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 1.1K bytes
    - Viewed (0)
  2. tests/test_filter_pydantic_sub_model/app_pv1.py

    from typing import Optional
    
    from fastapi import Depends, FastAPI
    from pydantic import BaseModel, validator
    
    app = FastAPI()
    
    
    class ModelB(BaseModel):
        username: str
    
    
    class ModelC(ModelB):
        password: str
    
    
    class ModelA(BaseModel):
        name: str
        description: Optional[str] = None
        model_b: ModelB
    
        @validator("name")
        def lower_username(cls, name: str, values):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jul 07 17:12:13 GMT 2023
    - 784 bytes
    - Viewed (0)
Back to top