Browse Source

๐ŸŒ Add Korean translation for `docs/ko/docs/deployment/versions.md` (#4121)

Co-authored-by: weekwith.me <[email protected]>
pull/4272/head
daehyeon kim 3 years ago
committed by GitHub
parent
commit
446d194c46
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 88
      docs/ko/docs/deployment/versions.md

88
docs/ko/docs/deployment/versions.md

@ -0,0 +1,88 @@
# FastAPI ๋ฒ„์ „๋“ค์— ๋Œ€ํ•˜์—ฌ
**FastAPI** ๋Š” ์ด๋ฏธ ๋งŽ์€ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ๊ณผ ์‹œ์Šคํ…œ๋“ค์„ ๋งŒ๋“œ๋Š”๋ฐ ์‚ฌ์šฉ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  100%์˜ ํ…Œ์ŠคํŠธ ์ •ํ™•์„ฑ์„ ๊ฐ€์ง€๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ํ•˜์ง€๋งŒ ์ด๊ฒƒ์€ ์•„์ง๊นŒ์ง€๋„ ๋น ๋ฅด๊ฒŒ ๋ฐœ์ „ํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ƒˆ๋กœ์šด ํŠน์ง•๋“ค์ด ๋นˆ๋ฒˆํ•˜๊ฒŒ ์ถ”๊ฐ€๋˜๊ณ , ์˜ค๋ฅ˜๋“ค์ด ์ง€์†์ ์œผ๋กœ ์ˆ˜์ •๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ฝ”๋“œ๊ฐ€ ๊ณ„์†์ ์œผ๋กœ ํ–ฅ์ƒ๋˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.
์ด๊ฒƒ์ด ์•„์ง๋„ ์ตœ์‹  ๋ฒ„์ „์ด `0.x.x`์ธ ์ด์œ ์ž…๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ๊ฐ๊ฐ์˜ ๋ฒ„์ „๋“ค์ด ์ž ์žฌ์ ์œผ๋กœ ๋ณ€ํ•  ์ˆ˜ ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค. ์ด๋Š” <a href="https://semver.org/" class="external-link" target="_blank">์œ ์˜์  ๋ฒ„์ „</a> ๊ด€์Šต์„ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
์ง€๊ธˆ ๋ฐ”๋กœ **FastAPI**๋กœ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ๋งŒ๋“ค ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ์ด๋•Œ (์•„๋งˆ ์ง€๊ธˆ๊นŒ์ง€ ๊ทธ๋ž˜ ์™”๋˜ ๊ฒƒ์ฒ˜๋Ÿผ), ์‚ฌ์šฉํ•˜๋Š” ๋ฒ„์ „์ด ์ฝ”๋“œ์™€ ์ž˜ ๋งž๋Š”์ง€ ํ™•์ธํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
## `fastapi` ๋ฒ„์ „์„ ํ‘œ์‹œ
๊ฐ€์žฅ ๋จผ์ € ํ•ด์•ผํ•  ๊ฒƒ์€ ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์ด ์ž˜ ์ž‘๋™ํ•˜๋Š” ๊ฐ€์žฅ ์ตœ์‹ ์˜ ๊ตฌ์ฒด์ ์ธ **FastAPI** ๋ฒ„์ „์„ ํ‘œ์‹œํ•˜๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ ๋“ค์–ด, ์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์— `0.45.0` ๋ฒ„์ „์„ ์‚ฌ์šฉํ–ˆ๋‹ค๊ณ  ๊ฐ€์ •ํ•ฉ๋‹ˆ๋‹ค.
๋งŒ์•ฝ์— `requirements.txt` ํŒŒ์ผ์„ ์‚ฌ์šฉํ–ˆ๋‹ค๋ฉด, ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฒ„์ „์„ ๋ช…์„ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```txt
fastapi==0.45.0
```
์ด๊ฒƒ์€ `0.45.0` ๋ฒ„์ „์„ ์‚ฌ์šฉํ–ˆ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
๋˜๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์ด ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```txt
fastapi>=0.45.0,<0.46.0
```
์ด๊ฒƒ์€ `0.45.0` ๋ฒ„์ „๊ณผ ๊ฐ™๊ฑฐ๋‚˜ ๋†’์œผ๋ฉด์„œ `0.46.0` ๋ฒ„์ „ ๋ณด๋‹ค๋Š” ๋‚ฎ์€ ๋ฒ„์ „์„ ์‚ฌ์šฉํ–ˆ๋‹ค๋Š” ๊ฒƒ์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค. ์˜ˆ๋ฅผ ๋“ค์–ด, `0.45.2` ๋ฒ„์ „๊ณผ ๊ฐ™์€ ๊ฒฝ์šฐ๋Š” ํ•ด๋‹น ์กฐ๊ฑด์„ ๋งŒ์กฑํ•ฉ๋‹ˆ๋‹ค.
๋งŒ์•ฝ์— Poetry, Pipenv, ๋˜๋Š” ๊ทธ๋ฐ–์˜ ๋‹ค์–‘ํ•œ ์„ค์น˜ ๋„๊ตฌ๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค๋ฉด, ํŒจํ‚ค์ง€์— ๊ตฌ์ฒด์ ์ธ ๋ฒ„์ „์„ ์ •์˜ํ•  ์ˆ˜ ์žˆ๋Š” ๋ฐฉ๋ฒ•์„ ๊ฐ€์ง€๊ณ  ์žˆ์„ ๊ฒƒ์ž…๋‹ˆ๋‹ค.
## ์ด์šฉ๊ฐ€๋Šฅํ•œ ๋ฒ„์ „๋“ค
[Release Notes](../release-notes.md){.internal-link target=_blank}๋ฅผ ํ†ตํ•ด ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๋ฒ„์ „๋“ค์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.(์˜ˆ๋ฅผ ๋“ค์–ด, ๊ฐ€์žฅ ์ตœ์‹ ์˜ ๋ฒ„์ „์„ ํ™•์ธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.)
## ๋ฒ„์ „๋“ค์— ๋Œ€ํ•ด
์œ ์˜์  ๋ฒ„์ „ ๊ด€์Šต์„ ๋”ฐ๋ผ์„œ, `1.0.0` ์ดํ•˜์˜ ๋ชจ๋“  ๋ฒ„์ „๋“ค์€ ์ž ์žฌ์ ์œผ๋กœ ๊ธ‰๋ณ€ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
FastAPI๋Š” ์˜ค๋ฅ˜๋ฅผ ์ˆ˜์ •ํ•˜๊ณ , ์ผ๋ฐ˜์ ์ธ ๋ณ€๊ฒฝ์‚ฌํ•ญ์„ ์œ„ํ•ด "ํŒจ์น˜"๋ฒ„์ „์˜ ๊ด€์Šต์„ ๋”ฐ๋ฆ…๋‹ˆ๋‹ค.
!!! tip "ํŒ"
์—ฌ๊ธฐ์„œ ๋งํ•˜๋Š” "ํŒจ์น˜"๋ž€ ๋ฒ„์ „์˜ ๋งˆ์ง€๋ง‰ ์ˆซ์ž๋กœ, ์˜ˆ๋ฅผ ๋“ค์–ด `0.2.3` ๋ฒ„์ „์—์„œ "ํŒจ์น˜"๋Š” `3`์„ ์˜๋ฏธํ•ฉ๋‹ˆ๋‹ค.
๋”ฐ๋ผ์„œ ๋‹ค์Œ๊ณผ ๊ฐ™์ด ๋ฒ„์ „์„ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค:
```txt
fastapi>=0.45.0,<0.46.0
```
์ˆ˜์ •๋œ ์‚ฌํ•ญ๊ณผ ์ƒˆ๋กœ์šด ์š”์†Œ๋“ค์ด "๋งˆ์ด๋„ˆ" ๋ฒ„์ „์— ์ถ”๊ฐ€๋˜์—ˆ์Šต๋‹ˆ๋‹ค.
!!! tip "ํŒ"
"๋งˆ์ด๋„ˆ"๋ž€ ๋ฒ„์ „ ๋„˜๋ฒ„์˜ ๊ฐ€์šด๋ฐ ์ˆซ์ž๋กœ, ์˜ˆ๋ฅผ ๋“ค์–ด์„œ `0.2.3`์˜ "๋งˆ์ด๋„ˆ" ๋ฒ„์ „์€ `2`์ž…๋‹ˆ๋‹ค.
## FastAPI ๋ฒ„์ „์˜ ์—…๊ทธ๋ ˆ์ด๋“œ
์‘์šฉ ํ”„๋กœ๊ทธ๋žจ์„ ๊ฒ€์‚ฌํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
(Starlette ๋•๋ถ„์—), **FastAPI** ๋ฅผ ์ด์šฉํ•˜์—ฌ ๊ต‰์žฅํžˆ ์‰ฝ๊ฒŒ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. [Testing](../tutorial/testing.md){.internal-link target=_blank}๋ฌธ์„œ๋ฅผ ํ™•์ธํ•ด ๋ณด์‹ญ์‹œ์˜ค:
๊ฒ€์‚ฌ๋ฅผ ํ•ด๋ณด๊ณ  ๋‚œ ํ›„์—, **FastAPI** ๋ฒ„์ „์„ ๋” ์ตœ์‹ ์œผ๋กœ ์—…๊ทธ๋ ˆ์ด๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. ๊ทธ๋ฆฌ๊ณ  ์ฝ”๋“œ๋“ค์ด ํ…Œ์ŠคํŠธ์— ์ •์ƒ์ ์œผ๋กœ ์ž‘๋™ํ•˜๋Š”์ง€ ํ™•์ธ์„ ํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
๋งŒ์•ฝ์— ๋ชจ๋“  ๊ฒƒ์ด ์ •์ƒ ์ž‘๋™ํ•˜๊ฑฐ๋‚˜ ํ•„์š”ํ•œ ๋ถ€๋ถ„์„ ๋ณ€๊ฒฝํ•˜๊ณ , ๋ชจ๋“  ๊ฒ€์‚ฌ๋ฅผ ํ†ต๊ณผํ•œ๋‹ค๋ฉด, ์ƒˆ๋กœ์šด ๋ฒ„์ „์˜ `fastapi`๋ฅผ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
## Starlette์— ๋Œ€ํ•ด
`starlette`์˜ ๋ฒ„์ „์€ ํ‘œ์‹œํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.
์„œ๋กœ๋‹ค๋ฅธ ๋ฒ„์ „์˜ **FastAPI**๊ฐ€ ๊ตฌ์ฒด์ ์ด๊ณ  ์ƒˆ๋กœ์šด ๋ฒ„์ „์˜ Starlette์„ ์‚ฌ์šฉํ•  ๊ฒƒ์ž…๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋ฏ€๋กœ **FastAPI**๊ฐ€ ์•Œ๋งž์€ Starlette ๋ฒ„์ „์„ ์‚ฌ์šฉํ•˜๋„๋ก ํ•˜์‹ญ์‹œ์˜ค.
## Pydantic์— ๋Œ€ํ•ด
Pydantic์€ **FastAPI** ๋ฅผ ์œ„ํ•œ ๊ฒ€์‚ฌ๋ฅผ ํฌํ•จํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค. ๋”ฐ๋ผ์„œ, ์ƒˆ๋กœ์šด ๋ฒ„์ „์˜ Pydantic(`1.0.0`์ด์ƒ)์€ ํ•ญ์ƒ FastAPI์™€ ํ˜ธํ™˜๋ฉ๋‹ˆ๋‹ค.
์ž‘์—…์„ ํ•˜๊ณ  ์žˆ๋Š” `1.0.0` ์ด์ƒ์˜ ๋ชจ๋“  ๋ฒ„์ „๊ณผ `2.0.0` ์ดํ•˜์˜ Pydantic ๋ฒ„์ „์„ ํ‘œ์‹œํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
์˜ˆ๋ฅผ ๋“ค์–ด ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค:
```txt
pydantic>=1.2.0,<2.0.0
```
Loadingโ€ฆ
Cancel
Save