{"id":38606,"date":"2024-11-01T18:18:37","date_gmt":"2024-11-01T18:18:37","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38606"},"modified":"2024-11-26T06:43:52","modified_gmt":"2024-11-26T06:43:52","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%ec%8a%a4%ed%82%a4%eb%a7%88-%ec%9d%91%eb%8b%b5-%eb%9d%bc%ec%9a%b0%ed%84%b0%ec%97%90-%ec%a0%95%ec%9d%98%ed%95%9c-%ec%9d%91%eb%8b%b5%ec%97%90-%eb%8c%80","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38606\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85"},"content":{"rendered":"<p><body><\/p>\n<p>FastAPI\ub294 \ud604\ub300 \uc6f9 API\ub97c \uac04\ud3b8\ud558\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uace0\uc18d \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc694\uc998 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4\uc774 Flask\ub098 Django \ub300\uc2e0 FastAPI\ub97c \uc120\ud0dd\ud558\ub294 \uc774\uc720\ub294 \ube60\ub974\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uc7a5\uc810\uacfc \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc774\uc6a9\ud55c \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \uc751\ub2f5 \uc2a4\ud0a4\ub9c8, \uadf8\ub9ac\uace0 \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. FastAPI \uc18c\uac1c<\/h2>\n<p>FastAPI\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc7a5\uc810\uc744 \uac00\uc9c0\uace0 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\uc2e0\uc18d\ud558\uac8c API \uac1c\ubc1c\uc774 \uac00\ub2a5\ud558\ub2e4.<\/li>\n<li>\ub370\uc774\ud130 \uac80\uc99d\uc744 \uc790\ub3d9\uc73c\ub85c \uc218\ud589\ud558\uba70 \uc778\ud154\ub9ac\uc13c\uc2a4 \uc9c0\uc6d0\uc774 \ub6f0\uc5b4\ub098\ub2e4.<\/li>\n<li>\ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uc5ec \ub192\uc740 \uc131\ub2a5\uc744 \ubc1c\ud718\ud55c\ub2e4.<\/li>\n<li>OpenAPI \ubc0f JSON Schema\ub97c \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ud55c\ub2e4.<\/li>\n<\/ul>\n<h2>2. FastAPI\uc758 \uc751\ub2f5 \uc2a4\ud0a4\ub9c8<\/h2>\n<p>FastAPI\ub294 Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130 \uac80\uc99d \ubc0f \ub370\uc774\ud130 \uc9c1\ub82c\ud654\ub97c \uc218\ud589\ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 API\uc758 \uc785\ub825 \ubc0f \ucd9c\ub825 \ub370\uc774\ud130\uc758 \uad6c\uc870\ub97c \uac04\ud3b8\ud558\uac8c \uc815\uc758\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc751\ub2f5 \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud558\uae30 \uc704\ud574\uc11c\ub294 Pydantic \ubaa8\ub378\uc744 \uc0dd\uc131\ud558\uace0, \uc774\ub97c FastAPI\uc758 \uacbd\ub85c \ud568\uc218\uc758 \uc751\ub2f5 \ud0c0\uc785\uc73c\ub85c \uc124\uc815\ud558\uba74 \ub429\ub2c8\ub2e4.<\/p>\n<h3>2.1 Pydantic \ubaa8\ub378 \uc815\uc758<\/h3>\n<p>Pydantic \ubaa8\ub378\uc744 \uc815\uc758\ud558\uae30 \uc704\ud574\uc11c\ub294 \ud074\ub798\uc2a4\ub97c \ub9cc\ub4e4\uc5b4\uc57c \ud569\ub2c8\ub2e4. \uc544\ub798\uc758 \uc608\uc2dc\ub294 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \ud45c\ud604\ud558\uae30 \uc704\ud55c Pydantic \ubaa8\ub378\uc785\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-python\">\nfrom pydantic import BaseModel\n\nclass User(BaseModel):\n    id: int\n    username: str\n    email: str\n    full_name: str = None  # \uc120\ud0dd\uc801\uc778 \ud544\ub4dc\n<\/code><\/pre>\n<p>\uc704\uc758 \uc608\uc5d0\uc11c <code>User<\/code> \ud074\ub798\uc2a4\ub294 FastAPI\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc751\ub2f5 \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. \uac01 \ud544\ub4dc\ub294 \ud574\ub2f9 \ub370\uc774\ud130 \ud0c0\uc785\uc744 \uc9c0\uc815\ud558\uba70, \uc120\ud0dd\uc801 \ud544\ub4dc\ub294 \uae30\ubcf8\uac12\uc744 <code>None<\/code>\uc73c\ub85c \uc124\uc815\ud569\ub2c8\ub2e4.<\/p>\n<h3>2.2 \uacbd\ub85c \ud568\uc218\uc5d0\uc11c \uc751\ub2f5 \uc2a4\ud0a4\ub9c8 \uc0ac\uc6a9\ud558\uae30<\/h3>\n<p>\uc815\uc758\ub41c Pydantic \ubaa8\ub378\uc744 FastAPI\uc758 \uacbd\ub85c \ud568\uc218\uc758 \ubc18\ud658 \ud0c0\uc785\uc73c\ub85c \uc0ac\uc6a9\ud558\uc5ec, API\uc758 \uc751\ub2f5 \ub370\uc774\ud130 \ud0c0\uc785\uc744 \uba85\ud655\ud558\uac8c \ub098\ud0c0\ub0bc \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4:<\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/users\/{user_id}\", response_model=User)\nasync def read_user(user_id: int):\n    return User(id=user_id, username=\"JohnDoe\", email=\"john@example.com\", full_name=\"John Doe\")\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\uc5d0\uc11c <code>response_model=User<\/code> \uc778\uc790\ub97c \ud1b5\ud574 FastAPI\ub294 \uc774 \uacbd\ub85c\uc5d0\uc11c \ubc18\ud658\ub418\ub294 \ub370\uc774\ud130\uac00 <code>User<\/code> \ubaa8\ub378\uc5d0 \ub9de\ub294\uc9c0 \uac80\uc99d\ud569\ub2c8\ub2e4. \ub9cc\uc57d \ubc18\ud658\ub418\ub294 \ub370\uc774\ud130\uac00 \ubaa8\ub378\uacfc \uc77c\uce58\ud558\uc9c0 \uc54a\ub294 \uacbd\uc6b0, FastAPI\ub294 \uc790\ub3d9\uc73c\ub85c \uc624\ub958 \uc751\ub2f5\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<h2>3. \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5<\/h2>\n<p>FastAPI\uc5d0\uc11c\ub294 \uacbd\ub85c\ub97c \uc815\uc758\ud558\uae30 \uc704\ud574 \ub77c\uc6b0\ud130\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub294 \ucf54\ub4dc\uc758 \uad6c\uc870\ub97c \uac1c\uc120\ud558\uace0, \uc5ec\ub7ec \uacbd\ub85c\ub97c \uadf8\ub8f9\ud654\ud558\uc5ec \uad00\ub9ac\ud558\uae30 \uc27d\uac8c \ud569\ub2c8\ub2e4. \ubcc4\ub3c4\uc758 \ub77c\uc6b0\ud130\ub97c \uc0dd\uc131\ud558\uace0 \uc774\ub97c \uba54\uc778 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \ud3ec\ud568\uc2dc\ucf1c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 \ub77c\uc6b0\ud130 \uc0dd\uc131<\/h3>\n<p>\uc544\ub798\ub294 \uc0ac\uc6a9\uc790\ub97c \uad00\ub9ac\ud558\ub294 \ub77c\uc6b0\ud130\ub97c \ub9cc\ub4dc\ub294 \uc608\uc2dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import APIRouter\n\nuser_router = APIRouter()\n\n@user_router.get(\"\/users\/{user_id}\", response_model=User)\nasync def get_user(user_id: int):\n    return User(id=user_id, username=\"JohnDoe\", email=\"john@example.com\", full_name=\"John Doe\")\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uac00\uc838\uc624\ub294 API\ub97c \uc815\uc758\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. <code>APIRouter<\/code> \ud074\ub798\uc2a4\ub97c \uc778\uc2a4\ud134\uc2a4\ud654\ud558\uc5ec <code>user_router<\/code> \uac1d\uccb4\ub97c \uc0dd\uc131\ud55c \ud6c4, \uacbd\ub85c \ud568\uc218\uc640 \uc751\ub2f5 \ubaa8\ub378\uc744 \uc124\uc815\ud569\ub2c8\ub2e4.<\/p>\n<h3>3.2 \uba54\uc778 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \ub77c\uc6b0\ud130 \ud3ec\ud568\ud558\uae30<\/h3>\n<p>\uc0dd\uc131\ud55c \ub77c\uc6b0\ud130\ub97c \uba54\uc778 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0 \uc5f0\uacb0\ud558\uae30 \uc704\ud574\uc11c\ub294 <code>include_router<\/code> \uba54\uc11c\ub4dc\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-python\">\napp.include_router(user_router)\n<\/code><\/pre>\n<p>\uc774\uc81c \uba54\uc778 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 <code>user_router<\/code>\uc5d0\uc11c \uc815\uc758\ud55c \ubaa8\ub4e0 \uacbd\ub85c\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>4. \uc751\ub2f5\uc758 \uc9c1\ub82c\ud654 \ubc0f \uac80\uc99d<\/h2>\n<p>FastAPI\ub294 Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc751\ub2f5 \ub370\uc774\ud130\ub97c \uc790\ub3d9\uc73c\ub85c \uc9c1\ub82c\ud654\ud569\ub2c8\ub2e4. \uae30\ubcf8\uc801\uc73c\ub85c \uac1d\uccb4\ub294 JSON \ud615\uc2dd\uc73c\ub85c \ubcc0\ud658\ub418\uc5b4 \ud074\ub77c\uc774\uc5b8\ud2b8\uc5d0\uac8c \uc804\uc1a1\ub429\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c FastAPI\ub294 \ub370\uc774\ud130\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc99d\ud558\uae30 \ub54c\ubb38\uc5d0, \ud074\ub77c\uc774\uc5b8\ud2b8\ub294 \ud56d\uc0c1 \uc77c\uad00\ub41c \ub370\uc774\ud130\ub97c \uc218\uc2e0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>4.1 \uc751\ub2f5 \uc608\uc81c<\/h3>\n<p>\uc774\uc81c \uc2e4\uc81c\ub85c API\ub97c \ud638\ucd9c\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \uace0\uc720\ud55c ID\ub97c \uc694\uccad\ud558\uba74, \uc11c\ubc84\ub294 \ud574\ub2f9 \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c JSON \ud615\uc2dd\uc73c\ub85c \ubc18\ud658\ud558\uac8c \ub429\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4:<\/p>\n<pre><code class=\"language-shell\">\ncurl -X GET \"http:\/\/localhost:8000\/users\/1\"\n<\/code><\/pre>\n<p>\uc704 \uc694\uccad\uc5d0 \ub300\ud55c \uc751\ub2f5\uc740 \ub2e4\uc74c\uacfc \uac19\uc744 \uac83\uc785\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-json\">\n{\n    \"id\": 1,\n    \"username\": \"JohnDoe\",\n    \"email\": \"john@example.com\",\n    \"full_name\": \"John Doe\"\n}\n<\/code><\/pre>\n<h3>4.2 \uc5d0\ub7ec \ucc98\ub9ac<\/h3>\n<p>FastAPI\ub294 \ubaa8\ub378 \uac80\uc99d \uacfc\uc815\uc5d0\uc11c \ubb38\uc81c\uac00 \ubc1c\uc0dd\ud558\uba74 \uc790\ub3d9\uc73c\ub85c \uc624\ub958 \uc751\ub2f5\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc798\ubabb\ub41c \ub370\uc774\ud130\ud615\uc744 \uc694\uccad\ud558\uba74:<\/p>\n<pre><code class=\"language-shell\">\ncurl -X GET \"http:\/\/localhost:8000\/users\/not_a_number\"\n<\/code><\/pre>\n<p>\uc11c\ubc84\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc624\ub958 \uc751\ub2f5\uc744 \ub9ac\ud134\ud569\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-json\">\n{\n    \"detail\": [\n        {\n            \"loc\": [\"path\", \"user_id\"],\n            \"msg\": \"value is not a valid integer\",\n            \"type\": \"type_error.integer\"\n        }\n    ]\n}\n<\/code><\/pre>\n<h2>5. \ubcf4\uc548\uacfc \uc624\ub958 \uad00\ub9ac<\/h2>\n<p>API \uc751\ub2f5\uc744 \uc548\uc804\ud558\uac8c \uc720\uc9c0\ud558\uace0 \uc624\ub958\ub97c \ud6a8\uacfc\uc801\uc73c\ub85c \uad00\ub9ac\ud558\ub294 \uac83\uc740 \uc11c\ubc84 \uac1c\ubc1c\uc758 \ud575\uc2ec \uc694\uc18c\uc785\ub2c8\ub2e4. FastAPI\ub294 \ub2e4\uc591\ud55c \ubcf4\uc548 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uba70, \ubaa8\ub4e0 \uc624\ub958\ub97c \uc138\ubc00\ud558\uac8c \uc81c\uc5b4\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\uc744 \uac16\ucd94\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.1 OAuth2 \ubc0f JWT \uc778\uc99d<\/h3>\n<p>FastAPI\ub294 OAuth2 \ubc0f JWT\ub97c \uc0ac\uc6a9\ud55c \uc778\uc99d\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 API \uc811\uadfc\uc744 \uc81c\ud55c\ud558\uace0, \uc0ac\uc6a9\uc790 \ub370\uc774\ud130\ub97c \ubcf4\ud638\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.2 \uc0ac\uc6a9\uc790 \uc815\uc758 \uc624\ub958 \uc751\ub2f5<\/h3>\n<p>FastAPI\ub294 \uc0ac\uc6a9\uc790 \uc815\uc758 \uc624\ub958 \ucc98\ub9ac\ub97c \uc27d\uac8c \ud560 \uc218 \uc788\ub3c4\ub85d \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \uc544\ub798\uc640 \uac19\uc774 \uc624\ub958 \ubc1c\uc0dd \uc2dc \uc0ac\uc6a9\uc790 \uc815\uc758 \uc751\ub2f5\uc744 \ub9ac\ud134\ud558\ub3c4\ub85d \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import HTTPException\n\n@app.get(\"\/users\/{user_id}\", response_model=User)\nasync def get_user(user_id: int):\n    if user_id &lt;= 0:\n        raise HTTPException(status_code=400, detail=\"Invalid user ID\")\n    return User(id=user_id, username=\"JohnDoe\", email=\"john@example.com\", full_name=\"John Doe\")\n<\/code><\/pre>\n<p>\uc704 \uc608\uc2dc\ub294 \uc0ac\uc6a9\uc790 ID\uac00 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc744 \uacbd\uc6b0 \uc0ac\uc6a9\uc790 \uc815\uc758 \uc624\ub958\ub97c \ubc1c\uc0dd\uc2dc\ud0a4\ub294 \uc608\uc2dc\uc785\ub2c8\ub2e4.<\/p>\n<h2>6. \ub9c8\ubb34\ub9ac<\/h2>\n<p>FastAPI\ub294 \uc6f9 API\ub97c \uac1c\ubc1c\ud558\ub294 \ub370 \ub9ce\uc740 \uc7a5\uc810\uc744 \uc81c\uacf5\ud558\uba70, \uc2a4\ud0a4\ub9c8 \uc815\uc758\uc640 \ub77c\uc6b0\ud130\ub97c \uc774\uc6a9\ud55c \uad6c\uc870\uc801 \uc811\uadfc \ubc29\uc2dd\uc740 \uc548\uc815\uc801\uc774\uace0 \uc720\uc9c0 \ubcf4\uc218\uac00 \uc6a9\uc774\ud55c \ucf54\ub4dc\ub97c \ub9cc\ub4e4 \uc218 \uc788\uac8c \ud569\ub2c8\ub2e4. \uc751\ub2f5 \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud558\uace0, \ub77c\uc6b0\ud130\ub97c \ud3ec\ud568\ud558\uc5ec API \uc751\ub2f5\uc744 \uad00\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ub17c\uc758\ud588\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \ubc29\ubc95\ub4e4\uc744 \ud1b5\ud558\uc5ec, \uc5ec\ub7ec\ubd84\uc740 \ub354 \ub098\uc740 API\ub97c \uc124\uacc4\ud560 \uc218 \uc788\ub294 \uae30\ucd08\ub97c \ub2e4\uc84c\uc744 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<p>FastAPI\ub294 Python\uc758 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uacb0\ud569\ud558\uc5ec \uc6f9 \uac1c\ubc1c\uc744 \ud6e8\uc52c \uc6a9\uc774\ud558\uac8c \ub9cc\ub4e4\uc5b4 \uc90d\ub2c8\ub2e4. \uc55e\uc73c\ub85c\ub3c4 FastAPI\uc640 \ud568\uaed8 \ub2e4\uc591\ud55c API\ub97c \uac1c\ubc1c\ud574 \ubcf4\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4!<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 \ud604\ub300 \uc6f9 API\ub97c \uac04\ud3b8\ud558\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uace0\uc18d \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc694\uc998 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4\uc774 Flask\ub098 Django \ub300\uc2e0 FastAPI\ub97c \uc120\ud0dd\ud558\ub294 \uc774\uc720\ub294 \ube60\ub974\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uc7a5\uc810\uacfc \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc774\uc6a9\ud55c \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \uc751\ub2f5 \uc2a4\ud0a4\ub9c8, \uadf8\ub9ac\uace0 \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc7a5\uc810\uc744 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38606\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85&#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-38606","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, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \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\/38606\/\" \/>\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, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 \ud604\ub300 \uc6f9 API\ub97c \uac04\ud3b8\ud558\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uace0\uc18d \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc694\uc998 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4\uc774 Flask\ub098 Django \ub300\uc2e0 FastAPI\ub97c \uc120\ud0dd\ud558\ub294 \uc774\uc720\ub294 \ube60\ub974\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uc7a5\uc810\uacfc \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc774\uc6a9\ud55c \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \uc751\ub2f5 \uc2a4\ud0a4\ub9c8, \uadf8\ub9ac\uace0 \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc7a5\uc810\uc744 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38606\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:18:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:43:52+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\/38606\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38606\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85\",\"datePublished\":\"2024-11-01T18:18:37+00:00\",\"dateModified\":\"2024-11-26T06:43:52+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38606\/\"},\"wordCount\":59,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38606\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38606\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:18:37+00:00\",\"dateModified\":\"2024-11-26T06:43:52+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38606\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38606\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38606\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85\"}]},{\"@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, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \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\/38606\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 \ud604\ub300 \uc6f9 API\ub97c \uac04\ud3b8\ud558\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uace0\uc18d \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc694\uc998 \ub9ce\uc740 \uac1c\ubc1c\uc790\ub4e4\uc774 Flask\ub098 Django \ub300\uc2e0 FastAPI\ub97c \uc120\ud0dd\ud558\ub294 \uc774\uc720\ub294 \ube60\ub974\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub294 \uc7a5\uc810\uacfc \ub2e4\uc591\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uae30 \ub54c\ubb38\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc774\uc6a9\ud55c \uc11c\ubc84 \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \uc751\ub2f5 \uc2a4\ud0a4\ub9c8, \uadf8\ub9ac\uace0 \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud574 \uae4a\uc774 \uc788\uac8c \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc7a5\uc810\uc744 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85\"","og_url":"https:\/\/atmokpo.com\/w\/38606\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:18:37+00:00","article_modified_time":"2024-11-26T06:43:52+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\/38606\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38606\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85","datePublished":"2024-11-01T18:18:37+00:00","dateModified":"2024-11-26T06:43:52+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38606\/"},"wordCount":59,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38606\/","url":"https:\/\/atmokpo.com\/w\/38606\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:18:37+00:00","dateModified":"2024-11-26T06:43:52+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38606\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38606\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38606\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ub77c\uc6b0\ud130\uc5d0 \uc815\uc758\ud55c \uc751\ub2f5\uc5d0 \ub300\ud55c \uc124\uba85"}]},{"@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\/38606","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=38606"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38606\/revisions"}],"predecessor-version":[{"id":38607,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38606\/revisions\/38607"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38606"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38606"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38606"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}