{"id":38420,"date":"2024-11-01T18:16:45","date_gmt":"2024-11-01T18:16:45","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38420"},"modified":"2024-11-26T06:44:23","modified_gmt":"2024-11-26T06:44:23","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-%ed%83%80%ec%9e%85-%ec%a0%95%ec%9d%98%ec%9d%98-%ea%b0%95%eb%a0%a5%ed%95%a8","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38420\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568"},"content":{"rendered":"<p><body><\/p>\n<article>\n<p>\n            FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uad6c\ucd95\ud558\uae30 \uc704\ud55c \uace0\uc131\ub2a5 Python \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Starlette\uacfc Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \uac1c\ubc1c\uc790\uac00 \ube60\ub974\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\uc9c0\ub9cc, \uc774 \ud504\ub808\uc784\uc6cc\ud06c\uc758 \uc9c4\uc815\ud55c \ud798\uc740 \uc2a4\ud0a4\ub9c8\uc640 \ud0c0\uc785 \uc815\uc758\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 FastAPI\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc774\ud574\ud558\uace0, \uc751\ub2f5 \ubc0f \ud0c0\uc785 \uc815\uc758\uac00 \uc5b4\ub5bb\uac8c API\uc758 \uc548\uc815\uc131, \ubb38\uc11c\ud654, \uc720\uc6a9\uc131\uc744 \ub192\uc774\ub294\uc9c0\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n        <\/p>\n<h2>1. FastAPI\ub780?<\/h2>\n<p>\n            FastAPI\ub294 \ube60\ub974\uace0 \uc27d\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\ub294 Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d \uc9c0\uc6d0, \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc790\ub3d9 \ubb38\uc11c\ud654\uc758 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. FastAPI\ub294 \ud2b9\ud788 RESTful API\ub97c \uc124\uacc4\ud558\ub294 \ub370 \ub9e4\uc6b0 \uc720\uc6a9\ud558\uba70, Pydantic\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \uac80\uc99d, \uc9c1\ub82c\ud654 \ubc0f \ubb38\uc11c\ud654\ub97c \uc9c0\uc6d0\ud569\ub2c8\ub2e4.\n        <\/p>\n<h2>2. \uc2a4\ud0a4\ub9c8\uc758 \uac1c\ub150<\/h2>\n<p>\n            \uc2a4\ud0a4\ub9c8(Schema)\ub294 \ub370\uc774\ud130 \uad6c\uc870\ub97c \uc815\uc758\ud558\ub294 \uccad\uc0ac\uc9c4\uc785\ub2c8\ub2e4. API\uc5d0\uc11c \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud568\uc73c\ub85c\uc368 \uc694\uccad\uacfc \uc751\ub2f5\uc5d0\uc11c \uc5b4\ub5a4 \ub370\uc774\ud130\uac00 \uc0ac\uc6a9\ub418\ub294\uc9c0 \uba85\ud655\ud558\uac8c \uc54c \uc218 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\uc5d0\uc11c\ub294 Pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc27d\uac8c \uc2a4\ud0a4\ub9c8\ub97c \uc815\uc758\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub7ec\ud55c \ubaa8\ub378\uc740 \ub370\uc774\ud130\uc758 \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc790\ub3d9\uc73c\ub85c \uc218\ud589\ud558\uace0, \ube44\uc988\ub2c8\uc2a4 \ub85c\uc9c1\uc744 \ub2e8\uc21c\ud654\ud569\ub2c8\ub2e4.\n        <\/p>\n<h3>2.1 Pydantic \uc18c\uac1c<\/h3>\n<p>\n            Pydantic\uc740 Python \ub370\uc774\ud130 \ud074\ub798\uc2a4\ub97c \uae30\ubc18\uc73c\ub85c \ud558\ub294 \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac \ub77c\uc774\ube0c\ub7ec\ub9ac\uc785\ub2c8\ub2e4. FastAPI\uc640 \ud1b5\ud569\ub418\uc5b4 \uc720\ud6a8\uc131 \uac80\uc0ac, \ub370\uc774\ud130 \ubcc0\ud658 \ubc0f \uc2a4\ud0a4\ub9c8 \uc0dd\uc131 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. Pydantic\uc740 \ud0c0\uc785 \ud78c\ud2b8\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uc815\uc758\ud558\uace0, \ub355\ud0c0\uc774\ud551(duck typing)\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \ud0c0\uc785\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc0ac\ud569\ub2c8\ub2e4.\n        <\/p>\n<h2>3. \ud0c0\uc785 \uc815\uc758\uc758 \ud798<\/h2>\n<p>\n            FastAPI\uc5d0\uc11c \ud0c0\uc785 \uc2dc\uc2a4\ud15c\uc740 API\uc758 \uc2e0\ub8b0\uc131\uc744 \ub192\uc774\uace0, \uc790\ub3d9 \ubb38\uc11c\ud654\ub97c \uac00\ub2a5\ud558\uac8c \ud569\ub2c8\ub2e4. \ud0c0\uc785\uc744 \uba85\uc2dc\ud558\uba74, FastAPI\ub294 \uc774\ub97c \uae30\ubc18\uc73c\ub85c \uc790\ub3d9\uc73c\ub85c API \ubb38\uc11c\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790\uac00 \uc798\ubabb\ub41c \ud0c0\uc785\uc758 \ub370\uc774\ud130\ub97c \uc694\uccad\ud558\uba74 FastAPI\ub294 \uc790\ub3d9\uc73c\ub85c \uc624\ub958\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uac1c\ubc1c\uc790\ub294 \ubcf4\ub2e4 \uc548\uc804\ud558\uace0 \uc77c\uad00\ub41c API\ub97c \uc720\uc9c0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n        <\/p>\n<h3>3.1 \uc608\uc81c \ucf54\ub4dc\uc640 \uc124\uba85<\/h3>\n<p>\uc544\ub798\ub294 \uac04\ub2e8\ud55c FastAPI \uc571\uc744 \ub9cc\ub4dc\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.<\/p>\n<pre><code>from fastapi import FastAPI\nfrom pydantic import BaseModel\nfrom typing import List\n\napp = FastAPI()\n\nclass Item(BaseModel):\n    id: int\n    name: str\n    price: float\n\nclass ResponseModel(BaseModel):\n    message: str\n    items: List[Item]\n\n@app.get(\"\/items\/\", response_model=ResponseModel)\nasync def get_items():\n    fake_items = [\n        {\"id\": 1, \"name\": \"Item 1\", \"price\": 10.5},\n        {\"id\": 2, \"name\": \"Item 2\", \"price\": 20.0},\n    ]\n    return {\"message\": \"Items retrieved successfully\", \"items\": fake_items}\n        <\/code><\/pre>\n<p>\n            \uc704\uc758 \ucf54\ub4dc\ub294 FastAPI\uc640 Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c GET API\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. <code>Item<\/code> \ud074\ub798\uc2a4\ub294 \uac1c\ubcc4 \uc544\uc774\ud15c\uc758 \uad6c\uc870\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. <code>ResponseModel<\/code> \ud074\ub798\uc2a4\ub294 API \uc751\ub2f5\uc758 \uad6c\uc870\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. <code>get_items<\/code> \ud568\uc218\ub294 \uc544\uc774\ud15c \ubaa9\ub85d\uc744 \ubc18\ud658\ud558\uba70, \uc774\ub54c <code>response_model<\/code> \ud30c\ub77c\ubbf8\ud130\ub97c \uc0ac\uc6a9\ud574 \uc751\ub2f5 \ubaa8\ub378\uc744 \uc815\uc758\ud569\ub2c8\ub2e4. \uc774\ub294 FastAPI\uac00 \uc790\ub3d9\uc73c\ub85c JSON \uc751\ub2f5\uc744 \uc0dd\uc131\ud558\uace0 \ubb38\uc11c\ud654\ub97c \uc81c\uacf5\ud558\ub294 \ub370 \ub3c4\uc6c0\uc744 \uc90d\ub2c8\ub2e4.\n        <\/p>\n<h2>4. \ub370\uc774\ud130 \uac80\uc99d<\/h2>\n<p>\n            Pydantic\uc744 \uc0ac\uc6a9\ud558\uba74 \ub370\uc774\ud130 \uac80\uc99d\uc744 \uc27d\uac8c \uc218\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \ubaa8\ub378 \uc815\uc758 \uc2dc \ud0c0\uc785 \ud78c\ud2b8\ub97c \ucd94\uac00\ud558\uba74 FastAPI\ub294 \uc774 \uc815\ubcf4\ub97c \ud65c\uc6a9\ud558\uc5ec API \uc694\uccad\uc744 \uac80\uc99d\ud569\ub2c8\ub2e4. \uc694\uccad \ub370\uc774\ud130\uac00 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc73c\uba74 FastAPI\ub294 \uc801\uc808\ud55c \uc624\ub958 \uba54\uc2dc\uc9c0\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.\n        <\/p>\n<h3>4.1 \uc694\uccad \ub370\uc774\ud130 \uac80\uc99d \uc608\uc81c<\/h3>\n<p>\n            \uc544\ub798\ub294 POST \uc694\uccad\uc73c\ub85c \uc544\uc774\ud15c\uc744 \ucd94\uac00\ud558\ub294 API\uc758 \uc608\uc81c\uc785\ub2c8\ub2e4.\n        <\/p>\n<pre><code>\nfrom fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom typing import List\n\napp = FastAPI()\n\nclass Item(BaseModel):\n    id: int\n    name: str\n    price: float\n\nitems = []\n\n@app.post(\"\/items\/\", response_model=Item)\nasync def create_item(item: Item):\n    for existing_item in items:\n        if existing_item.id == item.id:\n            raise HTTPException(status_code=400, detail=\"Item with this ID already exists.\")\n    items.append(item)\n    return item\n        <\/code><\/pre>\n<p>\n            \uc704\uc758 \ucf54\ub4dc\ub294 POST \uc694\uccad\uc744 \ud1b5\ud574 \uc0c8\ub85c\uc6b4 \uc544\uc774\ud15c\uc744 \ucd94\uac00\ud558\ub294 API\ub97c \uc815\uc758\ud569\ub2c8\ub2e4. <code>Item<\/code>\uc774 \uc774\ubbf8 \uc874\uc7ac\ud558\ub294\uc9c0 \ud655\uc778\ud558\ub294 \ub85c\uc9c1\uc744 \ucd94\uac00\ud558\uc5ec \ub370\uc774\ud130 \uc720\ud6a8\uc131\uc744 \uad00\ub9ac\ud569\ub2c8\ub2e4. FastAPI\ub294 \uc790\ub3d9\uc73c\ub85c \uc694\uccad(body)\uc744 <code>Item<\/code> \ud0c0\uc785\uc73c\ub85c \ubcc0\ud658\ud558\uace0, \ud0c0\uc785 \uac80\uc99d\uc744 \uc218\ud589\ud569\ub2c8\ub2e4.\n        <\/p>\n<h2>5. \uc790\ub3d9 \ubb38\uc11c\ud654<\/h2>\n<p>\n            FastAPI\ub294 OpenAPI \uc2a4\ud399\uc5d0 \ub530\ub77c API \ubb38\uc11c\ub97c \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc774 \ubb38\uc11c\uc5d0\ub294 \ubaa8\ub4e0 \uc5d4\ub4dc\ud3ec\uc778\ud2b8, \uc694\uccad \ubc0f \uc751\ub2f5 \ubaa8\ub378\uc774 \ub098\uc5f4\ub418\uba70, \uc0ac\uc6a9\uc790 \uce5c\ud654\uc801\uc778 UI\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. FastAPI\uc758 \uc790\ub3d9\ud654\ub41c \ubb38\uc11c\ud654 \uae30\ub2a5\uc740 API\uc758 \uc0ac\uc6a9\uc131\uc744 \uadf9\ub300\ud654\ud558\uace0, \uac1c\ubc1c\uc790\uac00 API\ub97c \ubcf4\ub2e4 \uc27d\uac8c \uc774\ud574\ud558\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4.\n        <\/p>\n<h3>5.1 Swagger UI\uc640 ReDoc<\/h3>\n<p>\n            FastAPI\ub294 \uae30\ubcf8\uc801\uc73c\ub85c Swagger UI\uc640 ReDoc\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <code>http:\/\/localhost:8000\/docs<\/code>\uc5d0 \uc811\uadfc\ud558\uba74 Swagger UI\ub97c \ud1b5\ud574 API \ubb38\uc11c\ub97c \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4. <code>\/redoc<\/code> \uacbd\ub85c\ub97c \ud1b5\ud574 ReDoc\uc744 \uc0ac\uc6a9\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \ubb38\uc11c\ub4e4\uc740 API\uc758 \ubaa8\ub4e0 \uc5d4\ub4dc\ud3ec\uc778\ud2b8, \ud30c\ub77c\ubbf8\ud130, \ub370\uc774\ud130 \ubaa8\ub378\uc5d0 \ub300\ud55c \uc815\ubcf4\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.\n        <\/p>\n<h2>6. \uc2e4\uc804 \uc608\uc81c &#8211; \uac04\ub2e8\ud55c \ube14\ub85c\uadf8 API<\/h2>\n<p>\n            \uc774\uc81c FastAPI\uc758 \ud0c0\uc785 \uc815\uc758\uc640 \uc2a4\ud0a4\ub9c8\uc758 \uac15\ub825\ud568\uc744 \uc2e4\uc81c\ub85c \uad6c\ud604\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uac04\ub2e8\ud55c \ube14\ub85c\uadf8 API\ub97c \uad6c\ucd95\ud558\uace0, \ud3ec\uc2a4\ud2b8 \ubc0f \ub313\uae00\uc744 \uad00\ub9ac\ud558\ub294 \uae30\ub2a5\uc744 \ucd94\uac00\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n        <\/p>\n<h3>6.1 \ube14\ub85c\uadf8 \ubaa8\ub378 \uc815\uc758<\/h3>\n<pre><code>\nfrom fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom typing import List\n\napp = FastAPI()\n\nclass Comment(BaseModel):\n    username: str\n    content: str\n\nclass Post(BaseModel):\n    id: int\n    title: str\n    content: str\n    comments: List[Comment] = []\n\nposts = []\n\n@app.post(\"\/posts\/\", response_model=Post)\nasync def create_post(post: Post):\n    for existing_post in posts:\n        if existing_post.id == post.id:\n            raise HTTPException(status_code=400, detail=\"Post with this ID already exists.\")\n    posts.append(post)\n    return post\n\n@app.get(\"\/posts\/\", response_model=List[Post])\nasync def get_posts():\n    return posts\n        <\/code><\/pre>\n<p>\n            \uc704\uc758 \ucf54\ub4dc\ub294 \ube14\ub85c\uadf8 \ud3ec\uc2a4\ud2b8\uc640 \ub313\uae00\uc744 \uc815\uc758\ud558\ub294 \ubaa8\ub378\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \ube14\ub85c\uadf8 API\uc5d0\ub294 \ud3ec\uc2a4\ud2b8\ub97c \uc0dd\uc131\ud558\uace0 \uc870\ud68c\ud558\ub294 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uac00 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4. <code>create_post<\/code> \ud568\uc218\ub294 \ud3ec\uc2a4\ud2b8 \uac1d\uccb4\ub97c \ub9ac\uc2a4\ud2b8\uc5d0 \ucd94\uac00\ud558\uace0, \uc911\ubcf5 ID\ub97c \ucc98\ub9ac\ud558\uae30 \uc704\ud574 \uc624\ub958 \ucc98\ub9ac\ub97c \uc218\ud589\ud569\ub2c8\ub2e4.\n        <\/p>\n<h2>7. \uacb0\ub860<\/h2>\n<p>\n            FastAPI\ub294 \ube60\ub974\uace0 \uac04\ud3b8\ud55c API \uad6c\ucd95\uc744 \uc704\ud55c \uac15\ub825\ud55c \ub3c4\uad6c\uc785\ub2c8\ub2e4. Pydantic\uc744 \ud65c\uc6a9\ud55c \ud0c0\uc785 \uc815\uc758\uc640 \uc2a4\ud0a4\ub9c8 \uad00\ub9ac \uae30\ub2a5\uc740 API\uc758 \uc548\uc815\uc131 \ubc0f \ubb38\uc11c\ud654\uc758 \uc9c8\uc744 \ub192\uc785\ub2c8\ub2e4. \uc774\ub7ec\ud55c \uae30\ub2a5\ub4e4\uc740 \uac1c\ubc1c\uc790\uac00 \ubcf4\ub2e4 \uc548\uc804\ud558\uace0 \ud6a8\uc728\uc801\uc778 API\ub97c \uc124\uacc4\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc90d\ub2c8\ub2e4.\n        <\/p>\n<p>\n            \ubcf8 \uae00\uc5d0\uc11c\ub294 FastAPI\uc758 \uae30\ubcf8 \uac1c\ub150\uacfc \ud568\uaed8 \uc2a4\ud0a4\ub9c8\uc640 \ud0c0\uc785 \uc815\uc758\uc758 \uc911\uc694\uc131\uc744 \uc124\uba85\ud558\uc600\uc2b5\ub2c8\ub2e4. \uc2e4\uc804 \uc608\uc81c\ub97c \ud1b5\ud574 API\ub97c \uc791\uc131\ud558\ub294 \uacfc\uc815\uc5d0\uc11c \ubc1c\uc0dd\ud558\ub294 \uc5ec\ub7ec \uac00\uc9c0 \uc0c1\ud669\uc744 \ub2e4\ub8e8\uc5c8\uc2b5\ub2c8\ub2e4. FastAPI\uc758 \ub3c4\uad6c\ub4e4\uc744 \uc0ac\uc6a9\ud558\uba74 API \uac1c\ubc1c\uc774 \ub354\uc6b1 \ud6a8\uc728\uc801\uc774\uace0 \uc990\uac70\uc6b4 \uacbd\ud5d8\uc774 \ub420 \uac83\uc785\ub2c8\ub2e4.\n        <\/p>\n<footer>\n<p>\uc791\uc131\uc790: {Your Name}<\/p>\n<p>\ub0a0\uc9dc: {Current Date}<\/p>\n<\/footer>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uad6c\ucd95\ud558\uae30 \uc704\ud55c \uace0\uc131\ub2a5 Python \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Starlette\uacfc Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \uac1c\ubc1c\uc790\uac00 \ube60\ub974\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\uc9c0\ub9cc, \uc774 \ud504\ub808\uc784\uc6cc\ud06c\uc758 \uc9c4\uc815\ud55c \ud798\uc740 \uc2a4\ud0a4\ub9c8\uc640 \ud0c0\uc785 \uc815\uc758\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 FastAPI\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc774\ud574\ud558\uace0, \uc751\ub2f5 \ubc0f \ud0c0\uc785 \uc815\uc758\uac00 \uc5b4\ub5bb\uac8c API\uc758 \uc548\uc815\uc131, \ubb38\uc11c\ud654, \uc720\uc6a9\uc131\uc744 \ub192\uc774\ub294\uc9c0\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 \ube60\ub974\uace0 \uc27d\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38420\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568&#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-38420","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, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \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\/38420\/\" \/>\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, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uad6c\ucd95\ud558\uae30 \uc704\ud55c \uace0\uc131\ub2a5 Python \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Starlette\uacfc Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \uac1c\ubc1c\uc790\uac00 \ube60\ub974\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\uc9c0\ub9cc, \uc774 \ud504\ub808\uc784\uc6cc\ud06c\uc758 \uc9c4\uc815\ud55c \ud798\uc740 \uc2a4\ud0a4\ub9c8\uc640 \ud0c0\uc785 \uc815\uc758\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 FastAPI\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc774\ud574\ud558\uace0, \uc751\ub2f5 \ubc0f \ud0c0\uc785 \uc815\uc758\uac00 \uc5b4\ub5bb\uac8c API\uc758 \uc548\uc815\uc131, \ubb38\uc11c\ud654, \uc720\uc6a9\uc131\uc744 \ub192\uc774\ub294\uc9c0\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 \ube60\ub974\uace0 \uc27d\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38420\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:16:45+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:23+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=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568\",\"datePublished\":\"2024-11-01T18:16:45+00:00\",\"dateModified\":\"2024-11-26T06:44:23+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/\"},\"wordCount\":92,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38420\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:16:45+00:00\",\"dateModified\":\"2024-11-26T06:44:23+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38420\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38420\/#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, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568\"}]},{\"@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, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \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\/38420\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 API\ub97c \uad6c\ucd95\ud558\uae30 \uc704\ud55c \uace0\uc131\ub2a5 Python \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Starlette\uacfc Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \uac1c\ubc1c\uc790\uac00 \ube60\ub974\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3c4\uc640\uc8fc\uc9c0\ub9cc, \uc774 \ud504\ub808\uc784\uc6cc\ud06c\uc758 \uc9c4\uc815\ud55c \ud798\uc740 \uc2a4\ud0a4\ub9c8\uc640 \ud0c0\uc785 \uc815\uc758\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \uae00\uc5d0\uc11c\ub294 FastAPI\uc758 \uc2a4\ud0a4\ub9c8\ub97c \uc774\ud574\ud558\uace0, \uc751\ub2f5 \ubc0f \ud0c0\uc785 \uc815\uc758\uac00 \uc5b4\ub5bb\uac8c API\uc758 \uc548\uc815\uc131, \ubb38\uc11c\ud654, \uc720\uc6a9\uc131\uc744 \ub192\uc774\ub294\uc9c0\ub97c \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. 1. FastAPI\ub780? FastAPI\ub294 \ube60\ub974\uace0 \uc27d\uac8c API\ub97c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568\"","og_url":"https:\/\/atmokpo.com\/w\/38420\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:16:45+00:00","article_modified_time":"2024-11-26T06:44:23+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":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/atmokpo.com\/w\/38420\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38420\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 &#8211; \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568","datePublished":"2024-11-01T18:16:45+00:00","dateModified":"2024-11-26T06:44:23+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38420\/"},"wordCount":92,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38420\/","url":"https:\/\/atmokpo.com\/w\/38420\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc2a4\ud0a4\ub9c8 - \uc751\ub2f5, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:16:45+00:00","dateModified":"2024-11-26T06:44:23+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38420\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38420\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38420\/#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, \ud0c0\uc785 \uc815\uc758\uc758 \uac15\ub825\ud568"}]},{"@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\/38420","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=38420"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38420\/revisions"}],"predecessor-version":[{"id":38421,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38420\/revisions\/38421"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}