- Sort Score
- Result 10 results
- Languages All
Results 371 - 380 of 1,058 for Fstr (0.02 sec)
-
docs/de/docs/tutorial/dependencies/sub-dependencies.md
```Python hl_lines="1" async def needy_dependency(fresh_value: Annotated[str, Depends(get_value, use_cache=False)]): return {"fresh_value": fresh_value} ``` //// //// tab | Python 3.9+ nicht annotiert /// tip | Tipp Bevorzugen Sie die `Annotated`-Version, falls möglich. /// ```Python hl_lines="1" async def needy_dependency(fresh_value: str = Depends(get_value, use_cache=False)):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.5K bytes - Viewed (0) -
docs_src/dependencies/tutorial008b_py39.py
def get_username(): try: yield "Rick" except OwnerError as e: raise HTTPException(status_code=400, detail=f"Owner error: {e}") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id not in data: raise HTTPException(status_code=404, detail="Item not found") item = data[item_id] if item["owner"] != username: raise OwnerError(username)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 735 bytes - Viewed (0) -
docs_src/request_form_models/tutorial002_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 267 bytes - Viewed (0) -
docs_src/request_form_models/tutorial002_an_py39.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Sep 06 17:31:18 UTC 2024 - 307 bytes - Viewed (0) -
schema/naming.go
} // JoinTableName convert string to join table name func (ns NamingStrategy) JoinTableName(str string) string { if !ns.NoLowerCase && strings.ToLower(str) == str { return ns.TablePrefix + str } if ns.SingularTable { return ns.TablePrefix + ns.toDBName(str) } return ns.TablePrefix + inflection.Plural(ns.toDBName(str)) } // RelationshipFKName generate fk name for relation
Registered: Sun Dec 28 09:35:17 UTC 2025 - Last Modified: Wed Jun 12 03:46:59 UTC 2024 - 5.3K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial010.py
return {"c": str(c)} client = TestClient(app) dbsession_mock = Mock() with patch( "docs_src.dependencies.tutorial010_py39.DBSession", return_value=dbsession_mock, create=True, ): response = client.get("/") assert response.status_code == 200Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 688 bytes - Viewed (0) -
docs_src/dependencies/tutorial008c_py39.py
pass def get_username(): try: yield "Rick" except InternalError: print("Oops, we didn't raise again, Britney 😱") @app.get("/items/{item_id}") def get_item(item_id: str, username: str = Depends(get_username)): if item_id == "portal-gun": raise InternalError( f"The portal gun is too dangerous to be owned by {username}" ) if item_id != "plumbus":
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 660 bytes - Viewed (0) -
tests/test_router_redirect_slashes.py
from fastapi import APIRouter, FastAPI from fastapi.testclient import TestClient def test_redirect_slashes_enabled(): app = FastAPI() router = APIRouter() @router.get("/hello/") def hello_page() -> str: return "Hello, World!" app.include_router(router) client = TestClient(app) response = client.get("/hello/", follow_redirects=False) assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Thu Jun 22 10:37:50 UTC 2023 - 974 bytes - Viewed (0) -
docs_src/dataclasses_/tutorial001_py39.py
from dataclasses import dataclass from typing import Union from fastapi import FastAPI @dataclass class Item: name: str price: float description: Union[str, None] = None tax: Union[float, None] = None app = FastAPI() @app.post("/items/") async def create_item(item: Item):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 312 bytes - Viewed (0) -
docs_src/generate_clients/tutorial003_py39.py
app = FastAPI(generate_unique_id_function=custom_generate_unique_id) 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):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Mar 04 22:02:18 UTC 2022 - 914 bytes - Viewed (0)