- Sort Score
- Num 10 results
- Language All
Results 221 - 230 of 1,131 for defs (0.11 seconds)
-
api/go1.12.txt
pkg reflect, method (Value) MapRange() *MapIter pkg reflect, type MapIter struct pkg runtime/debug, func ReadBuildInfo() (*BuildInfo, bool) pkg runtime/debug, type BuildInfo struct pkg runtime/debug, type BuildInfo struct, Deps []*Module pkg runtime/debug, type BuildInfo struct, Main Module pkg runtime/debug, type BuildInfo struct, Path string pkg runtime/debug, type Module struct pkg runtime/debug, type Module struct, Path string
Created: Tue Apr 07 11:13:11 GMT 2026 - Last Modified: Wed Jan 02 21:21:53 GMT 2019 - 13.5K bytes - Click Count (0) -
docs/es/docs/async.md
```Python hl_lines="2" @app.get('/') def results(): results = some_library() return results ``` --- Si tu aplicación (de alguna manera) no tiene que comunicarse con nada más y esperar a que responda, usa `async def`, incluso si no necesitas usar `await` dentro. --- Si simplemente no lo sabes, usa `def` normal. ---
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:15:55 GMT 2026 - 24.8K bytes - Click Count (0) -
tests/test_generate_unique_id_function.py
}, } ) def test_warn_duplicate_operation_id(): def broken_operation_id(route: APIRoute): return "foo" app = FastAPI(generate_unique_id_function=broken_operation_id) @app.post("/") def post_root(item1: Item): return item1 # pragma: nocover @app.post("/second") def post_second(item1: Item):Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 75K bytes - Click Count (0) -
cmd/object-api-utils_test.go
// Remove doubled slash {"abc//def//ghi", "abc/def/ghi"}, {"//abc", "/abc"}, {"///abc", "/abc"}, {"//abc//", "/abc"}, {"abc//", "abc"}, // Remove . elements {"abc/./def", "abc/def"}, {"/./abc/def", "/abc/def"}, {"abc/.", "abc"}, // Remove .. elements {"abc/def/ghi/../jkl", "abc/def/jkl"}, {"abc/def/../ghi/../jkl", "abc/jkl"}, {"abc/def/..", "abc"}, {"abc/def/../..", "."},Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Fri Aug 29 02:39:48 GMT 2025 - 24.1K bytes - Click Count (0) -
tests/test_starlette_urlconvertors.py
app = FastAPI() @app.get("/int/{param:int}") def int_convertor(param: int = Path()): return {"int": param} @app.get("/float/{param:float}") def float_convertor(param: float = Path()): return {"float": param} @app.get("/path/{param:path}") def path_convertor(param: str = Path()): return {"path": param} @app.get("/query/") def query_convertor(param: str = Query()):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Nov 27 14:46:06 GMT 2022 - 1.7K bytes - Click Count (0) -
docs/fr/docs/tutorial/query-params.md
Quand vous déclarez d'autres paramètres de fonction qui ne font pas partie des paramètres de chemin, ils sont automatiquement interprétés comme des paramètres de « query ». {* ../../docs_src/query_params/tutorial001_py310.py hl[9] *} La query est l'ensemble des paires clé-valeur placées après le `?` dans une URL, séparées par des caractères `&`. Par exemple, dans l'URL : ``` http://127.0.0.1:8000/items/?skip=0&limit=10Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:37:13 GMT 2026 - 5.3K bytes - Click Count (0) -
tests/test_dependency_security_overrides.py
app = FastAPI() def get_user(required_scopes: SecurityScopes): return "john", required_scopes.scopes def get_user_override(required_scopes: SecurityScopes): return "alice", required_scopes.scopes def get_data(): return [1, 2, 3] def get_data_override(): return [3, 4, 5] @app.get("/user") def read_user(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 1.4K bytes - Click Count (1) -
tests/test_security_api_key_query_description.py
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)): return current_user client = TestClient(app) def test_security_api_key(): response = client.get("/users/me?key=secret")
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.2K bytes - Click Count (0) -
tests/test_security_api_key_query_optional.py
api_key = APIKeyQuery(name="key", auto_error=False) class User(BaseModel): username: str def get_current_user(oauth_header: str | None = Security(api_key)): if oauth_header is None: return None user = User(username=oauth_header) return user @app.get("/users/me") def read_current_user(current_user: User | None = Depends(get_current_user)): if current_user is None:
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 2.1K bytes - Click Count (0) -
tests/test_security_http_digest.py
from inline_snapshot import snapshot app = FastAPI() security = HTTPDigest() @app.get("/users/me") def read_current_user(credentials: HTTPAuthorizationCredentials = Security(security)): return {"scheme": credentials.scheme, "credentials": credentials.credentials} client = TestClient(app) def test_security_http_digest(): response = client.get("/users/me", headers={"Authorization": "Digest foobar"})
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2.3K bytes - Click Count (0)