Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for classe (0.22 sec)

  1. fastapi/security/oauth2.py

                client_secret=client_secret,
            )
    
    
    class OAuth2(SecurityBase):
        """
        This is the base class for OAuth2 authentication, an instance of it would be used
        as a dependency. All other OAuth2 classes inherit from it and customize it for
        each OAuth2 flow.
    
        You normally would not create a new class inheriting from it but use one of the
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 21.1K bytes
    - Viewed (1)
  2. fastapi/openapi/utils.py

        if isinstance(route.response_class, DefaultPlaceholder):
            current_response_class: Type[Response] = route.response_class.value
        else:
            current_response_class = route.response_class
        assert current_response_class, "A response class is needed to generate OpenAPI"
        route_response_media_type: Optional[str] = current_response_class.media_type
        if route.include_in_schema:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 21.8K bytes
    - Viewed (0)
  3. fastapi/encoders.py

    }
    
    
    def generate_encoders_by_class_tuples(
        type_encoder_map: Dict[Any, Callable[[Any], Any]],
    ) -> Dict[Callable[[Any], Any], Tuple[Any, ...]]:
        encoders_by_class_tuples: Dict[Callable[[Any], Any], Tuple[Any, ...]] = defaultdict(
            tuple
        )
        for type_, encoder in type_encoder_map.items():
            encoders_by_class_tuples[encoder] += (type_,)
        return encoders_by_class_tuples
    
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  4. tests/test_response_model_as_return_annotation.py

    from fastapi.responses import JSONResponse, Response
    from fastapi.testclient import TestClient
    from pydantic import BaseModel
    
    
    class BaseUser(BaseModel):
        name: str
    
    
    class User(BaseUser):
        surname: str
    
    
    class DBUser(User):
        password_hash: str
    
    
    class Item(BaseModel):
        name: str
        price: float
    
    
    app = FastAPI()
    
    
    @app.get("/no_response_model-no_annotation-return_model")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Mon Aug 14 09:49:57 GMT 2023
    - 47.7K bytes
    - Viewed (0)
  5. fastapi/_compat.py

        Undefined = PydanticUndefined
        UndefinedType = PydanticUndefinedType
        evaluate_forwardref = eval_type_lenient
        Validator = Any
    
        class BaseConfig:
            pass
    
        class ErrorWrapper(Exception):
            pass
    
        @dataclass
        class ModelField:
            field_info: FieldInfo
            name: str
            mode: Literal["validation", "serialization"] = "validation"
    
            @property
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top