- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 24 for Klasse (0.26 sec)
-
fastapi/openapi/utils.py
else: # It would probably make more sense for all response classes to have an # explicit default status_code, and to extract it from them, instead of # doing this inspection tricks, that would probably be in the future # TODO: probably make status_code a default class attribute for all # responses in StarletteRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 23.2K bytes - Viewed (0) -
docs/en/docs/release-notes.md
as-is, including the `hashed_password`. To fix this, the declared `response_model` is cloned, if it is a Pydantic model class (or contains Pydantic model classes in it, e.g. in a `List[Item]`), the Pydantic model class(es) will be a different one (the "cloned" one). So, an object that is a subclass won't simply pass the validation and returned as-is, because it is no longer a sub-class of the cloned `response_model`. Instead, a new Pydantic model object will be created with the contents of the returned...
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:06:15 UTC 2025 - 586.7K bytes - Viewed (0) -
tests/test_inherited_custom_class.py
class SomeCustomClass(BaseModel): model_config = {"arbitrary_types_allowed": True} a_uuid: MyUuid @field_serializer("a_uuid") def serialize_a_uuid(self, v): return str(v) @app.get("/get_custom_class") def return_some_user(): # Test that the fix also works for custom pydantic classesRegistered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 1.8K bytes - Viewed (0) -
scripts/translate.py
««« <abbr title="Object Relational Mapper: a fancy term for a library where some classes represent SQL tables and instances represent rows in those tables">ORM</abbr> »»» Result (German): ««« <abbr title="Objektrelationaler Mapper: Ein Fachbegriff für eine Bibliothek, in der einige Klassen SQL-Tabellen und Instanzen Zeilen in diesen Tabellen darstellen">ORM</abbr> »»»Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:05:53 UTC 2025 - 34.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) -
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_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) -
fastapi/params.py
from typing_extensions import Literal, deprecated from ._compat import ( Undefined, ) _Unset: Any = Undefined class ParamTypes(Enum): query = "query" header = "header" path = "path" cookie = "cookie" class Param(FieldInfo): # type: ignore[misc] in_: ParamTypes def __init__( self, default: Any = Undefined, *,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 26.3K bytes - Viewed (0) -
tests/test_request_params/test_form/test_optional_str.py
# Without aliases @app.post("/optional-str", operation_id="optional_str") async def read_optional_str(p: Annotated[Optional[str], Form()] = None): return {"p": p} class FormModelOptionalStr(BaseModel): p: Optional[str] = None @app.post("/model-optional-str", operation_id="model_optional_str") async def read_model_optional_str(p: Annotated[FormModelOptionalStr, Form()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 8.9K bytes - Viewed (0) -
tests/test_request_params/test_query/test_optional_list.py
# Without aliases @app.get("/optional-list-str") async def read_optional_list_str( p: Annotated[Optional[list[str]], Query()] = None, ): return {"p": p} class QueryModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.get("/model-optional-list-str") async def read_model_optional_list_str( p: Annotated[QueryModelOptionalListStr, Query()], ):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.1K bytes - Viewed (0)