Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌐 Add Korean translation for /docs/ko/docs/tutorial/dependencies/global-dependencies.md #11123

Merged
merged 3 commits into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/ko/docs/tutorial/dependencies/global-dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 전역 의존성

몇몇 애플리케이션에서는 애플리케이션 전체에 의존성을 추가하고 싶을 수 있습니다.

[*경로 작동 데코레이터*에 `dependencies` 추가하기](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}와 유사한 방법으로 `FastAPI` 애플리케이션에 그것들을 추가할 수 있습니다.

그런 경우에, 애플리케이션의 모든 *경로 작동*에 적용될 것입니다:

=== "Python 3.9+"

```Python hl_lines="16"
{!> ../../../docs_src/dependencies/tutorial012_an_py39.py!}
```

=== "Python 3.8+"

```Python hl_lines="16"
{!> ../../../docs_src/dependencies/tutorial012_an.py!}
```

=== "Python 3.8 Annotated가 없는 경우"

!!! tip "팁"
가능하다면 `Annotated`가 달린 버전을 권장합니다.

```Python hl_lines="15"
{!> ../../../docs_src/dependencies/tutorial012.py!}
```

그리고 [*경로 작동 데코레이터*에 `dependencies` 추가하기](dependencies-in-path-operation-decorators.md){.internal-link target=_blank}에 대한 아이디어는 여전히 적용되지만 여기에서는 앱에 있는 모든 *경로 작동*에 적용됩니다.

## *경로 작동* 모음에 대한 의존성

이후에 여러 파일들을 가지는 더 큰 애플리케이션을 구조화하는 법([더 큰 애플리케이션 - 여러 파일들](../../tutorial/bigger-applications.md){.internal-link target=_blank})을 읽을 때, *경로 작동* 모음에 대한 단일 `dependencies` 매개변수를 선언하는 법에 대해서 배우게 될 것입니다.