- Sort Score
- Result 10 results
- Languages All
Results 261 - 270 of 1,058 for Fstr (0.01 sec)
-
docs_src/dataclasses_/tutorial002_py310.py
from dataclasses import dataclass, field from fastapi import FastAPI @dataclass class Item: name: str price: float tags: list[str] = field(default_factory=list) description: str | None = None tax: float | None = None app = FastAPI() @app.get("/items/next", response_model=Item) async def read_next_item(): return { "name": "Island In The Moon", "price": 12.99,Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 506 bytes - Viewed (0) -
docs_src/response_model/tutorial001_py39.py
from typing import Any, Union from fastapi import FastAPI from pydantic import BaseModel app = FastAPI() class Item(BaseModel): name: str description: Union[str, None] = None price: float tax: Union[float, None] = None tags: list[str] = [] @app.post("/items/", response_model=Item) async def create_item(item: Item) -> Any: return item @app.get("/items/", response_model=list[Item])
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Jan 07 13:45:48 UTC 2023 - 556 bytes - Viewed (0) -
src/test/java/jcifs/smb/compression/CompressionNegotiateContextTest.java
} @Test @DisplayName("Test toString representation") public void testToString() { String str = context.toString(); assertNotNull(str); assertTrue(str.contains("CompressionNegotiateContext")); assertTrue(str.contains("LZ77")); assertTrue(str.contains("LZNT1")); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 5.6K bytes - Viewed (0) -
docs_src/dependency_testing/tutorial001_py310.py
from fastapi import Depends, FastAPI from fastapi.testclient import TestClient app = FastAPI() async def common_parameters(q: str | None = None, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/items/") async def read_items(commons: dict = Depends(common_parameters)): return {"message": "Hello Items!", "params": commons} @app.get("/users/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 1.4K bytes - Viewed (0) -
tests/test_security_api_key_query.py
from fastapi.testclient import TestClient from pydantic import BaseModel app = FastAPI() api_key = APIKeyQuery(name="key") class User(BaseModel): username: str def get_current_user(oauth_header: str = Security(api_key)): user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User = Depends(get_current_user)):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 24 19:03:06 UTC 2025 - 1.9K bytes - Viewed (0) -
tests/test_route_scope.py
from fastapi.testclient import TestClient app = FastAPI() @app.get("/users/{user_id}") async def get_user(user_id: str, request: Request): route: APIRoute = request.scope["route"] return {"user_id": user_id, "path": route.path} @app.websocket("/items/{item_id}") async def websocket_item(item_id: str, websocket: WebSocket): route: APIWebSocketRoute = websocket.scope["route"] await websocket.accept()
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Sep 29 03:29:38 UTC 2025 - 1.5K bytes - Viewed (0) -
docs_src/websockets/tutorial002_an_py39.py
session: Annotated[Union[str, None], Cookie()] = None, token: Annotated[Union[str, None], Query()] = None, ): if session is None and token is None: raise WebSocketException(code=status.WS_1008_POLICY_VIOLATION) return session or token @app.websocket("/items/{item_id}/ws") async def websocket_endpoint( *, websocket: WebSocket, item_id: str, q: Union[int, None] = None,
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 2.8K bytes - Viewed (0) -
guava/src/com/google/common/base/CaseFormat.java
* Converts the specified {@code String str} from this format to the specified {@code format}. A * "best effort" approach is taken; if {@code str} does not conform to the assumed format, then * the behavior of this method is undefined but we make a reasonable effort at converting anyway. */ public final String to(CaseFormat format, String str) { checkNotNull(format); checkNotNull(str);Registered: Fri Dec 26 12:43:10 UTC 2025 - Last Modified: Wed Dec 03 18:46:33 UTC 2025 - 6.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/netbios/NbtExceptionTest.java
void testToString() { NbtException e = new NbtException(NbtException.ERR_SSN_SRVC, NbtException.NO_RESOURCES); String str = e.toString(); assertTrue(str.contains("errorClass=2")); assertTrue(str.contains("errorCode=" + NbtException.NO_RESOURCES)); assertTrue(str.contains("Called name present, but insufficient resources")); }
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3K bytes - Viewed (0) -
fastapi/security/open_id_connect_url.py
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 3.1K bytes - Viewed (0)