{"id":38402,"date":"2024-11-01T18:16:31","date_gmt":"2024-11-01T18:16:31","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38402"},"modified":"2024-11-26T06:44:26","modified_gmt":"2024-11-26T06:44:26","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%ec%95%a1%ec%84%b8%ec%8a%a4-%ed%86%a0%ed%81%b0-%ec%83%9d%ec%84%b1%ea%b3%bc-%ea%b2%80%ec%a6%9d","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38402\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d"},"content":{"rendered":"<p><body><\/p>\n<article>\n<header>\n<p>\uc791\uc131\uc790: \uc870\uad11\ud615<\/p>\n<p>\ub0a0\uc9dc: 2024\ub144 11\uc6d4 26\uc77c<\/p>\n<\/header>\n<section>\n<h2>1. \uc11c\ub860<\/h2>\n<p>\n                FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud558\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uba70 \ucd5c\uc801\ud654\ub41c \uc131\ub2a5\uc744 \uc790\ub791\ud569\ub2c8\ub2e4. RESTful API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 FastAPI\uc758 \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub370\uc774\ud130 \uac80\uc99d\uacfc \uc790\ub3d9 \ubb38\uc11c \uc0dd\uc131 \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ub2e4\ub8f9\ub2c8\ub2e4. \uc561\uc138\uc2a4 \ud1a0\ud070\uc740 \uc778\uc99d \ubc0f \uad8c\ud55c \ubd80\uc5ec\uc5d0 \ud544\uc218\uc801\uc774\uba70, \uae54\ub054\ud558\uace0 \uc548\uc804\ud55c API\ub97c \ub9cc\ub4dc\ub294 \ub370 \uc911\uc694\ud55c \uc694\uc18c\uc785\ub2c8\ub2e4.\n            <\/p>\n<\/section>\n<section>\n<h2>2. FastAPI \uae30\ubcf8 \uc124\uc815<\/h2>\n<p>FastAPI\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574 \uba3c\uc800 \ud544\uc694\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4. \uc544\ub798 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 FastAPI\uc640 \ud544\uc694\ud55c \uc885\uc18d\uc131\uc744 \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<pre><code class=\"language-bash\">pip install fastapi[all] python-jose<\/code><\/pre>\n<p>\n                \ub2e4\uc74c\uc73c\ub85c FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \uac00\uc7a5 \uae30\ubcf8\uc801\uc778 FastAPI \uc11c\ubc84\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc744 \ubcf4\uc5ec\uc90d\ub2c8\ub2e4.\n            <\/p>\n<pre><code class=\"language-python\">\nfrom fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/\")\nasync def root():\n    return {\"message\": \"Hello, FastAPI!\"}\n            <\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub97c \uc2e4\ud589\ud55c \ud6c4 \uc6f9 \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <code>http:\/\/localhost:8000<\/code>\uc5d0 \uc811\uc18d\ud558\uba74 &#8220;Hello, FastAPI!&#8221;\ub77c\ub294 \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>3. JWT(Json Web Token) \uc774\ud574\ud558\uae30<\/h2>\n<p>\n                \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uad6c\ud604\ud558\uae30 \uc704\ud574\uc11c\ub294 JWT\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4. JWT\ub294 \ud074\ub77c\uc774\uc5b8\ud2b8\uc640 \uc11c\ubc84 \uac04\uc758 \uc548\uc804\ud55c \uc815\ubcf4\ub97c \uc804\ub2ec\ud558\uae30 \uc704\ud55c \ud45c\uc900\uc73c\ub85c, \uc138 \ubd80\ubd84\uc73c\ub85c \uad6c\uc131\ub429\ub2c8\ub2e4: \ud5e4\ub354, \ud398\uc774\ub85c\ub4dc, \uc11c\uba85. \uc774\ub97c \ud1b5\ud574 \ub370\uc774\ud130\ub97c \uc548\uc804\ud558\uac8c \uc804\uc1a1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n            <\/p>\n<ul>\n<li><strong>\ud5e4\ub354<\/strong>: \ud1a0\ud070\uc758 \ud0c0\uc785\uacfc \uc0ac\uc6a9\ub418\ub294 \uc54c\uace0\ub9ac\uc998\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ud398\uc774\ub85c\ub4dc<\/strong>: \uc804\ub2ec\ud560 \uc815\ubcf4\ub97c \ud3ec\ud568\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790 ID, \ub9cc\ub8cc \uc2dc\uac04 \ub4f1\uc758 \uc815\ubcf4\ub97c \ub2f4\uc744 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>\uc11c\uba85<\/strong>: \ud5e4\ub354\uc640 \ud398\uc774\ub85c\ub4dc\ub97c \ube44\ubc00\ud0a4\ub85c \ud574\uc2dc\ud558\uc5ec \uc0dd\uc131\ub41c \uac12\uc73c\ub85c, \ub370\uc774\ud130\uc758 \ubb34\uacb0\uc131\uc744 \ud655\uc778\ud558\ub294 \ub370 \uc0ac\uc6a9\ub429\ub2c8\ub2e4.<\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>4. \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131 \ubc0f \uac80\uc99d \uad6c\ud604\ud558\uae30<\/h2>\n<p>\n                \uc774\uc81c \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \uc791\uc5c5\uc744 \uc9c4\ud589\ud574 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 Python\uc758 <code>python-jose<\/code> \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud560 \uac83\uc785\ub2c8\ub2e4. \uba3c\uc800, \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\ub294 \ud568\uc218\ub97c \ub9cc\ub4e4\uc5b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n            <\/p>\n<pre><code class=\"language-python\">\nfrom datetime import datetime, timedelta\nfrom jose import JWTError, jwt\nfrom fastapi import Depends, HTTPException, status, Security\nfrom fastapi.security import OAuth2PasswordBearer\nfrom typing import Optional\n\nSECRET_KEY = \"mysecretkey\"  # \ube44\ubc00\ud0a4\nALGORITHM = \"HS256\"  # \uc54c\uace0\ub9ac\uc998\nACCESS_TOKEN_EXPIRE_MINUTES = 30  # \ub9cc\ub8cc \uc2dc\uac04 \uc124\uc815\n\noauth2_scheme = OAuth2PasswordBearer(tokenUrl=\"token\")\n\ndef create_access_token(data: dict, expires_delta: Optional[timedelta] = None):\n    to_encode = data.copy()\n    if expires_delta:\n        expire = datetime.utcnow() + expires_delta\n    else:\n        expire = datetime.utcnow() + timedelta(minutes=15)\n    to_encode.update({\"exp\": expire})\n    encoded_jwt = jwt.encode(to_encode, SECRET_KEY, algorithm=ALGORITHM)\n    return encoded_jwt\n            <\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\ub294 \ud568\uc218\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \ub85c\uadf8\uc778 \ud560 \ub54c \uc774 \ud568\uc218\ub97c \ud638\ucd9c\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<\/section>\n<section>\n<h2>5. \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0ac\uc6a9\ud558\ub294 \uc0ac\uc6a9\uc790 \uc778\uc99d<\/h2>\n<p>\n                \ub2e4\uc74c\uc73c\ub85c \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uc704\ud55c \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ub9cc\ub4e4\uc5b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 \ub85c\uadf8\uc778\uc744 \ucc98\ub9ac\ud558\uace0, \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \ubc18\ud658\ud558\ub294 API \ub97c \uc791\uc131\ud569\ub2c8\ub2e4.\n            <\/p>\n<pre><code class=\"language-python\">\nfrom pydantic import BaseModel\n\nclass User(BaseModel):\n    username: str\n    password: str\n\nfake_users_db = {\n    \"testuser\": {\n        \"username\": \"testuser\",\n        \"full_name\": \"Test User\",\n        \"email\": \"testuser@example.com\",\n        \"hashed_password\": \"fakehashedpassword\",\n        \"disabled\": False,\n    }\n}\n\ndef fake_hash_password(password: str):\n    return \"fakehashed\" + password\n\n@app.post(\"\/token\")\nasync def login(user: User):\n    user_dict = fake_users_db.get(user.username)\n    if not user_dict or user_dict[\"hashed_password\"] != fake_hash_password(user.password):\n        raise HTTPException(\n            status_code=status.HTTP_401_UNAUTHORIZED,\n            detail=\"Incorrect username or password\",\n            headers={\"WWW-Authenticate\": \"Bearer\"},\n        )\n    access_token_expires = timedelta(minutes=ACCESS_TOKEN_EXPIRE_MINUTES)\n    access_token = create_access_token(data={\"sub\": user.username}, expires_delta=access_token_expires)\n    return {\"access_token\": access_token, \"token_type\": \"bearer\"}\n            <\/code><\/pre>\n<p>\n                \uc704 \ucf54\ub4dc\ub294 \ub85c\uadf8\uc778\uc744 \ucc98\ub9ac\ud558\uace0 \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \ubc18\ud658\ud558\ub294 <code>\/token<\/code> \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \uc62c\ubc14\ub978 \uc0ac\uc6a9\uc790 \uc774\ub984\uacfc \ube44\ubc00\ubc88\ud638\ub97c \uc81c\uacf5\ud558\uba74, \uc561\uc138\uc2a4 \ud1a0\ud070\uc774 \uc0dd\uc131\ub418\uc5b4 \ubc18\ud658\ub429\ub2c8\ub2e4.\n            <\/p>\n<\/section>\n<section>\n<h2>6. \ud1a0\ud070 \uac80\uc99d<\/h2>\n<p>\n                \uc561\uc138\uc2a4 \ud1a0\ud070\uc774 \uc0dd\uc131\ub418\uba74, \uc774\ub97c \uac80\uc99d\ud558\ub294 \uac83\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. \ud2b9\uc815 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uc5d0 \uc561\uc138\uc2a4\ud558\uae30 \uc704\ud574\uc11c\ub294 \uc720\ud6a8\ud55c \ud1a0\ud070\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. \uc544\ub798 \ucf54\ub4dc\ub97c \ud1b5\ud574 \uc774\ub97c \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n            <\/p>\n<pre><code class=\"language-python\">\nasync def get_current_user(token: str = Depends(oauth2_scheme)):\n    credentials_exception = HTTPException(\n        status_code=status.HTTP_401_UNAUTHORIZED,\n        detail=\"Could not validate credentials\",\n        headers={\"WWW-Authenticate\": \"Bearer\"},\n    )\n    try:\n        payload = jwt.decode(token, SECRET_KEY, algorithms=[ALGORITHM])\n        username: str = payload.get(\"sub\")\n        if username is None:\n            raise credentials_exception\n    except JWTError:\n        raise credentials_exception\n    user = fake_users_db.get(username)\n    if user is None:\n        raise credentials_exception\n    return user\n\n@app.get(\"\/users\/me\")\nasync def read_users_me(current_user: User = Depends(get_current_user)):\n    return current_user\n            <\/code><\/pre>\n<p>\n                \uc704\uc758 \ucf54\ub4dc\ub294 \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uac80\uc99d\ud558\uace0 \ud574\ub2f9 \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \ubc18\ud658\ud558\ub294 <code>\/users\/me<\/code> \uc5d4\ub4dc\ud3ec\uc778\ud2b8\uc785\ub2c8\ub2e4. \uc694\uccad\uc5d0\uc11c \ud1a0\ud070\uc744 \ucd94\ucd9c\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \ud655\uc778\ud569\ub2c8\ub2e4.\n            <\/p>\n<\/section>\n<section>\n<h2>7. \ud14c\uc2a4\ud2b8<\/h2>\n<p>\n                API\ub97c \ud14c\uc2a4\ud2b8\ud558\uae30 \uc704\ud574, curl\uc774\ub098 Postman\uacfc \uac19\uc740 \ub3c4\uad6c\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 Postman\uc5d0\uc11c\uc758 \ud14c\uc2a4\ud2b8 \ubc29\ubc95\uc785\ub2c8\ub2e4:\n            <\/p>\n<ol>\n<li>\n<p>POST \uc694\uccad\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc790 \ub85c\uadf8\uc778:<\/p>\n<pre><code class=\"language-bash\">POST http:\/\/localhost:8000\/token<\/code><\/pre>\n<p>Body\uc5d0 JSON \ud615\ud0dc\ub85c \uc0ac\uc6a9\uc790 \uc774\ub984\uacfc \ube44\ubc00\ubc88\ud638\ub97c \uc785\ub825\ud569\ub2c8\ub2e4:<\/p>\n<pre><code class=\"language-json\">{\"username\": \"testuser\", \"password\": \"testpassword\"}<\/code><\/pre>\n<\/li>\n<li>\n<p>\uc751\ub2f5\uc73c\ub85c \ubc1b\uc740 \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc774\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc815\ubcf4 \uc694\uccad:<\/p>\n<pre><code class=\"language-bash\">GET http:\/\/localhost:8000\/users\/me<\/code><\/pre>\n<p>Authorization \ud5e4\ub354\uc5d0 Bearer {access_token}\uc744 \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<\/li>\n<\/ol>\n<\/section>\n<section>\n<h2>8. \uacb0\ub860<\/h2>\n<p>\n                \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ud559\uc2b5\ud588\uc2b5\ub2c8\ub2e4. FastAPI\uc758 \uac15\ub825\ud55c \uae30\ub2a5\uc740 \ub2e4\uc591\ud55c \uc778\uc99d \ubc29\ubc95\uc744 \uad6c\ud604\ud558\ub294 \ub370 \uc720\uc6a9\ud569\ub2c8\ub2e4. JWT\ub97c \ud1b5\ud55c \uc778\uc99d\uc740 API\uc758 \ubcf4\uc548\uc744 \uac15\ud654\ud558\ub294 \uc911\uc694\ud55c \ubc29\ubc95 \uc911 \ud558\ub098\uc785\ub2c8\ub2e4.\n            <\/p>\n<p>\ucd94\uac00\uc801\uc778 \uac1c\uc120 \uc0ac\ud56d\uc73c\ub85c\ub294 \uc0ac\uc6a9\uc790 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ud1b5\ud569, \ube44\ubc00\ubc88\ud638 \ud574\uc2f1 \uac15\ud654, \uadf8\ub9ac\uace0 \uc5d0\ub7ec \ucc98\ub9ac \ub85c\uc9c1\uc744 \ucd94\uac00\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<\/section>\n<footer>\n<p>\uc774 \uae00\uc774 FastAPI\ub97c \ud1b5\ud55c API \uac1c\ubc1c\uc5d0 \ub3c4\uc6c0\uc774 \ub418\uc5c8\uae30\ub97c \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<\/footer>\n<\/article>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc791\uc131\uc790: \uc870\uad11\ud615 \ub0a0\uc9dc: 2024\ub144 11\uc6d4 26\uc77c 1. \uc11c\ub860 FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud558\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uba70 \ucd5c\uc801\ud654\ub41c \uc131\ub2a5\uc744 \uc790\ub791\ud569\ub2c8\ub2e4. RESTful API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 FastAPI\uc758 \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub370\uc774\ud130 \uac80\uc99d\uacfc \uc790\ub3d9 \ubb38\uc11c \uc0dd\uc131 \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ub2e4\ub8f9\ub2c8\ub2e4. \uc561\uc138\uc2a4 \ud1a0\ud070\uc740 \uc778\uc99d \ubc0f \uad8c\ud55c \ubd80\uc5ec\uc5d0 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38402\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \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-38402","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, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \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\/38402\/\" \/>\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, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc791\uc131\uc790: \uc870\uad11\ud615 \ub0a0\uc9dc: 2024\ub144 11\uc6d4 26\uc77c 1. \uc11c\ub860 FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud558\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uba70 \ucd5c\uc801\ud654\ub41c \uc131\ub2a5\uc744 \uc790\ub791\ud569\ub2c8\ub2e4. RESTful API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 FastAPI\uc758 \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub370\uc774\ud130 \uac80\uc99d\uacfc \uc790\ub3d9 \ubb38\uc11c \uc0dd\uc131 \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ub2e4\ub8f9\ub2c8\ub2e4. \uc561\uc138\uc2a4 \ud1a0\ud070\uc740 \uc778\uc99d \ubc0f \uad8c\ud55c \ubd80\uc5ec\uc5d0 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38402\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:16:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:26+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\/38402\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38402\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d\",\"datePublished\":\"2024-11-01T18:16:31+00:00\",\"dateModified\":\"2024-11-26T06:44:26+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38402\/\"},\"wordCount\":41,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38402\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38402\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:16:31+00:00\",\"dateModified\":\"2024-11-26T06:44:26+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38402\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38402\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38402\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \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, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \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\/38402\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc791\uc131\uc790: \uc870\uad11\ud615 \ub0a0\uc9dc: 2024\ub144 11\uc6d4 26\uc77c 1. \uc11c\ub860 FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud558\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uba70 \ucd5c\uc801\ud654\ub41c \uc131\ub2a5\uc744 \uc790\ub791\ud569\ub2c8\ub2e4. RESTful API\ub97c \uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\ub294 FastAPI\uc758 \ud2b9\uc9d5 \uc911 \ud558\ub098\ub294 \ub370\uc774\ud130 \uac80\uc99d\uacfc \uc790\ub3d9 \ubb38\uc11c \uc0dd\uc131 \uae30\ub2a5\uc785\ub2c8\ub2e4. \uc774 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc561\uc138\uc2a4 \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uace0 \uac80\uc99d\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \ub2e4\ub8f9\ub2c8\ub2e4. \uc561\uc138\uc2a4 \ud1a0\ud070\uc740 \uc778\uc99d \ubc0f \uad8c\ud55c \ubd80\uc5ec\uc5d0 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d\"","og_url":"https:\/\/atmokpo.com\/w\/38402\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:16:31+00:00","article_modified_time":"2024-11-26T06:44:26+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\/38402\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38402\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d","datePublished":"2024-11-01T18:16:31+00:00","dateModified":"2024-11-26T06:44:26+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38402\/"},"wordCount":41,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38402\/","url":"https:\/\/atmokpo.com\/w\/38402\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \uac80\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:16:31+00:00","dateModified":"2024-11-26T06:44:26+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38402\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38402\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38402\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc561\uc138\uc2a4 \ud1a0\ud070 \uc0dd\uc131\uacfc \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\/38402","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=38402"}],"version-history":[{"count":2,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38402\/revisions"}],"predecessor-version":[{"id":43093,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38402\/revisions\/43093"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38402"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38402"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38402"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}