- Sort Score
- Num 10 results
- Language All
Results 181 - 190 of 736 for depende (0.04 seconds)
-
docs/tr/docs/advanced/advanced-dependencies.md
### `yield` ve `scope` ile dependency'ler { #dependencies-with-yield-and-scope } 0.121.0 sürümünde FastAPI, `Depends(scope="function")` desteğini ekledi. `Depends(scope="function")` kullanıldığında, `yield` sonrasındaki çıkış kodu, *path operation function* biter bitmez, response client'a geri gönderilmeden önce çalıştırılır.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 07:53:17 GMT 2026 - 10K bytes - Click Count (0) -
docs/ru/docs/advanced/advanced-dependencies.md
В версии 0.121.0 FastAPI добавил поддержку `Depends(scope="function")` для зависимостей с `yield`. При использовании `Depends(scope="function")` код после `yield` выполняется сразу после завершения *функции-обработчика пути*, до отправки ответа клиенту. А при использовании `Depends(scope="request")` (значение по умолчанию) код после `yield` выполняется после отправки ответа.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 17:56:20 GMT 2026 - 14.1K bytes - Click Count (0) -
docs/uk/docs/tutorial/dependencies/sub-dependencies.md
//// tab | Python 3.10+ ```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.10+ без Annotated /// tip | Порада
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Feb 14 08:43:14 GMT 2026 - 5.7K bytes - Click Count (0) -
docs/ja/docs/tutorial/dependencies/index.md
/// ### `Depends`のインポート { #import-depends } {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[3] *} ### 「dependant」での依存関係の宣言 { #declare-the-dependency-in-the-dependant } *path operation 関数*のパラメータに`Body`や`Query`などを使用するのと同じように、新しいパラメータに`Depends`を使用することができます: {* ../../docs_src/dependencies/tutorial001_an_py310.py hl[13,18] *} 関数のパラメータに`Depends`を使用するのは`Body`や`Query`などと同じですが、`Depends`の動作は少し異なります。Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:07:17 GMT 2026 - 11.9K bytes - Click Count (0) -
fastapi/applications.py
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Apr 01 16:16:24 GMT 2026 - 178.6K bytes - Click Count (0) -
docs/uk/docs/advanced/security/oauth2-scopes.md
/// info | Технічні деталі `Security` насправді є підкласом `Depends`, і має лише один додатковий параметр, який ми побачимо пізніше. Але використовуючи `Security` замість `Depends`, **FastAPI** знатиме, що можна оголошувати scopes безпеки, використовувати їх внутрішньо та документувати API через OpenAPI. Коли ви імпортуєте `Query`, `Path`, `Depends`, `Security` та інші з `fastapi`, це насправді функції, що повертають спеціальні класи.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Mar 19 18:27:41 GMT 2026 - 20.2K bytes - Click Count (0) -
docs/ko/docs/advanced/security/oauth2-scopes.md
이를 위해 `fastapi`에서 `Security`를 import하여 사용합니다. `Security`는 (`Depends`처럼) 의존성을 선언하는 데 사용할 수 있지만, `Security`는 스코프(문자열) 목록을 받는 `scopes` 매개변수도 받습니다. 이 경우, 의존성 함수 `get_current_active_user`를 `Security`에 전달합니다(`Depends`로 할 때와 같은 방식). 하지만 스코프 `list`도 함께 전달합니다. 여기서는 스코프 하나만: `items`(더 많을 수도 있습니다). 또한 의존성 함수 `get_current_active_user`는 `Depends`뿐 아니라 `Security`로도 하위 의존성을 선언할 수 있습니다. 자체 하위 의존성 함수(`get_current_user`)와 추가 스코프 요구사항을 선언합니다.
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Mar 20 14:06:26 GMT 2026 - 15.7K bytes - Click Count (0) -
tests/test_security_api_key_query.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyQuery from fastapi.testclient import TestClient 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
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sun Feb 08 10:18:38 GMT 2026 - 2K bytes - Click Count (0) -
tests/test_stringified_annotation_dependency.py
from __future__ import annotations from typing import TYPE_CHECKING, Annotated import pytest from fastapi import Depends, FastAPI from fastapi.testclient import TestClient from inline_snapshot import snapshot if TYPE_CHECKING: # pragma: no cover from collections.abc import AsyncGenerator class DummyClient: async def get_people(self) -> list: return ["John Doe", "Jane Doe"] async def close(self) -> None:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 2.2K bytes - Click Count (0) -
tests/test_security_api_key_header_optional.py
from fastapi import Depends, FastAPI, Security from fastapi.security import APIKeyHeader from fastapi.testclient import TestClient from inline_snapshot import snapshot from pydantic import BaseModel app = FastAPI() api_key = APIKeyHeader(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
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)