{"id":38566,"date":"2024-11-01T18:18:19","date_gmt":"2024-11-01T18:18:19","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38566"},"modified":"2024-11-26T06:43:58","modified_gmt":"2024-11-26T06:43:58","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%eb%8f%84%ec%bb%a4-%eb%a1%9c%ec%bb%ac%ec%97%90-%ec%95%a0%ed%94%8c%eb%a6%ac%ec%bc%80%ec%9d%b4%ec%85%98-%eb%b0%b0%ed%8f%ac","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38566\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec"},"content":{"rendered":"<p><body><\/p>\n<p>\ucd5c\uadfc \uba87 \ub144 \uac04 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0\uc11c Python\uc758 \uc778\uae30\uac00 \uae09\uaca9\ud788 \uc99d\uac00\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788, FastAPI\ub294 \ube44\ub3d9\uae30\uc2dd \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uace0, \ub192\uc740 \uc131\ub2a5\uacfc \uc26c\uc6b4 \uc791\uc131 \uad6c\uc870 \ub355\ubd84\uc5d0 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4 \uc0ac\uc774\uc5d0\uc11c \uac01\uad11\ubc1b\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc11c\ubc84 \uac1c\ubc1c\uc744 \ud558\uace0, \ub3c4\ucee4(Docker)\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ubc30\ud3ec\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. FastAPI\ub780?<\/h2>\n<p>FastAPI\ub294 Python\uc73c\ub85c \uc791\uc131\ub41c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, RESTful API\ub97c \uc27d\uace0 \ube60\ub974\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4. \uc911\uc694\ud55c \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub370\uc774\ud130 \uac80\uc99d\uacfc \uc9c1\ub82c\ud654\ub97c \uc704\ud55c Pydantic\uc744 \ub0b4\uc7a5\ud558\uace0 \uc788\ub2e4\ub294 \uc810\uc785\ub2c8\ub2e4. \ube60\ub978 \uc18d\ub3c4\uc640 \uc26c\uc6b4 \uc0ac\uc6a9\ubc95 \ub355\ubd84\uc5d0 \ub9ce\uc740 \uc2a4\ud0c0\ud2b8\uc5c5\uacfc \ub300\uae30\uc5c5\uc5d0\uc11c \ucc44\ud0dd\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>1.1 FastAPI\uc758 \uc8fc\uc694 \ud2b9\uc9d5<\/h3>\n<ul>\n<li>\ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d \uc9c0\uc6d0<\/li>\n<li>\uc790\ub3d9\uc73c\ub85c API \ubb38\uc11c\ud654(Swagger UI \ubc0f ReDoc \uc0ac\uc6a9)<\/li>\n<li>\ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc9c1\ub82c\ud654 \uae30\ub2a5 \uc81c\uacf5<\/li>\n<li>\ube60\ub978 \ucc98\ub9ac \uc18d\ub3c4(Starlette \uae30\ubc18)<\/li>\n<li>\uc8fc\uc694 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \ud1b5\ud569 \uc9c0\uc6d0<\/li>\n<\/ul>\n<h2>2. FastAPI \uac1c\ubc1c \ud658\uacbd \uc124\uc815<\/h2>\n<p>FastAPI \ud504\ub85c\uc81d\ud2b8\ub97c \uc2dc\uc791\ud558\uae30 \uc704\ud574 \ud544\uc694\ud55c \uac1c\ubc1c \ud658\uacbd\uc744 \uc124\uc815\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. Python 3.6 \uc774\uc0c1\uc774 \ud544\uc694\ud558\uba70, FastAPI\uc640 Uvicorn\uc744 \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4.<\/p>\n<h3>2.1 FastAPI \ubc0f Uvicorn \uc124\uce58<\/h3>\n<pre><code>pip install fastapi uvicorn<\/code><\/pre>\n<h3>2.2 \uac04\ub2e8\ud55c FastAPI \uc11c\ubc84 \uad6c\ud604<\/h3>\n<p>\uac04\ub2e8\ud55c &#8220;Hello World&#8221; API\ub97c \ub9cc\ub4e4\uc5b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc544\ub798 \ucf54\ub4dc\ub97c main.py \ud30c\uc77c\uc5d0 \uc791\uc131\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"Hello\": \"World\"}\n    <\/code><\/pre>\n<p>\uc774\uc81c \uc11c\ubc84\ub97c \uc2e4\ud589\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ud130\ubbf8\ub110\uc5d0\uc11c \uc544\ub798 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\uc11c\ubc84\uac00 \uc815\uc0c1\uc801\uc73c\ub85c \uc2e4\ud589\ub418\uba74 <a href=\"http:\/\/127.0.0.1:8000\">http:\/\/127.0.0.1:8000<\/a> \uc5d0 \uc811\uc18d\ud558\uc5ec &#8220;Hello World&#8221; \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>3. FASTAPI API Endpoint \uad6c\uc131<\/h2>\n<p>\uc774\uc81c FastAPI\uc758 \ub2e4\uc591\ud55c API \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ucd94\uac00\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uad00\ub9ac\ud558\ub294 \uac04\ub2e8\ud55c API\ub97c \uc124\uacc4\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 \ub370\uc774\ud130 \ubaa8\ub378 \uc815\uc758<\/h3>\n<p>Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130 \ubaa8\ub378\uc744 \uc815\uc758\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\nfrom pydantic import BaseModel\nfrom typing import List\n\nclass User(BaseModel):\n    id: int\n    name: str\n    email: str\n    <\/code><\/pre>\n<h3>3.2 \uc0ac\uc6a9\uc790 \ubaa9\ub85d\uacfc API \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \ucd94\uac00<\/h3>\n<p>\uc0ac\uc6a9\uc790 \ubaa9\ub85d\uc744 \uc800\uc7a5\ud558\uace0, \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c CRUD\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\nusers = []\n\n@app.post(\"\/users\/\", response_model=User)\nasync def create_user(user: User):\n    users.append(user)\n    return user\n\n@app.get(\"\/users\/\", response_model=List[User])\nasync def read_users():\n    return users\n\n@app.get(\"\/users\/{user_id}\", response_model=User)\nasync def read_user(user_id: int):\n    user = next((user for user in users if user.id == user_id), None)\n    if user is None:\n        return {\"error\": \"User not found\"}\n    return user\n    <\/code><\/pre>\n<h2>4. \ub3c4\ucee4(Docker) \uc124\uc815<\/h2>\n<p>\uc774\uc81c FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ub3c4\ucee4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ucee8\ud14c\uc774\ub108\ud654\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ub3c4\ucee4\ub294 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ud328\ud0a4\uc9d5, \ubc30\ud3ec \ubc0f \uc2e4\ud589\ud560 \uc218 \uc788\ub294 \ud50c\ub7ab\ud3fc\uc785\ub2c8\ub2e4.<\/p>\n<h3>4.1 \ub3c4\ucee4 \uc124\uce58<\/h3>\n<p>\ub3c4\ucee4\ub294 \uc544\ub798 \ub9c1\ud06c\uc5d0\uc11c \ub2e4\uc6b4\ub85c\ub4dc\ud558\uc5ec \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><a href=\"https:\/\/www.docker.com\/products\/docker-desktop\">Docker Desktop<\/a><\/li>\n<\/ul>\n<h3>4.2 \ub3c4\ucee4\ud30c\uc77c \uc791\uc131<\/h3>\n<p>\uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud558\uae30 \uc704\ud574 \ub3c4\ucee4\ud30c\uc77c\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \ud504\ub85c\uc81d\ud2b8 \ub8e8\ud2b8\uc5d0 <code>Dockerfile<\/code>\uc774\ub77c\ub294 \uc774\ub984\uc73c\ub85c \uc544\ub798 \ub0b4\uc6a9\uc744 \uc791\uc131\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\n# \uc0ac\uc6a9\ud558\uace0\uc790 \ud558\ub294 \uc774\ubbf8\uc9c0\ub97c \uc9c0\uc815\nFROM tiangolo\/uvicorn-gunicorn-fastapi:python3.9\n\n# \uc791\uc5c5 \ub514\ub809\ud1a0\ub9ac \uc124\uc815\nWORKDIR \/app\n\n# \uc758\uc874\uc131 \ud30c\uc77c \ubcf5\uc0ac\nCOPY requirements.txt .\nRUN pip install --no-cache-dir -r requirements.txt\n\n# \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ucf54\ub4dc \ubcf5\uc0ac\nCOPY .\/app \/app\n\n# \ucee8\ud14c\uc774\ub108\uac00 \uc2dc\uc791\ub420 \ub54c \uc2e4\ud589\ud560 \ucee4\ub9e8\ub4dc\nCMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"80\"]\n    <\/code><\/pre>\n<h3>4.3 requirements.txt \uc791\uc131<\/h3>\n<p>\ud504\ub85c\uc81d\ud2b8\uc5d0 \ud544\uc694\ud55c \ud328\ud0a4\uc9c0 \ubaa9\ub85d\uc744 \uc791\uc131\ud569\ub2c8\ub2e4. \uc544\ub798\ub294 <code>requirements.txt<\/code>\uc758 \uc608\uc2dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>\nfastapi\nuvicorn\npydantic\n    <\/code><\/pre>\n<h3>4.4 \ub3c4\ucee4 \uc774\ubbf8\uc9c0 \ube4c\ub4dc \ubc0f \uc2e4\ud589<\/h3>\n<p>\uc774\uc81c \ub3c4\ucee4 \uc774\ubbf8\uc9c0\ub97c \ube4c\ub4dc\ud558\uace0 \uc2e4\ud589\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ud130\ubbf8\ub110\uc5d0\uc11c \uc544\ub798 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>\n# \ub3c4\ucee4 \uc774\ubbf8\uc9c0 \ube4c\ub4dc\ndocker build -t fastapi-app .\n\n# \ub3c4\ucee4 \ucee8\ud14c\uc774\ub108 \uc2e4\ud589\ndocker run -d -p 80:80 fastapi-app\n    <\/code><\/pre>\n<p>\uc774\uc81c \uc6f9 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <a href=\"http:\/\/localhost\">http:\/\/localhost<\/a> \uc5d0 \uc811\uc18d\ud558\uc5ec FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \ub3c4\ucee4\uc5d0\uc11c \uc798 \uc2e4\ud589\ub418\uace0 \uc788\ub294\uc9c0 \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>5. \ub85c\uceec \ubc30\ud3ec \ubc0f \ud14c\uc2a4\ud2b8<\/h2>\n<p>FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ub85c\uceec \ud658\uacbd\uc5d0\uc11c \ubc30\ud3ec\ud558\uae30 \uc704\ud574\uc11c\ub294 \uc55e\uc11c \uc124\uc815\ud55c \ub3c4\ucee4 \ucee8\ud14c\uc774\ub108\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \ubc30\ud3ec \ud6c4 \ud14c\uc2a4\ud2b8\ub3c4 \ud544\uc694\ud569\ub2c8\ub2e4. Postman\uacfc \uac19\uc740 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud558\uc5ec API \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ud14c\uc2a4\ud2b8\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.1 Postman \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>Postman\uc744 \uc0ac\uc6a9\ud558\uc5ec API \uc694\uccad\uc744 \ubcf4\ub0b4\uace0 \uc751\ub2f5\uc744 \ud655\uc778\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uba3c\uc800 Postman\uc744 \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<ul>\n<li><a href=\"https:\/\/www.postman.com\/downloads\/\">Postman \ub2e4\uc6b4\ub85c\ub4dc<\/a><\/li>\n<\/ul>\n<h3>5.2 \uc0ac\uc6a9\uc790 \uc0dd\uc131 \ud14c\uc2a4\ud2b8<\/h3>\n<p>\uc0c8\ub85c\uc6b4 \uc0ac\uc6a9\uc790\ub97c \ucd94\uac00\ud558\uae30 \uc704\ud574 POST \uc694\uccad\uc744 \ubcf4\ub0c5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\uba54\uc18c\ub4dc: POST<\/li>\n<li>URL: <code>http:\/\/localhost\/users\/<\/code><\/li>\n<li>Body(Nuclei):<\/li>\n<pre><code>\n{\n    \"id\": 1,\n    \"name\": \"\ud64d\uae38\ub3d9\",\n    \"email\": \"hong@example.com\"\n}\n<\/code><\/pre>\n<\/ul>\n<p>\uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \ud655\uc778\ud558\uae30 \uc704\ud574 GET \uc694\uccad\uc744 \ubcf4\ub0b4\uc5b4 \uc0dd\uc131\ud55c \uc0ac\uc6a9\uc790\ub97c \uc870\ud68c\ud574\ubd05\ub2c8\ub2e4.<\/p>\n<h2>6. \uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \ud1b5\ud574 \ub85c\uceec \ud658\uacbd\uc5d0\uc11c \ubc30\ud3ec\ud558\ub294 \uacfc\uc815\uc744 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. FastAPI\uc758 \ube44\ub3d9\uae30 \uc9c0\uc6d0\uacfc \ub370\uc774\ud130 \uac80\uc99d \uae30\ub2a5 \ub355\ubd84\uc5d0 \ub354\uc6b1 \uc0dd\uc0b0\uc801\uc778 \uac1c\ubc1c\uc774 \uac00\ub2a5\ud588\uc2b5\ub2c8\ub2e4. \ub3c4\ucee4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud568\uc73c\ub85c\uc368 \ubc30\ud3ec\uc640 \uad00\ub9ac\ub97c \ub354\uc6b1 \ud6a8\uc728\uc801\uc73c\ub85c \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc2e4\uc81c \uc801\uc6a9 \uc2dc\uc5d0\ub294 CI\/CD \ud30c\uc774\ud504\ub77c\uc778\uc744 \ucd94\uac00\ud558\uc5ec \ub354 \ub098\uc740 \ubc30\ud3ec \ud504\ub85c\uc138\uc2a4\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc774 \uae00\uc744 \ud1b5\ud574 FastAPI\uc640 \ub3c4\ucee4\uc758 \uc774\uc810\uc744 \uc774\ud574\ud558\uace0, \uc2e4\uc81c \ud504\ub85c\uc81d\ud2b8\uc5d0 \uc801\uc6a9\ud574\ubcf4\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4. \uac10\uc0ac\ud569\ub2c8\ub2e4!<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucd5c\uadfc \uba87 \ub144 \uac04 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0\uc11c Python\uc758 \uc778\uae30\uac00 \uae09\uaca9\ud788 \uc99d\uac00\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788, FastAPI\ub294 \ube44\ub3d9\uae30\uc2dd \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uace0, \ub192\uc740 \uc131\ub2a5\uacfc \uc26c\uc6b4 \uc791\uc131 \uad6c\uc870 \ub355\ubd84\uc5d0 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4 \uc0ac\uc774\uc5d0\uc11c \uac01\uad11\ubc1b\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc11c\ubc84 \uac1c\ubc1c\uc744 \ud558\uace0, \ub3c4\ucee4(Docker)\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ubc30\ud3ec\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 Python\uc73c\ub85c \uc791\uc131\ub41c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, RESTful API\ub97c \uc27d\uace0 \ube60\ub974\uac8c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38566\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[183],"tags":[],"class_list":["post-38566","post","type-post","status-publish","format-standard","hentry","category-fastapi"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/atmokpo.com\/w\/38566\/\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ucd5c\uadfc \uba87 \ub144 \uac04 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0\uc11c Python\uc758 \uc778\uae30\uac00 \uae09\uaca9\ud788 \uc99d\uac00\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788, FastAPI\ub294 \ube44\ub3d9\uae30\uc2dd \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uace0, \ub192\uc740 \uc131\ub2a5\uacfc \uc26c\uc6b4 \uc791\uc131 \uad6c\uc870 \ub355\ubd84\uc5d0 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4 \uc0ac\uc774\uc5d0\uc11c \uac01\uad11\ubc1b\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc11c\ubc84 \uac1c\ubc1c\uc744 \ud558\uace0, \ub3c4\ucee4(Docker)\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ubc30\ud3ec\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 Python\uc73c\ub85c \uc791\uc131\ub41c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, RESTful API\ub97c \uc27d\uace0 \ube60\ub974\uac8c &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38566\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:18:19+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:43:58+00:00\" \/>\n<meta name=\"author\" content=\"root\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:site\" content=\"@bebubo4\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"root\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"1\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec\",\"datePublished\":\"2024-11-01T18:18:19+00:00\",\"dateModified\":\"2024-11-26T06:43:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/\"},\"wordCount\":70,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38566\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:18:19+00:00\",\"dateModified\":\"2024-11-26T06:43:58+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38566\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38566\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/atmokpo.com\/w\/#website\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/atmokpo.com\/w\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\",\"name\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"url\":\"https:\/\/atmokpo.com\/w\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"contentUrl\":\"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png\",\"width\":400,\"height\":400,\"caption\":\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\"},\"image\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/bebubo4\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\",\"name\":\"root\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g\",\"caption\":\"root\"},\"sameAs\":[\"http:\/\/atmokpo.com\/w\"],\"url\":\"https:\/\/atmokpo.com\/w\/author\/root\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/atmokpo.com\/w\/38566\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ucd5c\uadfc \uba87 \ub144 \uac04 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0\uc11c Python\uc758 \uc778\uae30\uac00 \uae09\uaca9\ud788 \uc99d\uac00\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \ud2b9\ud788, FastAPI\ub294 \ube44\ub3d9\uae30\uc2dd \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uace0, \ub192\uc740 \uc131\ub2a5\uacfc \uc26c\uc6b4 \uc791\uc131 \uad6c\uc870 \ub355\ubd84\uc5d0 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4 \uc0ac\uc774\uc5d0\uc11c \uac01\uad11\ubc1b\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc11c\ubc84 \uac1c\ubc1c\uc744 \ud558\uace0, \ub3c4\ucee4(Docker)\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ubc30\ud3ec\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 Python\uc73c\ub85c \uc791\uc131\ub41c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, RESTful API\ub97c \uc27d\uace0 \ube60\ub974\uac8c &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec\"","og_url":"https:\/\/atmokpo.com\/w\/38566\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:18:19+00:00","article_modified_time":"2024-11-26T06:43:58+00:00","author":"root","twitter_card":"summary_large_image","twitter_creator":"@bebubo4","twitter_site":"@bebubo4","twitter_misc":{"\uae00\uc4f4\uc774":"root","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"1\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/38566\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38566\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec","datePublished":"2024-11-01T18:18:19+00:00","dateModified":"2024-11-26T06:43:58+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38566\/"},"wordCount":70,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38566\/","url":"https:\/\/atmokpo.com\/w\/38566\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:18:19+00:00","dateModified":"2024-11-26T06:43:58+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38566\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38566\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38566\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub85c\uceec\uc5d0 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \ubc30\ud3ec"}]},{"@type":"WebSite","@id":"https:\/\/atmokpo.com\/w\/#website","url":"https:\/\/atmokpo.com\/w\/","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","description":"","publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/atmokpo.com\/w\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Organization","@id":"https:\/\/atmokpo.com\/w\/#organization","name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","url":"https:\/\/atmokpo.com\/w\/","logo":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/","url":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","contentUrl":"https:\/\/atmokpo.com\/w\/wp-content\/uploads\/2024\/11\/logo.png","width":400,"height":400,"caption":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8"},"image":{"@id":"https:\/\/atmokpo.com\/w\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/bebubo4"]},{"@type":"Person","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7","name":"root","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/708197b41fc6435a7ce22d951b25d4a47e9e904270cb1f04682d4f025066f80c?s=96&d=mm&r=g","caption":"root"},"sameAs":["http:\/\/atmokpo.com\/w"],"url":"https:\/\/atmokpo.com\/w\/author\/root\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38566","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/comments?post=38566"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38566\/revisions"}],"predecessor-version":[{"id":38567,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38566\/revisions\/38567"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38566"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38566"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38566"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}