{"id":38455,"date":"2024-11-01T18:17:10","date_gmt":"2024-11-01T18:17:10","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38455"},"modified":"2024-11-26T06:44:17","modified_gmt":"2024-11-26T06:44:17","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-pydantic-%eb%aa%a8%eb%8d%b8%ec%9d%84-%ec%82%ac%ec%9a%a9%ed%95%9c-%ec%9a%94%ec%b2%ad-%eb%b0%94%eb%94%94-%ea%b2%80%ec%a6%9d","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38455\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d"},"content":{"rendered":"<p><body><\/p>\n<p>\n    FastAPI\ub294 Python\uc73c\ub85c \uc6f9 API\ub97c \uad6c\ucd95\ud560 \ub54c \ub9e4\uc6b0 \uc778\uae30\uac00 \ub192\uc740 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. FastAPI\uc758 \uac00\uc7a5 \ud070 \uc7a5\uc810 \uc911 \ud558\ub098\ub294 Pydantic\uc744 \uc774\uc6a9\ud55c \ub370\uc774\ud130 \uac80\uc99d\uc785\ub2c8\ub2e4. Pydantic\uc740 \uac15\ub825\ud55c \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac \ub3c4\uad6c\ub85c, Python\uc758 \ud0c0\uc785 \ud78c\ud305\uc744 \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uac80\uc99d\ud558\uace0 \uc9c1\ub82c\ud654\ud558\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.\n<\/p>\n<h2>1. FastAPI \uc18c\uac1c<\/h2>\n<p>\n    FastAPI\ub294 \ube60\ub978 API \uad6c\ucd95\uc744 \ubaa9\ud45c\ub85c \uc124\uacc4\ub41c Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc774\uba70, \uc131\ub2a5\uacfc \uc0dd\uc0b0\uc131\uc744 \ubaa8\ub450 \uace0\ub824\ud558\uc5ec \ub9cc\ub4e4\uc5b4\uc84c\uc2b5\ub2c8\ub2e4. \uc131\ub2a5\uc801\uc73c\ub85c\ub294 Node.js\uc640 Go\uc5d0 \uadfc\uc811\ud558\uba70, \uc26c\uc6b4 \uc0ac\uc6a9\uc131\uc744 \uac00\uc9c0\uace0 \uc788\uc5b4 API \uac1c\ubc1c\uc744 \ube60\ub974\uac8c \uc9c4\ud589\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h3>1.1 \uc8fc\uc694 \ud2b9\uc9d5<\/h3>\n<ul>\n<li><strong>\ube60\ub978 \uc131\ub2a5:<\/strong> Starlette\uc640 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \ube44\ub3d9\uae30 \ucc98\ub9ac\ub97c \uc9c0\uc6d0\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\uc790\ub3d9 \ubb38\uc11c\ud654:<\/strong> OpenAPI\uc640 JSON Schema\ub97c \uae30\ubc18\uc73c\ub85c \ud558\ub294 \uc790\ub3d9\ud654\ub41c API \ubb38\uc11c\ud654\ub97c \uc9c0\uc6d0\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ud0c0\uc785 \ud78c\ud305:<\/strong> Python 3.6 \uc774\uc0c1\uc758 \ubc84\uc804\uc744 \ud65c\uc6a9\ud558\uc5ec \ucf54\ub4dc \uac00\ub3c5\uc131\uc744 \ub192\uc774\uace0, \ub370\uc774\ud130 \uac80\uc99d\uc744 \uc6a9\uc774\ud558\uac8c \ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>2. Pydantic\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d<\/h2>\n<p>\n    FastAPI\uc5d0\uc11c \uc694\uccad \ubc14\ub514\ub97c \uac80\uc99d\ud558\ub294 \uac00\uc7a5 \ud754\ud55c \ubc29\ubc95\uc740 Pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. Pydantic \ubaa8\ub378\uc740 Python \ud074\ub798\uc2a4\ucc98\ub7fc \uc815\uc758\ub418\uba70, \ud074\ub798\uc2a4\uc758 \uc18d\uc131\uc740 \ud544\ub4dc\uc640 \uadf8\uc5d0 \ub300\ud55c \ud0c0\uc785 \ud78c\ud2b8\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 API\uc758 \uc694\uccad \ub370\uc774\ud130\ub97c \uac80\uc99d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h3>2.1 Pydantic \ubaa8\ub378 \uc815\uc758<\/h3>\n<p>\n    Pydantic \ubaa8\ub378\uc744 \uc815\uc758\ud558\ub294 \uae30\ubcf8 \ud615\uc2dd\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code class=\"language-python\">\nfrom pydantic import BaseModel\n\nclass User(BaseModel):\n    id: int\n    name: str\n    email: str\n    age: int\n<\/code><\/pre>\n<p>\n    \uc704 \ucf54\ub4dc\ub294 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \ub2f4\uace0 \uc788\ub294 <code>User<\/code> \ubaa8\ub378\uc744 \uc815\uc758\ud569\ub2c8\ub2e4. \uac01 \uc18d\uc131\uc740 \uadf8\uc5d0 \ud574\ub2f9\ud558\ub294 \ub370\uc774\ud130 \ud0c0\uc785\uc744 \uba85\uc2dc\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. Pydantic\uc740 \uc774 \ubaa8\ub378\uc744 \uae30\ubc18\uc73c\ub85c \ub370\uc774\ud130\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc0ac\ud569\ub2c8\ub2e4.\n<\/p>\n<h3>2.2 FastAPI\uc640 Pydantic \ubaa8\ub378\uc758 \ud1b5\ud569<\/h3>\n<p>\n    FastAPI\uc5d0\uc11c\ub294 \uacbd\ub85c \uc6b4\uc601\uccb4\uc81c\uc758 \ub9e4\uac1c\ubcc0\uc218\ub85c Pydantic \ubaa8\ub378\uc744 \ubc14\ub85c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \ud074\ub77c\uc774\uc5b8\ud2b8\uac00 \ubcf4\ub0b8 JSON \uc694\uccad\uc744 <code>User<\/code> \ubaa8\ub378\ub85c \uac80\uc99d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.post(\"\/users\/\")\nasync def create_user(user: User):\n    return {\"user_id\": user.id, \"name\": user.name}\n<\/code><\/pre>\n<p>\n    \uc704 \ucf54\ub4dc\uc5d0\uc11c <code>\/users\/<\/code> \uacbd\ub85c\uc5d0 \ub300\ud55c POST \uc694\uccad\uc774 \uc624\uba74, FastAPI\ub294 JSON \uc694\uccad \ubcf8\ubb38\uc744 <code>User<\/code> \ubaa8\ub378 \uc778\uc2a4\ud134\uc2a4\ub85c \ubcc0\ud658\ud558\uace0 \uac80\uc99d\ud569\ub2c8\ub2e4. \ub370\uc774\ud130\uac00 \uc720\ud6a8\ud558\uba74, \ud574\ub2f9 \ub370\uc774\ud130\uac00 <code>user<\/code> \ub9e4\uac1c\ubcc0\uc218\ub85c \uc804\ub2ec\ub429\ub2c8\ub2e4.\n<\/p>\n<h3>2.3 \ud544\ub4dc \uac80\uc99d<\/h3>\n<p>\n    Pydantic\uc740 \ud544\ub4dc \uac80\uc99d\uc744 \uc704\ud55c \uc5ec\ub7ec \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \ud544\ub4dc\uc5d0 \ub300\ud55c \uc81c\uc57d\uc870\uac74\uc774\ub098 \uac80\uc99d \ub85c\uc9c1\uc744 \ucd94\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<pre><code class=\"language-python\">\nfrom pydantic import EmailStr, conint\n\nclass User(BaseModel):\n    id: conint(ge=1)  # 1 \uc774\uc0c1\uc758 \uc815\uc218\ub9cc \ud5c8\uc6a9\n    name: str\n    email: EmailStr  # \uc720\ud6a8\ud55c \uc774\uba54\uc77c \ud615\uc2dd\n    age: conint(ge=0)  # 0 \uc774\uc0c1\uc758 \uc815\uc218\ub85c \uc720\ud6a8\uc131 \uac80\uc0ac\n<\/code><\/pre>\n<p>\n    \uc5ec\uae30\uc11c <code>conint<\/code>\uc640 <code>EmailStr<\/code>\uc740 \uac01\uac01 \uc815\uc218 \ubc94\uc704\uc640 \uc774\uba54\uc77c \ud615\uc2dd\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc0ac\ud569\ub2c8\ub2e4. \uc774\ub7f0 \uc81c\uc57d\uc870\uac74\uc744 \ud1b5\ud574 \uc798\ubabb\ub41c \uc785\ub825\uc744 \uc0ac\uc804\uc5d0 \ucc28\ub2e8\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h2>3. \uc694\uccad \ubc14\ub514 \uac80\uc99d\uc758 \uc2e4\uc81c \uc608\uc81c<\/h2>\n<p>\n    \uc544\ub798\ub294 FastAPI\uc640 Pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c \uc0ac\uc6a9\uc790 \uad00\ub9ac API\ub97c \uad6c\ud604\ud55c \uc608\uc785\ub2c8\ub2e4. \uc774 \uc608\uc81c\uc5d0\uc11c\ub294 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uc0dd\uc131\ud558\uace0, \uc870\ud68c\ud558\ub294 API\ub97c \uad6c\ud604\ud569\ub2c8\ub2e4.\n<\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import FastAPI\nfrom pydantic import BaseModel, EmailStr, conint\nfrom typing import List\n\napp = FastAPI()\n\nclass User(BaseModel):\n    id: conint(ge=1)\n    name: str\n    email: EmailStr\n    age: conint(ge=0)\n\n# \uba54\ubaa8\ub9ac\uc5d0 \uc0ac\uc6a9\uc790 \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud560 \ub9ac\uc2a4\ud2b8\nusers_db = []\n\n@app.post(\"\/users\/\")\nasync def create_user(user: User):\n    users_db.append(user)\n    return {\"user_id\": user.id, \"name\": user.name}\n\n@app.get(\"\/users\/\", response_model=List[User])\nasync def get_users():\n    return users_db\n<\/code><\/pre>\n<p>\n    \uc774 API\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4:\n<\/p>\n<ul>\n<li><strong>POST \/users\/:<\/strong> \uc0c8\ub85c\uc6b4 \uc0ac\uc6a9\uc790\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. Pydantic \ubaa8\ub378\uc744 \ud1b5\ud574 \uc694\uccad \ubc14\ub514\uc758 \uc720\ud6a8\uc131\uc744 \uac80\uc99d\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>GET \/users\/:<\/strong> \ud604\uc7ac \ub4f1\ub85d\ub41c \uc0ac\uc6a9\uc790 \ubaa9\ub85d\uc744 \uc870\ud68c\ud569\ub2c8\ub2e4. \uc800\uc7a5\ub41c \uc0ac\uc6a9\uc790 \ub370\uc774\ud130\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>3.1 API \ud14c\uc2a4\ud2b8<\/h3>\n<p>\n    FastAPI\ub294 Swagger UI\ub97c \ud1b5\ud574 API\ub97c \uc27d\uac8c \ud14c\uc2a4\ud2b8\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc11c\ubc84\ub97c \uc2e4\ud589\ud55c \ud6c4 <code>http:\/\/127.0.0.1:8000\/docs<\/code>\uc5d0 \uc811\uc18d\ud558\uba74, \uc2dc\uac01\uc801\uc73c\ub85c API\ub97c \ud14c\uc2a4\ud2b8\ud560 \uc218 \uc788\ub294 \uc778\ud130\ud398\uc774\uc2a4\uac00 \uc81c\uacf5\ub429\ub2c8\ub2e4.\n<\/p>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\n    \uc704 \uba85\ub839\uc5b4\ub85c FastAPI \uc11c\ubc84\ub97c \uc2e4\ud589\ud55c \ud6c4, \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c Swagger UI\uc5d0 \uc811\uc18d\ud574\ubcf4\uc138\uc694. API \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ud074\ub9ad\ud558\uace0, \uc694\uccad\uc5d0 \ub300\ud55c \ub370\uc774\ud130\ub97c \uc785\ub825\ud558\uc5ec \ud14c\uc2a4\ud2b8\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h3>3.2 \uc624\ub958 \ucc98\ub9ac<\/h3>\n<p>\n    Pydantic\uc740 \ubaa8\ub378 \uac1d\uccb4 \uc0dd\uc131 \uc2dc \uc624\ub958\ub97c \uac10\uc9c0\ud558\uace0, \uc790\ub3d9\uc73c\ub85c HTTPException\uc744 \ubc1c\uc0dd\uc2dc\ud0b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc774\uba54\uc77c \uc8fc\uc18c\ub97c \uc785\ub825\ud558\uba74 FastAPI\ub294 \uc790\ub3d9\uc73c\ub85c 422 Unprocessable Entity \uc0c1\ud0dc \ucf54\ub4dc\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.\n<\/p>\n<pre><code class=\"language-python\">\n@app.post(\"\/users\/\")\nasync def create_user(user: User):\n    if user.age &lt; 18:\n        raise HTTPException(status_code=400, detail=\"Must be at least 18.\")\n    users_db.append(user)\n    return {\"user_id\": user.id, \"name\": user.name}\n<\/code><\/pre>\n<p>\n    \uc704\uc758 \uc608\uc2dc\ub294 \uc0ac\uc6a9\uc790 \ub098\uc774\uac00 18\uc138 \ubbf8\ub9cc\uc77c \uacbd\uc6b0 \uc5d0\ub7ec\ub97c \ubc1c\uc0dd\uc2dc\ud0a4\ub294 \uc608\uc785\ub2c8\ub2e4. \uc774\ub807\uac8c FastAPI\uc640 Pydantic\uc740 \ud568\uaed8 \uc0ac\uc6a9\uc790 \uc815\uc758 \uc608\uc678 \ucc98\ub9ac\ub97c \uac04\ud3b8\ud558\uac8c \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n<\/p>\n<h2>4. \uacb0\ub860<\/h2>\n<p>\n    FastAPI\ub294 Pydantic\uc744 \ud65c\uc6a9\ud558\uc5ec \uc694\uccad \ubc14\ub514\uc5d0 \ub300\ud55c \uac80\uc99d\uc744 \uc27d\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \ub370\uc774\ud130 \ud0c0\uc785, \uc81c\uc57d \uc870\uac74, \uc774\uba54\uc77c \ud615\uc2dd \uac80\uc99d \ub4f1 \ub2e4\uc591\ud55c \uac80\uc99d \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uba70, \uc774\ub97c \ud1b5\ud574 API \uac1c\ubc1c \uacfc\uc815\uc5d0\uc11c \ubc1c\uc0dd\ud560 \uc218 \uc788\ub294 \uc624\ub958\ub97c \uc0ac\uc804\uc5d0 \ubc29\uc9c0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\uc640 Pydantic\uc744 \ud65c\uc6a9\ud558\uc5ec \uc2dc\uc758\uc801\uc808\ud558\uac8c API\ub97c \uad6c\ucd95\ud558\ub294 \uc5f0\uc2b5\uc744 \uc9c4\ud589\ud55c\ub2e4\uba74, \uc2e4\uc81c \ud504\ub85c\uc81d\ud2b8\uc5d0 \ud070 \ub3c4\uc6c0\uc774 \ub420 \uac83\uc785\ub2c8\ub2e4.\n<\/p>\n<p>\uc774 \uae00\uc774 FastAPI\uc640 Pydantic\uc744 \uc0ac\uc6a9\ud558\ub294 \ub370 \ub3c4\uc6c0\uc774 \ub418\uae30\ub97c \ubc14\ub78d\ub2c8\ub2e4. Now, it&#8217;s your turn to dive in and start building!<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 Python\uc73c\ub85c \uc6f9 API\ub97c \uad6c\ucd95\ud560 \ub54c \ub9e4\uc6b0 \uc778\uae30\uac00 \ub192\uc740 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. FastAPI\uc758 \uac00\uc7a5 \ud070 \uc7a5\uc810 \uc911 \ud558\ub098\ub294 Pydantic\uc744 \uc774\uc6a9\ud55c \ub370\uc774\ud130 \uac80\uc99d\uc785\ub2c8\ub2e4. Pydantic\uc740 \uac15\ub825\ud55c \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac \ub3c4\uad6c\ub85c, Python\uc758 \ud0c0\uc785 \ud78c\ud305\uc744 \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uac80\uc99d\ud558\uace0 \uc9c1\ub82c\ud654\ud558\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ube60\ub978 API \uad6c\ucd95\uc744 \ubaa9\ud45c\ub85c \uc124\uacc4\ub41c Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc774\uba70, \uc131\ub2a5\uacfc \uc0dd\uc0b0\uc131\uc744 \ubaa8\ub450 \uace0\ub824\ud558\uc5ec \ub9cc\ub4e4\uc5b4\uc84c\uc2b5\ub2c8\ub2e4. \uc131\ub2a5\uc801\uc73c\ub85c\ub294 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38455\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d&#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-38455","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, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \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\/38455\/\" \/>\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, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 Python\uc73c\ub85c \uc6f9 API\ub97c \uad6c\ucd95\ud560 \ub54c \ub9e4\uc6b0 \uc778\uae30\uac00 \ub192\uc740 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. FastAPI\uc758 \uac00\uc7a5 \ud070 \uc7a5\uc810 \uc911 \ud558\ub098\ub294 Pydantic\uc744 \uc774\uc6a9\ud55c \ub370\uc774\ud130 \uac80\uc99d\uc785\ub2c8\ub2e4. Pydantic\uc740 \uac15\ub825\ud55c \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac \ub3c4\uad6c\ub85c, Python\uc758 \ud0c0\uc785 \ud78c\ud305\uc744 \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uac80\uc99d\ud558\uace0 \uc9c1\ub82c\ud654\ud558\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ube60\ub978 API \uad6c\ucd95\uc744 \ubaa9\ud45c\ub85c \uc124\uacc4\ub41c Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc774\uba70, \uc131\ub2a5\uacfc \uc0dd\uc0b0\uc131\uc744 \ubaa8\ub450 \uace0\ub824\ud558\uc5ec \ub9cc\ub4e4\uc5b4\uc84c\uc2b5\ub2c8\ub2e4. \uc131\ub2a5\uc801\uc73c\ub85c\ub294 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38455\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:17:10+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:17+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\/38455\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38455\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d\",\"datePublished\":\"2024-11-01T18:17:10+00:00\",\"dateModified\":\"2024-11-26T06:44:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38455\/\"},\"wordCount\":88,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38455\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38455\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:17:10+00:00\",\"dateModified\":\"2024-11-26T06:44:17+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38455\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38455\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38455\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d\"}]},{\"@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, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \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\/38455\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 Python\uc73c\ub85c \uc6f9 API\ub97c \uad6c\ucd95\ud560 \ub54c \ub9e4\uc6b0 \uc778\uae30\uac00 \ub192\uc740 \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. FastAPI\uc758 \uac00\uc7a5 \ud070 \uc7a5\uc810 \uc911 \ud558\ub098\ub294 Pydantic\uc744 \uc774\uc6a9\ud55c \ub370\uc774\ud130 \uac80\uc99d\uc785\ub2c8\ub2e4. Pydantic\uc740 \uac15\ub825\ud55c \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac \ub3c4\uad6c\ub85c, Python\uc758 \ud0c0\uc785 \ud78c\ud305\uc744 \ud65c\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ub97c \uac80\uc99d\ud558\uace0 \uc9c1\ub82c\ud654\ud558\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 \ube60\ub978 API \uad6c\ucd95\uc744 \ubaa9\ud45c\ub85c \uc124\uacc4\ub41c Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc774\uba70, \uc131\ub2a5\uacfc \uc0dd\uc0b0\uc131\uc744 \ubaa8\ub450 \uace0\ub824\ud558\uc5ec \ub9cc\ub4e4\uc5b4\uc84c\uc2b5\ub2c8\ub2e4. \uc131\ub2a5\uc801\uc73c\ub85c\ub294 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d\"","og_url":"https:\/\/atmokpo.com\/w\/38455\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:17:10+00:00","article_modified_time":"2024-11-26T06:44:17+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\/38455\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38455\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d","datePublished":"2024-11-01T18:17:10+00:00","dateModified":"2024-11-26T06:44:17+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38455\/"},"wordCount":88,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38455\/","url":"https:\/\/atmokpo.com\/w\/38455\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:17:10+00:00","dateModified":"2024-11-26T06:44:17+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38455\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38455\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38455\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, pydantic \ubaa8\ub378\uc744 \uc0ac\uc6a9\ud55c \uc694\uccad \ubc14\ub514 \uac80\uc99d"}]},{"@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\/38455","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=38455"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38455\/revisions"}],"predecessor-version":[{"id":38456,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38455\/revisions\/38456"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}