- Sort Score
- Result 10 results
- Languages All
Results 131 - 140 of 1,048 for strs (0.01 sec)
-
docs_src/extra_models/tutorial003_py310.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class BaseItem(BaseModel): description: str type: str class CarItem(BaseItem): type: str = "car" class PlaneItem(BaseItem): type: str = "plane" size: int items = { "item1": {"description": "All my friends drive a low rider", "type": "car"}, "item2": {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 644 bytes - Viewed (0) -
docs_src/settings/app03_an_py39/config_pv1.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 20 15:55:38 UTC 2025 - 198 bytes - Viewed (0) -
scripts/translate.py
out_path = Path(str(path).replace(str(en_docs_path), str(lang_docs_path))) return out_path def generate_en_path(*, lang: str, path: Path) -> Path: en_docs_path = Path("docs/en/docs") assert not str(path).startswith(str(en_docs_path)), ( f"Path must not be inside {en_docs_path}" ) lang_docs_path = Path(f"docs/{lang}/docs") out_path = Path(str(path).replace(str(lang_docs_path), str(en_docs_path)))
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 19:05:53 UTC 2025 - 34.1K bytes - Viewed (0) -
docs_src/body_multiple_params/tutorial004_py39.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None class User(BaseModel): username: str full_name: Union[str, None] = None @app.put("/items/{item_id}") async def update_item( *, item_id: int, item: Item,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 653 bytes - Viewed (0) -
tests/test_pydantic_v1_error.py
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 app = FastAPI()
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_validation_error_context.py
error_str = str(captured_exception.exception) assert "subapp_websocket_endpoint" in error_str assert "/sub/ws/" in error_str def test_validation_error_with_only_path(): errors = [{"type": "missing", "loc": ("body", "name"), "msg": "Field required"}] exc = RequestValidationError(errors, endpoint_ctx={"path": "GET /api/test"}) error_str = str(exc)Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 06 12:21:57 UTC 2025 - 4.7K bytes - Viewed (0) -
tests/test_jsonable_encoder.py
role: Optional[RoleEnum] = None model_config = {"use_enum_values": True} class ModelWithAlias(BaseModel): foo: str = Field(alias="Foo") class ModelWithDefault(BaseModel): foo: str = ... # type: ignore bar: str = "bar" bla: str = "bla" def test_encode_dict(): pet = {"name": "Firulais", "owner": {"name": "Foo"}}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 9.2K bytes - Viewed (0) -
docs_src/generate_clients/tutorial002_py39.py
from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str price: float class ResponseMessage(BaseModel): message: str class User(BaseModel): username: str email: str @app.post("/items/", response_model=ResponseMessage, tags=["items"]) async def create_item(item: Item): return {"message": "Item received"}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 730 bytes - Viewed (0) -
docs/uk/docs/tutorial/extra-data-types.md
* У запитах та відповідях буде представлений як `str`. * `datetime.datetime`: * Пайтонівський `datetime.datetime`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15T15:53:00+05:00`. * `datetime.date`: * Пайтонівський `datetime.date`. * У запитах та відповідях буде представлений як `str` в форматі ISO 8601, як: `2008-09-15`. * `datetime.time`:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 4.2K bytes - Viewed (0) -
docs/uk/docs/tutorial/encoder.md
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 2.5K bytes - Viewed (0)