- Sort Score
- Num 10 results
- Language All
Results 301 - 310 of 1,096 for sltr (0.02 seconds)
-
docs/tr/docs/tutorial/encoder.md
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 1.8K bytes - Click Count (0) -
tests/test_security_scopes_sub_dependency.py
} @pytest.fixture(name="app") def app_fixture(call_counts: dict[str, int]): def get_db_session(): call_counts["get_db_session"] += 1 return f"db_session_{call_counts['get_db_session']}" def get_current_user( security_scopes: SecurityScopes, db_session: Annotated[str, Depends(get_db_session)], ): call_counts["get_current_user"] += 1 return {
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.9K bytes - Click Count (0) -
scripts/tests/test_translation_fixer/conftest.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 25 10:37:59 GMT 2026 - 1.3K bytes - Click Count (0) -
fastapi/security/utils.py
def get_authorization_scheme_param( authorization_header_value: str | None, ) -> tuple[str, str]: if not authorization_header_value: return "", "" scheme, _, param = authorization_header_value.partition(" ")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Feb 11 18:41:21 GMT 2026 - 261 bytes - Click Count (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/")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Mar 18 12:29:59 GMT 2023 - 1.4K bytes - Click Count (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()
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Mon Sep 29 03:29:38 GMT 2025 - 1.5K bytes - Click Count (0) -
tests/test_security_api_key_query.py
from inline_snapshot import snapshot 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)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2K bytes - Click Count (0) -
docs/zh/docs/advanced/advanced-python-types.md
def say_hi(name: Optional[str]): print(f"Hey {name}!") ``` 参数 `name` 被定义为 `Optional[str]`,但它并不是“可选”的,你不能不传这个参数就调用函数: ```Python say_hi() # 哎呀,这会报错!😱 ``` 参数 `name` 仍然是必填的(不是“可选”),因为它没有默认值。不过,`name` 接受 `None` 作为取值: ```Python say_hi(name=None) # 这样可以,None 是有效的 🎉 ``` 好消息是,在大多数情况下,你可以直接使用 `|` 来定义类型联合: ```python def say_hi(name: str | None): print(f"Hey {name}!") ```
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Feb 13 13:37:57 GMT 2026 - 2K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/cors/DefaultCorsHandlerTest.java
public void test_additionalCoverage() { int a = 5; int b = 10; int sum = a + b; assertEquals(15, sum); String str = "Hello"; assertTrue(str.startsWith("H")); assertTrue(str.endsWith("o")); assertEquals(5, str.length()); }
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 1.9K bytes - Click Count (0) -
src/test/java/org/codelibs/fess/crawler/service/FessUrlQueueServiceTest.java
public void test_additionalCoverage() { int a = 5; int b = 10; int sum = a + b; assertEquals(15, sum); String str = "Hello"; assertTrue(str.startsWith("H")); assertTrue(str.endsWith("o")); assertEquals(5, str.length()); }
Created: Tue Mar 31 13:07:34 GMT 2026 - Last Modified: Wed Jan 14 14:29:07 GMT 2026 - 1.9K bytes - Click Count (0)