- Sort Score
- Num 10 results
- Language All
Results 191 - 200 of 1,087 for tstr (0.03 seconds)
-
docs_src/body_multiple_params/tutorial003_an_py310.py
from fastapi import Body, FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: str | None = None price: float tax: float | None = None class User(BaseModel): username: str full_name: str | None = None @app.put("/items/{item_id}") async def update_item(
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 550 bytes - Click Count (0) -
tests/test_request_params/test_file/utils.py
from typing import Any def get_body_model_name(openapi: dict[str, Any], path: str) -> str: body = openapi["paths"][path]["post"]["requestBody"] body_schema = body["content"]["multipart/form-data"]["schema"]
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 271 bytes - Click Count (0) -
docs/de/docs/python-types.md
```Python hl_lines="1 4" {!../../docs_src/python_types/tutorial009_py39.py!} ``` Wenn Sie `Optional[str]` anstelle von nur `str` verwenden, wird Ihr Editor Ihnen dabei helfen, Fehler zu erkennen, bei denen Sie annehmen könnten, dass ein Wert immer eine String (`str`) ist, obwohl er auch `None` sein könnte. `Optional[Something]` ist tatsächlich eine Abkürzung für `Union[Something, None]`, diese beiden sind äquivalent.Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 17.9K bytes - Click Count (1) -
src/test/java/org/codelibs/core/io/SerializeUtilTest.java
* @throws Exception */ public void testFromBinaryToObject_DefaultFilter_AllowsSafeClasses() throws Exception { // Test String final String str = "test string"; byte[] binary = SerializeUtil.fromObjectToBinary(str); assertEquals(str, SerializeUtil.fromBinaryToObject(binary)); // Test Integer final Integer num = 42; binary = SerializeUtil.fromObjectToBinary(num);Created: Sat Dec 20 08:55:33 GMT 2025 - Last Modified: Sat Nov 22 11:21:59 GMT 2025 - 7.6K bytes - Click Count (0) -
docs_src/response_model/tutorial004_py39.py
from typing import Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: float = 10.5 tags: list[str] = [] items = { "foo": {"name": "Foo", "price": 50.2}, "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat May 14 11:59:59 GMT 2022 - 627 bytes - Click Count (0) -
tests/test_additional_responses_router.py
@router.get( "/c", responses={ "400": {"description": "Error with str"}, "5xx": {"description": "Error with range, lower"}, "default": {"description": "A default response"}, }, ) async def c(): return "c" @router.get( "/d", responses={ "400": {"description": "Error with str"}, "5XX": {"model": ResponseModel}, "default": {"model": ResponseModel},
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Fri Jun 30 18:25:16 GMT 2023 - 5.1K bytes - Click Count (0) -
docs_src/schema_extra_example/tutorial003_py39.py
from typing import Union 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 @app.put("/items/{item_id}") async def update_item( item_id: int, item: Item = Body( examples=[ { "name": "Foo",
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 20:41:43 GMT 2025 - 612 bytes - Click Count (0) -
docs_src/cookie_param_models/tutorial002_py310.py
from fastapi import Cookie, FastAPI from pydantic import BaseModel app = FastAPI() class Cookies(BaseModel): model_config = {"extra": "forbid"} session_id: str fatebook_tracker: str | None = None googall_tracker: str | None = None @app.get("/items/") async def read_items(cookies: Cookies = Cookie()):
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Tue Sep 17 18:54:10 GMT 2024 - 343 bytes - Click Count (0) -
tests/main.py
@app.get("/path/param/{item_id}") def get_path_param_id(item_id: Optional[str] = Path()): return item_id @app.get("/path/param-minlength/{item_id}") def get_path_param_min_length(item_id: str = Path(min_length=3)): return item_id @app.get("/path/param-maxlength/{item_id}") def get_path_param_max_length(item_id: str = Path(max_length=3)): return item_id
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 4.5K bytes - Click Count (0) -
docs_src/background_tasks/tutorial002_an_py39.py
from typing import Annotated, Union from fastapi import BackgroundTasks, Depends, FastAPI app = FastAPI() def write_log(message: str): with open("log.txt", mode="a") as log: log.write(message) def get_query(background_tasks: BackgroundTasks, q: Union[str, None] = None): if q: message = f"found query: {q}\n" background_tasks.add_task(write_log, message) return q
Created: Sun Dec 28 07:19:09 GMT 2025 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 696 bytes - Click Count (0)