{"id":38426,"date":"2024-11-01T18:16:50","date_gmt":"2024-11-01T18:16:50","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38426"},"modified":"2024-11-26T06:44:22","modified_gmt":"2024-11-26T06:44:22","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%ec%82%ac%ec%9a%a9%ec%9e%90-%ec%9d%b8%ec%a6%9d","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38426\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d"},"content":{"rendered":"<p><body><\/p>\n<p>\uc624\ub298\ub0a0\uc758 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \uc0ac\uc6a9\uc790 \uc778\uc99d\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud558\uace0 \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc778\uc99d \ubc29\ubc95\uc774 \uc874\uc7ac\ud569\ub2c8\ub2e4. \ubcf8 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Python\uc73c\ub85c \uc4f0\uc778 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube60\ub978 \uc131\ub2a5\uacfc \uc27d\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 API \uc124\uacc4\ub85c \uc778\uae30\ub97c \ub04c\uace0 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>1. FastAPI \uc18c\uac1c<\/h2>\n<p>FastAPI\ub294 Python 3.6 \uc774\uc0c1\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc73c\uba70, AsyncIO\ub97c \uae30\ubc18\uc73c\ub85c \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \ub610\ud55c \uc790\ub3d9 \ubb38\uc11c\ud654 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\uc5ec Swagger UI \ubc0f ReDoc\uc744 \ud1b5\ud574 API \ubb38\uc11c\ub97c \uc27d\uac8c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ub370\uc774\ud130 \uac80\uc99d \ubc0f \uc124\uc815 \uad00\ub9ac\ub97c \ud6a8\uc728\uc801\uc73c\ub85c \ucc98\ub9ac\ud569\ub2c8\ub2e4.<\/p>\n<h2>2. \uc0ac\uc6a9\uc790 \uc778\uc99d\uc758 \uc911\uc694\uc131<\/h2>\n<p>\uc0ac\uc6a9\uc790 \uc778\uc99d\uc740 \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud558\uace0, \uc774\ub97c \uae30\ubc18\uc73c\ub85c \uad8c\ud55c\uc744 \ubd80\uc5ec\ud558\ub294 \uacfc\uc815\uc785\ub2c8\ub2e4. \uc774\ub294 \ub2e4\uc74c\uacfc \uac19\uc740 \uc774\uc720\ub85c \uc911\uc694\ud569\ub2c8\ub2e4:<\/p>\n<ul>\n<li><strong>\ubcf4\uc548\uc131:<\/strong> \uc0ac\uc6a9\uc790 \ub370\uc774\ud130 \ubcf4\ud638 \ubc0f \uc720\ucd9c \ubc29\uc9c0<\/li>\n<li><strong>\uc811\uadfc \uc81c\uc5b4:<\/strong> \uc0ac\uc6a9\uc790\uc5d0 \ub530\ub77c \uad8c\ud55c \ubd80\uc5ec \ubc0f \uc81c\ud55c<\/li>\n<li><strong>\uc0ac\uc6a9\uc790 \uacbd\ud5d8:<\/strong> \uac1c\uc778\ud654\ub41c \uc11c\ube44\uc2a4 \uc81c\uacf5<\/li>\n<\/ul>\n<h2>3. FastAPI\uc5d0\uc11c\uc758 \uc0ac\uc6a9\uc790 \uc778\uc99d \uae30\ubc95<\/h2>\n<p>FastAPI\uc5d0\uc11c \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uad6c\ud604\ud560 \uc218 \uc788\ub294 \ubc29\ubc95\uc740 \uc5ec\ub7ec \uac00\uc9c0\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uac00\uc7a5 \uc77c\ubc18\uc801\uc778 \ubc29\ubc95\uc740 JWT (JSON Web Token)\ub97c \uc0ac\uc6a9\ud558\ub294 \uac83\uc785\ub2c8\ub2e4. JWT\ub294 \uc0ac\uc6a9\uc790\ub97c \uc778\uc99d\ud558\uace0 \uc815\ubcf4\ub97c \uc548\uc804\ud558\uac8c \uc804\uc1a1\ud560 \uc218 \uc788\ub294 \ud1a0\ud070 \uae30\ubc18 \uc778\uc99d \ubc29\ubc95\uc785\ub2c8\ub2e4.<\/p>\n<h2>4. \ud544\uc694\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac \uc124\uce58<\/h2>\n<p>FastAPI\uc640 JWT\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574 \ud544\uc694\ud55c \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc124\uce58\ud569\ub2c8\ub2e4. \uc544\ub798 \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud544\uc694\ud55c \ud328\ud0a4\uc9c0\ub97c \uc124\uce58\ud558\uc138\uc694:<\/p>\n<pre><code>pip install fastapi uvicorn python-jose passlib[bcrypt]<\/code><\/pre>\n<h2>5. \uae30\ubcf8 FastAPI \uc124\uc815<\/h2>\n<p>FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc124\uc815\ud569\ub2c8\ub2e4. \ub2e4\uc74c \ucf54\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae30\ubcf8 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ub9cc\ub4dc\uc138\uc694:<\/p>\n<pre><code>from fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"Hello\": \"World\"}\n<\/code><\/pre>\n<h2>6. \uc0ac\uc6a9\uc790 \ubaa8\ub378 \ubc0f \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc124\uc815<\/h2>\n<p>\uc774\uc81c \uc0ac\uc6a9\uc790 \ubaa8\ub378\uc744 \uc815\uc758\ud558\uace0 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc5f0\uacb0\ud569\ub2c8\ub2e4. SQLAlchemy\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \uac04\ub2e8\ud558\uac8c \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uae30\ubcf8\uc801\uc778 \uc0ac\uc6a9\uc790 \ubaa8\ub378 \ucf54\ub4dc\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>from sqlalchemy import Column, Integer, String, create_engine\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker\n\nSQLALCHEMY_DATABASE_URL = \"sqlite:\/\/\/.\/test.db\"\nengine = create_engine(SQLALCHEMY_DATABASE_URL, connect_args={\"check_same_thread\": False})\nSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\nBase = declarative_base()\n\nclass User(Base):\n    __tablename__ = \"users\"\n\n    id = Column(Integer, primary_key=True, index=True)\n    username = Column(String, unique=True, index=True)\n    hashed_password = Column(String)\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\uc5d0\uc11c \uc0ac\uc6a9\uc790 \ubaa8\ub378\uc744 \uc815\uc758\ud588\uc2b5\ub2c8\ub2e4. `username`\uacfc `hashed_password`\ub97c \ud1b5\ud574 \uae30\ubcf8\uc801\uc778 \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc800\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>7. \ube44\ubc00\ubc88\ud638 \ud574\uc2f1<\/h2>\n<p>\uc0ac\uc6a9\uc790\uc758 \ube44\ubc00\ubc88\ud638\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\uae30 \uc704\ud574 \ud574\uc2f1\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4. Passlib \ub77c\uc774\ube0c\ub7ec\ub9ac\ub97c \uc0ac\uc6a9\ud558\uc5ec \ube44\ubc00\ubc88\ud638\ub97c \ud574\uc2f1\ud558\uace0 \uac80\uc99d\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code>from passlib.context import CryptContext\n\npwd_context = CryptContext(schemes=[\"bcrypt\"], deprecated=\"auto\")\n\ndef get_password_hash(password):\n    return pwd_context.hash(password)\n\ndef verify_password(plain_password, hashed_password):\n    return pwd_context.verify(plain_password, hashed_password)\n<\/code><\/pre>\n<h2>8. \uc0ac\uc6a9\uc790 \ucd94\uac00 \ubc0f \ub4f1\ub85d \uc5d4\ub4dc\ud3ec\uc778\ud2b8<\/h2>\n<p>\uc0ac\uc6a9\uc790\ub97c \ub4f1\ub85d\ud560 \uc218 \uc788\ub294 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \ube44\ubc00\ubc88\ud638\ub97c \uc548\uc804\ud558\uac8c \uc800\uc7a5\ud558\ub3c4\ub85d \ud574\uc2f1 \ud6c4 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc800\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code>from fastapi import Depends, HTTPException\nfrom sqlalchemy.orm import Session\n\nBase.metadata.create_all(bind=engine)\n\n# Create the user\n@app.post(\"\/users\/\")\ndef create_user(username: str, password: str, db: Session = Depends(get_db)):\n    hashed_password = get_password_hash(password)\n    db_user = User(username=username, hashed_password=hashed_password)\n    db.add(db_user)\n    db.commit()\n    db.refresh(db_user)\n    return db_user\n<\/code><\/pre>\n<h2>9. JWT \ud1a0\ud070 \uc0dd\uc131<\/h2>\n<p>\ub85c\uadf8\uc778 \ud6c4 JWT \ud1a0\ud070\uc744 \uc0dd\uc131\ud558\uc5ec \ubc18\ud658\ud558\ub294 \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>from datetime import datetime, timedelta\nfrom jose import JWTError, jwt\n\nSECRET_KEY = \"your_secret_key\"\nALGORITHM = \"HS256\"\nACCESS_TOKEN_EXPIRE_MINUTES = 30\n\ndef create_access_token(data: dict, expires_delta: 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<h2>10. \ub85c\uadf8\uc778 \uc5d4\ub4dc\ud3ec\uc778\ud2b8<\/h2>\n<p>\uc0ac\uc6a9\uc790\uac00 \ub85c\uadf8\uc778\ud560 \uc218 \uc788\ub3c4\ub85d \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \ucd94\uac00\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>@app.post(\"\/token\")\nasync def login(username: str, password: str, db: Session = Depends(get_db)):\n    user = db.query(User).filter(User.username == username).first()\n    if not user or not verify_password(password, user.hashed_password):\n        raise HTTPException(status_code=400, detail=\"\uc798\ubabb\ub41c \uc0ac\uc6a9\uc790\uba85 \ub610\ub294 \ube44\ubc00\ubc88\ud638\")\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<h2>11. \ubcf4\ud638\ub41c \uc5d4\ub4dc\ud3ec\uc778\ud2b8 \uc124\uc815<\/h2>\n<p>JWT \ud1a0\ud070\uc73c\ub85c \ubcf4\ud638\ub41c \uc5d4\ub4dc\ud3ec\uc778\ud2b8\ub97c \uc124\uc815\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 \uc778\uc99d\ub41c \uacbd\uc6b0\uc5d0\ub9cc \uc811\uadfc\ud560 \uc218 \uc788\ub3c4\ub85d \uad6c\ud604\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>from fastapi import Security, Depends\nfrom fastapi.security import OAuth2PasswordBearer\n\noauth2_scheme = OAuth2PasswordBearer(tokenUrl=\"token\")\n\nasync def get_current_user(token: str = Depends(oauth2_scheme), db: Session = Depends(get_db)):\n    credentials_exception = HTTPException(status_code=401, detail=\"\uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 \uc790\uaca9 \uc99d\uba85\", headers={\"WWW-Authenticate\": \"Bearer\"})\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 = db.query(User).filter(User.username == username).first()\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<h2>12. FastAPI \uc11c\ubc84 \uc2e4\ud589<\/h2>\n<p>\ubaa8\ub4e0 \uc124\uc815\uc774 \uc644\ub8cc\ub418\uc5c8\uc73c\ub2c8, \uc774\uc81c FastAPI \uc11c\ubc84\ub97c \uc2e4\ud589\ud560 \uc900\ube44\uac00 \ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc544\ub798 \uba85\ub839\uc5b4\ub85c \uc11c\ubc84\ub97c \uc2e4\ud589\ud558\uc138\uc694:<\/p>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 FastAPI \uc11c\ubc84\uac00 `http:\/\/127.0.0.1:8000`\uc5d0\uc11c \uc2e4\ud589\ub429\ub2c8\ub2e4.<\/p>\n<h2>13. Swagger UI\ub97c \ud1b5\ud55c API \ubb38\uc11c\ud654<\/h2>\n<p>FastAPI\ub294 Swagger\ub97c \ud1b5\ud574 \uc790\ub3d9\uc73c\ub85c API \ubb38\uc11c\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4. \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c `http:\/\/127.0.0.1:8000\/docs`\ub85c \uc774\ub3d9\ud558\uba74 API \ubb38\uc11c\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>14. \uacb0\ub860<\/h2>\n<p>FastAPI\ub97c \uc0ac\uc6a9\ud55c \uc0ac\uc6a9\uc790 \uc778\uc99d \uad6c\ud604 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uc558\uc2b5\ub2c8\ub2e4. \ube44\ubc00\ubc88\ud638 \ud574\uc2f1, JWT \uae30\ubc18 \uc778\uc99d\uc744 \ud3ec\ud568\ud55c \uc0ac\uc6a9\uc790 \ub4f1\ub85d \ubc0f \ub85c\uadf8\uc778 \uae30\ub2a5\uc744 \uc81c\uacf5\ud558\ub294 API\ub97c \uad6c\ucd95\ud588\uc2b5\ub2c8\ub2e4. FastAPI\uc758 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \ud1b5\ud574 \ud6a8\uc728\uc801\uc73c\ub85c \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<div class=\"note\">\n<strong>\ub178\ud2b8:<\/strong> \uc2e4\uc81c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\ub294 \ube44\ubc00\ud0a4\uc640 \uac19\uc740 \uc911\uc694\ud55c \uc815\ubcf4\ub97c \ud658\uacbd \ubcc0\uc218\uc5d0 \uc800\uc7a5\ud558\uac70\ub098 \ub354 \uc548\uc804\ud55c \ubc29\uc2dd\uc73c\ub85c \uad00\ub9ac\ud558\ub294 \uac83\uc774 \uc88b\uc2b5\ub2c8\ub2e4.\n    <\/div>\n<h2>15. \ucc38\uace0 \uc790\ub8cc<\/h2>\n<ul>\n<li><a href=\"https:\/\/fastapi.tiangolo.com\/\">FastAPI \uacf5\uc2dd \ubb38\uc11c<\/a><\/li>\n<li><a href=\"https:\/\/jwt.io\/\">JWT.io<\/a><\/li>\n<li><a href=\"https:\/\/passlib.readthedocs.io\/en\/stable\/\">Passlib \ubb38\uc11c<\/a><\/li>\n<\/ul>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\uc624\ub298\ub0a0\uc758 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \uc0ac\uc6a9\uc790 \uc778\uc99d\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud558\uace0 \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc778\uc99d \ubc29\ubc95\uc774 \uc874\uc7ac\ud569\ub2c8\ub2e4. \ubcf8 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Python\uc73c\ub85c \uc4f0\uc778 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube60\ub978 \uc131\ub2a5\uacfc \uc27d\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 API \uc124\uacc4\ub85c \uc778\uae30\ub97c \ub04c\uace0 \uc788\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 Python 3.6 \uc774\uc0c1\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc73c\uba70, AsyncIO\ub97c \uae30\ubc18\uc73c\ub85c &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38426\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\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-38426","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, \uc0ac\uc6a9\uc790 \uc778\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\/38426\/\" \/>\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, \uc0ac\uc6a9\uc790 \uc778\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\uc624\ub298\ub0a0\uc758 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \uc0ac\uc6a9\uc790 \uc778\uc99d\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud558\uace0 \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc778\uc99d \ubc29\ubc95\uc774 \uc874\uc7ac\ud569\ub2c8\ub2e4. \ubcf8 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Python\uc73c\ub85c \uc4f0\uc778 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube60\ub978 \uc131\ub2a5\uacfc \uc27d\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 API \uc124\uacc4\ub85c \uc778\uae30\ub97c \ub04c\uace0 \uc788\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 Python 3.6 \uc774\uc0c1\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc73c\uba70, AsyncIO\ub97c \uae30\ubc18\uc73c\ub85c &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38426\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:16:50+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:22+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\/38426\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38426\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d\",\"datePublished\":\"2024-11-01T18:16:50+00:00\",\"dateModified\":\"2024-11-26T06:44:22+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38426\/\"},\"wordCount\":56,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38426\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38426\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:16:50+00:00\",\"dateModified\":\"2024-11-26T06:44:22+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38426\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38426\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38426\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\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, \uc0ac\uc6a9\uc790 \uc778\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\/38426\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\uc624\ub298\ub0a0\uc758 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc740 \uc0ac\uc6a9\uc790 \uc778\uc99d\uc774 \ud544\uc218\uc801\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uc758 \uc2e0\uc6d0\uc744 \ud655\uc778\ud558\uace0 \ubcf4\ud638\ud558\uae30 \uc704\ud574 \ub2e4\uc591\ud55c \uc778\uc99d \ubc29\ubc95\uc774 \uc874\uc7ac\ud569\ub2c8\ub2e4. \ubcf8 \ud3ec\uc2a4\ud2b8\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc0ac\uc6a9\uc790 \uc778\uc99d\uc744 \uad6c\ud604\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc790\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Python\uc73c\ub85c \uc4f0\uc778 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube60\ub978 \uc131\ub2a5\uacfc \uc27d\uac8c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 API \uc124\uacc4\ub85c \uc778\uae30\ub97c \ub04c\uace0 \uc788\uc2b5\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 Python 3.6 \uc774\uc0c1\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc73c\uba70, AsyncIO\ub97c \uae30\ubc18\uc73c\ub85c &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d\"","og_url":"https:\/\/atmokpo.com\/w\/38426\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:16:50+00:00","article_modified_time":"2024-11-26T06:44:22+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\/38426\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38426\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d","datePublished":"2024-11-01T18:16:50+00:00","dateModified":"2024-11-26T06:44:22+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38426\/"},"wordCount":56,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38426\/","url":"https:\/\/atmokpo.com\/w\/38426\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\uc99d - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:16:50+00:00","dateModified":"2024-11-26T06:44:22+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38426\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38426\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38426\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uc0ac\uc6a9\uc790 \uc778\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\/38426","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=38426"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38426\/revisions"}],"predecessor-version":[{"id":38427,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38426\/revisions\/38427"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38426"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38426"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38426"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}