{"id":38580,"date":"2024-11-01T18:18:24","date_gmt":"2024-11-01T18:18:24","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38580"},"modified":"2024-11-26T06:43:56","modified_gmt":"2024-11-26T06:43:56","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%eb%8f%84%ec%bb%a4-%eb%8d%b0%ec%9d%b4%ed%84%b0%eb%b2%a0%ec%9d%b4%ec%8a%a4-%eb%b0%b0%ed%8f%ac","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38580\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec"},"content":{"rendered":"<p><body><\/p>\n<p>\ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubc31\uc5d4\ub4dc \uc11c\ubc84\ub97c \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \uc774\uc6a9\ud558\uc5ec \uc774 \uc11c\ubc84\ub97c \ud328\ud0a4\uc9d5 \ubc0f \ubc30\ud3ec\ud558\uba70, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud3ec\ud568\ud55c \uc804\uccb4\uc801\uc778 \ubc30\ud3ec \uacfc\uc815\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube60\ub974\uace0 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 API\ub97c \uc27d\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\uc2b5\ub2c8\ub2e4. \uc774\uc640 \ub354\ubd88\uc5b4 \ub3c4\ucee4\ub294 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud558\uc5ec \uc5b4\ub514\uc11c\ub4e0 \uc2e4\ud589\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\uc5d0 \ub300\ud574 \ub17c\uc758\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<h2>1. FastAPI \uc18c\uac1c<\/h2>\n<p>FastAPI\ub294 Python\uc73c\ub85c \uc791\uc131\ub41c \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc774\uba70, RESTful API\ub97c \uc791\uc131\ud558\ub294 \ub370 \uc720\uc6a9\ud55c \ub3c4\uad6c\uc785\ub2c8\ub2e4. FastAPI\uc758 \uc8fc\uc694 \ud2b9\uc9d5\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li>\uace0\uc18d: Starlette\ub97c \uae30\ubc18\uc73c\ub85c \ud558\uc5ec \ube44\ub3d9\uae30 \ucc98\ub9ac\ub97c \uc9c0\uc6d0\ud574 \ube60\ub978 \uc131\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n<li>\uc790\ub3d9\ud654\ub41c \ubb38\uc11c\ud654: OpenAPI\ub97c \uae30\ubc18\uc73c\ub85c \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ub41c API \ubb38\uc11c\ub97c \uc81c\uacf5\ud569\ub2c8\ub2e4.<\/li>\n<li>\ub370\uc774\ud130 \uc720\ud6a8\uc131 \uac80\uc0ac: Pydantic\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \ubaa8\ub378\uacfc \uc720\ud6a8\uc131 \uac80\uc0ac\ub97c \uc790\ub3d9\uc73c\ub85c \uc218\ud589\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h3>1.1 FastAPI \uc124\uce58<\/h3>\n<pre><code>pip install fastapi uvicorn<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 FastAPI\uc640 Uvicorn(ASGI \uc11c\ubc84)\ub97c \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>2. FastAPI \uc11c\ubc84 \uac1c\ubc1c<\/h2>\n<p>\uc774\uc81c FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c API \uc11c\ubc84\ub97c \ub9cc\ub4e4\uc5b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uad00\ub9ac\ud558\ub294 API\ub97c \uad6c\ucd95\ud55c\ub2e4\uace0 \uac00\uc815\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>2.1 \uae30\ubcf8 \uad6c\uc870<\/h3>\n<pre><code>from fastapi import FastAPI\nfrom pydantic import BaseModel\n\napp = FastAPI()\n\n# Pydantic \ubaa8\ub378 \uc815\uc758\nclass User(BaseModel):\n    id: int\n    name: str\n    age: int\n\n# In-memory \ub370\uc774\ud130 \uc800\uc7a5\uc18c\nusers = []\n\n@app.post(\"\/users\/\")\ndef create_user(user: User):\n    users.append(user)\n    return user\n\n@app.get(\"\/users\/{user_id}\")\ndef read_user(user_id: int):\n    return users[user_id]\n\n@app.get(\"\/users\/\")\ndef list_users():\n    return users\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 \uac04\ub2e8\ud55c \uc0ac\uc6a9\uc790 API\ub97c \uad6c\ud604\ud55c \uc608\uc81c\uc785\ub2c8\ub2e4. POST \uc694\uccad\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub97c \ucd94\uac00\ud558\uace0, GET \uc694\uccad\uc744 \ud1b5\ud574 \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uc870\ud68c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>2.2 \uc2e4\ud589<\/h3>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\uc11c\ubc84\ub97c \uc2e4\ud589\ud558\ub824\uba74 \uc704 \uba85\ub839\uc5b4\ub97c \uc785\ub825\ud558\uc2dc\uba74 \ub429\ub2c8\ub2e4. \ube0c\ub77c\uc6b0\uc800\uc5d0\uc11c <code>http:\/\/127.0.0.1:8000\/docs<\/code>\uc5d0 \uc811\uc18d\ud558\uba74 \uc790\ub3d9 \uc0dd\uc131\ub41c API \ubb38\uc11c\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>3. \ub3c4\ucee4\ub97c \uc774\uc6a9\ud55c \ubc30\ud3ec<\/h2>\n<p>\uc774\uc81c FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ub3c4\ucee4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ud328\ud0a4\uc9d5\ud558\uace0 \ubc30\ud3ec\ud558\ub294 \uacfc\uc815\uc744 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 Dockerfile \uc791\uc131<\/h3>\n<p>\ud504\ub85c\uc81d\ud2b8 \ub8e8\ud2b8 \ub514\ub809\ud1a0\ub9ac\uc5d0 <code>Dockerfile<\/code>\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>FROM python:3.9\n\nWORKDIR \/app\n\nCOPY requirements.txt .\nRUN pip install -r requirements.txt\n\nCOPY . .\n\nCMD [\"uvicorn\", \"main:app\", \"--host\", \"0.0.0.0\", \"--port\", \"80\"]\n<\/code><\/pre>\n<p>Dockerfile\uc758 \uad6c\uc131\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4:<\/p>\n<ul>\n<li><code>FROM<\/code><\/li>\n<p> : Python \uc774\ubbf8\uc9c0\ub97c \uae30\ubc18\uc73c\ub85c \ud569\ub2c8\ub2e4.<\/p>\n<li><code>WORKDIR<\/code><\/li>\n<p> : \uc791\uc5c5 \ub514\ub809\ud1a0\ub9ac\ub97c \uc124\uc815\ud569\ub2c8\ub2e4.<\/p>\n<li><code>COPY<\/code><\/li>\n<p> : \ud604\uc7ac \ub514\ub809\ud1a0\ub9ac\uc758 \ud30c\uc77c\uc744 \ub3c4\ucee4 \uc774\ubbf8\uc9c0\ub85c \ubcf5\uc0ac\ud569\ub2c8\ub2e4.<\/p>\n<li><code>RUN<\/code><\/li>\n<p> : \ud544\uc694\ud55c \ud328\ud0a4\uc9c0\ub97c \uc124\uce58\ud569\ub2c8\ub2e4.<\/p>\n<li><code>CMD<\/code><\/li>\n<p> : \ucee8\ud14c\uc774\ub108\uac00 \uc2dc\uc791\ub420 \ub54c \uc2e4\ud589\ub420 \uba85\ub839\uc5b4\ub97c \uc9c0\uc815\ud569\ub2c8\ub2e4.\n<\/ul>\n<h3>3.2 \ub3c4\ucee4 \uc774\ubbf8\uc9c0 \ube4c\ub4dc<\/h3>\n<pre><code>docker build -t fastapi-app .<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc5b4\ub97c \ud1b5\ud574 \ub3c4\ucee4 \uc774\ubbf8\uc9c0\ub97c \ube4c\ub4dc\ud569\ub2c8\ub2e4.<\/p>\n<h3>3.3 \ub3c4\ucee4 \ucee8\ud14c\uc774\ub108 \uc2e4\ud589<\/h3>\n<pre><code>docker run -d -p 80:80 fastapi-app<\/code><\/pre>\n<p>\ucee8\ud14c\uc774\ub108\ub97c \ubc31\uadf8\ub77c\uc6b4\ub4dc\uc5d0\uc11c \uc2e4\ud589\ud569\ub2c8\ub2e4. \uc774 \ud6c4 <code>http:\/\/localhost<\/code>\uc5d0\uc11c API\uc5d0 \uc811\uadfc\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>4. \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec<\/h2>\n<p>FastAPI\uc640 \ub3c4\ucee4\ub97c \uc0ac\uc6a9\ud55c \uae30\ubcf8 API \uc11c\ubc84 \uad6c\ucd95\uc774 \uc644\ub8cc\ub418\uc5c8\uc2b5\ub2c8\ub2e4. \uc774\uc81c \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ucd94\uac00\ud558\uc5ec \ub370\uc774\ud130\ub97c \uc9c0\uc18d\uc801\uc73c\ub85c \uc800\uc7a5\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uad6c\ud604\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 SQLite\ub97c \uc0ac\uc6a9\ud558\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>4.1 SQLAlchemy \ubc0f \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc124\uc815<\/h3>\n<pre><code>from sqlalchemy import create_engine, Column, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker\n\nDATABASE_URL = \"sqlite:\/\/\/.\/test.db\"\nengine = create_engine(DATABASE_URL)\nSessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)\n\nBase = declarative_base()\n\nclass UserModel(Base):\n    __tablename__ = \"users\"\n\n    id = Column(Integer, primary_key=True, index=True)\n    name = Column(String, index=True)\n    age = Column(Integer)\n\nBase.metadata.create_all(bind=engine)\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 SQLAlchemy\ub97c \uc0ac\uc6a9\ud558\uc5ec SQLite \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc785\ub2c8\ub2e4. <code>UserModel<\/code> \ud074\ub798\uc2a4\uac00 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc758 \uc0ac\uc6a9\uc790 \ud14c\uc774\ube14\uc744 \uc815\uc758\ud569\ub2c8\ub2e4.<\/p>\n<h3>4.2 FastAPI\uc5d0 \ud1b5\ud569<\/h3>\n<pre><code>from fastapi import Depends\nfrom sqlalchemy.orm import Session\n\ndef get_db():\n    db = SessionLocal()\n    try:\n        yield db\n    finally:\n        db.close()\n\n@app.post(\"\/users\/\", response_model=User)\ndef create_user(user: User, db: Session = Depends(get_db)):\n    db_user = UserModel(**user.dict())\n    db.add(db_user)\n    db.commit()\n    db.refresh(db_user)\n    return db_user\n\n@app.get(\"\/users\/{user_id}\", response_model=User)\ndef read_user(user_id: int, db: Session = Depends(get_db)):\n    return db.query(UserModel).filter(UserModel.id == user_id).first()\n\n@app.get(\"\/users\/\", response_model=List[User])\ndef list_users(db: Session = Depends(get_db)):\n    return db.query(UserModel).all()\n<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 FastAPI\uc5d0\uc11c SQLAlchemy\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \uc0c1\ud638\uc791\uc6a9\uc744 \ucd94\uac00\ud558\ub294 \ubc29\ubc95\uc744 \ubcf4\uc5ec\uc90d\ub2c8\ub2e4. \uc774\uc81c \uc0ac\uc6a9\uc790\ub97c \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \ucd94\uac00\ud558\uace0 \uc870\ud68c\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>5. \ub3c4\ucee4\uc5d0 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec<\/h2>\n<p>\ub3c4\ucee4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640 \ud568\uaed8 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ubc30\ud3ec\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 PostgreSQL \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc0ac\uc6a9\ud560 \uac83\uc785\ub2c8\ub2e4.<\/p>\n<h3>5.1 Docker Compose \uc124\uc815<\/h3>\n<p>\ub2e4\uc74c\uc73c\ub85c <code>docker-compose.yml<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uc5ec FastAPI\uc640 PostgreSQL\uc744 \ud568\uaed8 \uc2e4\ud589 \ud560 \uc218 \uc788\ub3c4\ub85d \uc124\uc815\ud569\ub2c8\ub2e4.<\/p>\n<pre><code>version: '3.8'\nservices:\n  web:\n    build: .\n    ports:\n      - \"80:80\"\n    depends_on:\n      - db\n    environment:\n      - DATABASE_URL=postgresql:\/\/user:password@db\/dbname\n\n  db:\n    image: postgres:latest\n    environment:\n      POSTGRES_DB: dbname\n      POSTGRES_USER: user\n      POSTGRES_PASSWORD: password\n    ports:\n      - \"5432:5432\"\n<\/code><\/pre>\n<p>\uc704 \uad6c\uc131\uc5d0\uc11c\ub294 FastAPI \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 PostgreSQL \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc758\uc874\ud558\uace0 \uc788\uc74c\uc744 \ubcf4\uc5ec\uc90d\ub2c8\ub2e4. \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ucee8\ud14c\uc774\ub108\uac00 \uc2e4\ud589\ub418\uba74 FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc774 \uc774\ub97c \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>5.2 \ucee8\ud14c\uc774\ub108 \uc2e4\ud589<\/h3>\n<pre><code>docker-compose up --build<\/code><\/pre>\n<p>\uc704 \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubaa8\ub4e0 \uc11c\ube44\uc2a4\ub97c \ud55c \ubc88\uc5d0 \uc2e4\ud589\ud569\ub2c8\ub2e4. FastAPI\ub294 PostgreSQL\uacfc \uc5f0\uacb0\ub418\uace0, API\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub97c \uad00\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>\uacb0\ub860<\/h2>\n<p>\uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uac04\ub2e8\ud55c \ubc31\uc5d4\ub4dc API\ub97c \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \ud1b5\ud574 \uc774 API\ub97c \ud328\ud0a4\uc9d5 \ubc0f \ubc30\ud3ec\ud558\uba70, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \uc124\uc815\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc124\uba85\ud558\uc600\uc2b5\ub2c8\ub2e4. FastAPI\uc640 \ub3c4\ucee4\ub97c \ud65c\uc6a9\ud558\uba74 \ud6a8\uc728\uc801\uc73c\ub85c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac1c\ubc1c\ud558\uace0 \ubc30\ud3ec\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc190\uc27d\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\ub294 \uae30\ucd08\ub97c \ub2e4\uc9c8 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubc31\uc5d4\ub4dc \uc11c\ubc84\ub97c \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \uc774\uc6a9\ud558\uc5ec \uc774 \uc11c\ubc84\ub97c \ud328\ud0a4\uc9d5 \ubc0f \ubc30\ud3ec\ud558\uba70, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud3ec\ud568\ud55c \uc804\uccb4\uc801\uc778 \ubc30\ud3ec \uacfc\uc815\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube60\ub974\uace0 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 API\ub97c \uc27d\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\uc2b5\ub2c8\ub2e4. \uc774\uc640 \ub354\ubd88\uc5b4 \ub3c4\ucee4\ub294 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud558\uc5ec \uc5b4\ub514\uc11c\ub4e0 \uc2e4\ud589\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\uc5d0 \ub300\ud574 \ub17c\uc758\ud560 \uac83\uc785\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38580\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec&#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-38580","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, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \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\/38580\/\" \/>\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, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"\ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubc31\uc5d4\ub4dc \uc11c\ubc84\ub97c \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \uc774\uc6a9\ud558\uc5ec \uc774 \uc11c\ubc84\ub97c \ud328\ud0a4\uc9d5 \ubc0f \ubc30\ud3ec\ud558\uba70, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud3ec\ud568\ud55c \uc804\uccb4\uc801\uc778 \ubc30\ud3ec \uacfc\uc815\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube60\ub974\uace0 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 API\ub97c \uc27d\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\uc2b5\ub2c8\ub2e4. \uc774\uc640 \ub354\ubd88\uc5b4 \ub3c4\ucee4\ub294 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud558\uc5ec \uc5b4\ub514\uc11c\ub4e0 \uc2e4\ud589\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\uc5d0 \ub300\ud574 \ub17c\uc758\ud560 \uac83\uc785\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38580\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:18:24+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:43:56+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\/38580\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38580\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\",\"datePublished\":\"2024-11-01T18:18:24+00:00\",\"dateModified\":\"2024-11-26T06:43:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38580\/\"},\"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\/38580\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38580\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:18:24+00:00\",\"dateModified\":\"2024-11-26T06:43:56+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38580\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38580\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38580\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\"}]},{\"@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, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \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\/38580\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"\ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \ubc31\uc5d4\ub4dc \uc11c\ubc84\ub97c \uac1c\ubc1c\ud558\uace0, \ub3c4\ucee4\ub97c \uc774\uc6a9\ud558\uc5ec \uc774 \uc11c\ubc84\ub97c \ud328\ud0a4\uc9d5 \ubc0f \ubc30\ud3ec\ud558\uba70, \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ud3ec\ud568\ud55c \uc804\uccb4\uc801\uc778 \ubc30\ud3ec \uacfc\uc815\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube60\ub974\uace0 \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, \ube44\ub3d9\uae30 API\ub97c \uc27d\uac8c \uac1c\ubc1c\ud560 \uc218 \uc788\ub3c4\ub85d \ub3d5\uc2b5\ub2c8\ub2e4. \uc774\uc640 \ub354\ubd88\uc5b4 \ub3c4\ucee4\ub294 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \ucee8\ud14c\uc774\ub108\ud654\ud558\uc5ec \uc5b4\ub514\uc11c\ub4e0 \uc2e4\ud589\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc8fc\ub294 \ub3c4\uad6c\uc785\ub2c8\ub2e4. \ub9c8\uc9c0\ub9c9\uc73c\ub85c \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\uc5d0 \ub300\ud574 \ub17c\uc758\ud560 \uac83\uc785\ub2c8\ub2e4. 1. FastAPI \uc18c\uac1c FastAPI\ub294 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec\"","og_url":"https:\/\/atmokpo.com\/w\/38580\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:18:24+00:00","article_modified_time":"2024-11-26T06:43:56+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\/38580\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38580\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec","datePublished":"2024-11-01T18:18:24+00:00","dateModified":"2024-11-26T06:43:56+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38580\/"},"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\/38580\/","url":"https:\/\/atmokpo.com\/w\/38580\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:18:24+00:00","dateModified":"2024-11-26T06:43:56+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38580\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38580\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38580\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \ub3c4\ucee4, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ubc30\ud3ec"}]},{"@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\/38580","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=38580"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38580\/revisions"}],"predecessor-version":[{"id":38581,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38580\/revisions\/38581"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38580"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38580"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38580"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}