- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 53 for clase (0.09 sec)
-
fastapi/exceptions.py
WebSocketErrorModel: type[BaseModel] = create_model("WebSocket") class FastAPIError(RuntimeError): """ A generic, FastAPI-specific error. """ class DependencyScopeError(FastAPIError): """ A dependency declared that it depends on another dependency with an invalid (narrower) scope. """ class ValidationException(Exception): def __init__( self,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 6.8K bytes - Viewed (0) -
fastapi/datastructures.py
""" return await super().seek(offset) async def close(self) -> None: """ Close the file. To be awaitable, compatible with async, this is run in threadpool. """ return await super().close() @classmethod def _validate(cls, __input_value: Any, _: Any) -> "UploadFile":Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 5.1K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
from pydantic import BaseModel, Field, ValidationError class Person: def __init__(self, name: str): self.name = name class Pet: def __init__(self, owner: Person, name: str): self.owner = owner self.name = name @dataclass class Item: name: str count: int class DictablePerson(Person): def __iter__(self):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
fastapi/routing.py
type[APIRoute], Doc( """ Custom route (*path operation*) class to be used by this router. Read more about it in the [FastAPI docs for Custom Request and APIRoute class](https://fastapi.tiangolo.com/how-to/custom-request-and-route/#custom-apiroute-class-in-a-router). """ ), ] = APIRoute, on_startup: Annotated[
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 174.6K bytes - Viewed (0) -
tests/test_filter_pydantic_sub_model_pv2.py
@pytest.fixture(name="client") def get_client(): from pydantic import BaseModel, ValidationInfo, field_validator app = FastAPI() class ModelB(BaseModel): username: str class ModelC(ModelB): password: str class ModelA(BaseModel): name: str description: Optional[str] = None foo: ModelB tags: dict[str, str] = {}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 6.6K bytes - Viewed (0) -
tests/test_pydantic_v1_error.py
def test_raises_pydantic_v1_model_in_endpoint_param() -> None: class ParamModelV1(BaseModel): name: str app = FastAPI() with pytest.raises(PydanticV1NotSupportedError): @app.post("/param") def endpoint(data: ParamModelV1): # pragma: no cover return data def test_raises_pydantic_v1_model_in_return_type() -> None: class ReturnModelV1(BaseModel): name: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 2.3K bytes - Viewed (0) -
tests/test_request_params/test_query/test_optional_str.py
# ===================================================================================== # Without aliases @app.get("/optional-str") async def read_optional_str(p: Optional[str] = None): return {"p": p} class QueryModelOptionalStr(BaseModel): p: Optional[str] = None @app.get("/model-optional-str") async def read_model_optional_str(p: Annotated[QueryModelOptionalStr, Query()]): return {"p": p.p}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.1K bytes - Viewed (0) -
fastapi/openapi/models.py
class OAuthFlow(BaseModelWithConfig): refreshUrl: Optional[str] = None scopes: dict[str, str] = {} class OAuthFlowImplicit(OAuthFlow): authorizationUrl: str class OAuthFlowPassword(OAuthFlow): tokenUrl: str class OAuthFlowClientCredentials(OAuthFlow): tokenUrl: str class OAuthFlowAuthorizationCode(OAuthFlow): authorizationUrl: str tokenUrl: str
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 15.1K bytes - Viewed (0) -
tests/test_request_params/test_cookie/test_required_str.py
# Without aliases @app.get("/required-str") async def read_required_str(p: Annotated[str, Cookie()]): return {"p": p} class CookieModelRequiredStr(BaseModel): p: str @app.get("/model-required-str") async def read_model_required_str(p: Annotated[CookieModelRequiredStr, Cookie()]): return {"p": p.p}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.2K bytes - Viewed (0) -
tests/test_compat.py
def test_propagates_pydantic2_model_config(): app = FastAPI() class Missing: def __bool__(self): return False class EmbeddedModel(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True) value: Union[str, Missing] = Missing() class Model(BaseModel): model_config = ConfigDict( arbitrary_types_allowed=True, )
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 4.2K bytes - Viewed (0)