- Sort Score
- Result 10 results
- Languages All
Results 121 - 130 of 617 for depende (0.04 sec)
-
docs/fr/docs/history-design-future.md
# Histoire, conception et avenir Il y a quelque temps, <a href="https://github.com/fastapi/fastapi/issues/3#issuecomment-454956920" class="external-link" target="_blank">un utilisateur de **FastAPI** a demandé</a> : > Quelle est l'histoire de ce projet ? Il semble être sorti de nulle part et est devenu génial en quelques semaines [...]. Voici un petit bout de cette histoire. ## Alternatives
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 4.9K bytes - Viewed (0) -
docs/ja/docs/tutorial/dependencies/classes-as-dependencies.md
**FastAPI** は`CommonQueryParams`クラスを呼び出します。これにより、そのクラスの「インスタンス」が作成され、インスタンスはパラメータ`commons`として関数に渡されます。 ## 型注釈と`Depends` 上のコードでは`CommonQueryParams`を2回書いていることに注目してください: ```Python commons: CommonQueryParams = Depends(CommonQueryParams) ``` 以下にある最後の`CommonQueryParams`: ```Python ... = Depends(CommonQueryParams) ``` ...は、**FastAPI** が依存関係を知るために実際に使用するものです。
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 18 02:25:44 UTC 2024 - 7K bytes - Viewed (0) -
tests/test_dependency_security_overrides.py
from fastapi import Depends, FastAPI, Security from fastapi.security import SecurityScopes from fastapi.testclient import TestClient 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():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.4K bytes - Viewed (1) -
docs_src/security/tutorial006_py39.py
from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: HTTPBasicCredentials = Depends(security)):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 321 bytes - Viewed (0) -
docs_src/security/tutorial001_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import OAuth2PasswordBearer app = FastAPI() oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token") @app.get("/items/") async def read_items(token: Annotated[str, Depends(oauth2_scheme)]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 309 bytes - Viewed (0) -
tests/test_ws_dependencies.py
import json from typing import Annotated from fastapi import APIRouter, Depends, FastAPI, WebSocket from fastapi.testclient import TestClient def dependency_list() -> list[str]: return [] DepList = Annotated[list[str], Depends(dependency_list)] def create_dependency(name: str): def fun(deps: DepList): deps.append(name) return Depends(fun)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 2.1K bytes - Viewed (0) -
docs_src/dependencies/tutorial008e_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI app = FastAPI() def get_username(): try: yield "Rick" finally: print("Cleanup up before response is sent") @app.get("/users/me") def get_user_me(username: Annotated[str, Depends(get_username, scope="function")]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Mon Nov 03 10:12:49 UTC 2025 - 329 bytes - Viewed (0) -
tests/test_enforce_once_required_parameter.py
client_tag: Optional[str] = Depends(_get_client_tag), ): return {"client_id": client_key, "client_tag": client_tag} client = TestClient(app) expected_schema = { "components": { "schemas": { "HTTPValidationError": { "properties": { "detail": { "items": {"$ref": "#/components/schemas/ValidationError"},
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Sep 16 17:21:48 UTC 2025 - 3.3K bytes - Viewed (0) -
docs_src/security/tutorial006_an_py39.py
from typing import Annotated from fastapi import Depends, FastAPI from fastapi.security import HTTPBasic, HTTPBasicCredentials app = FastAPI() security = HTTPBasic() @app.get("/users/me") def read_current_user(credentials: Annotated[HTTPBasicCredentials, Depends(security)]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Mar 18 12:29:59 UTC 2023 - 361 bytes - Viewed (0) -
docs_src/dependencies/tutorial011_py39.py
from fastapi import Depends, FastAPI app = FastAPI() class FixedContentQueryChecker: def __init__(self, fixed_content: str): self.fixed_content = fixed_content def __call__(self, q: str = ""): if q: return self.fixed_content in q return False checker = FixedContentQueryChecker("bar") @app.get("/query-checker/")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 504 bytes - Viewed (0)