{"id":38518,"date":"2024-11-01T18:17:48","date_gmt":"2024-11-01T18:17:48","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38518"},"modified":"2024-11-26T06:44:06","modified_gmt":"2024-11-26T06:44:06","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-%ea%b8%b0%eb%b3%b8-%ea%b2%bd%eb%a1%9c-%ec%84%a4%ec%a0%95-%eb%b0%8f-http-%eb%a9%94%ec%84%9c%eb%93%9cpost-get-put-delete-%ec%b2%98%eb%a6%ac","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38518\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac"},"content":{"rendered":"<p><body><\/p>\n<p>FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, API\ub97c \uc27d\uac8c \uad6c\ucd95\ud558\uace0 \ubc30\ud3ec\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae30\ubcf8 \uacbd\ub85c\ub97c \uc124\uc815\ud558\uace0, HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE)\ub97c \ucc98\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \ud544\uc694\ud55c \uc124\uc815\uacfc \uc608\uc81c \ucf54\ub4dc\ub97c \uc81c\uacf5\ud558\ub2c8 \ucc38\uace0\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<h2>1. FastAPI \uc124\uce58 \ubc0f \uae30\ubcf8 \uc124\uc815<\/h2>\n<p>FastAPI\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 Python \ud658\uacbd\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. Python 3.6 \uc774\uc0c1\uc774 \uc124\uce58\ub418\uc5b4 \uc788\ub294\uc9c0 \ud655\uc778\ud55c \ud6c4, FastAPI\uc640 Uvicorn(\ube44\ub3d9\uae30 \uc6f9 \uc11c\ubc84)\ub97c \uc124\uce58\ud569\ub2c8\ub2e4. \uc774\ub97c \uc704\ud574 \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>pip install fastapi uvicorn<\/code><\/pre>\n<h2>2. FastAPI \uc11c\ubc84 \uc2e4\ud589\ud558\uae30<\/h2>\n<p>FastAPI \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uc791\uc131\ud558\uae30 \uc704\ud574 \uae30\ubcf8\uc801\uc778 \uad6c\uc870\ub97c \uc124\uc815\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc544\ub798\uc640 \uac19\uc774 <code>main.py<\/code> \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uace0 \ub2e4\uc74c \ucf54\ub4dc\ub97c \uc785\ub825\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>from fastapi import FastAPI\n\napp = FastAPI()\n\n@app.get(\"\/\")\nasync def read_root():\n    return {\"message\": \"Hello, FastAPI!\"}<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 FastAPI \uc11c\ubc84\uc758 \uac00\uc7a5 \uae30\ubcf8\uc801\uc778 \uc608\uc81c\ub85c, \uc11c\ubc84\uac00 \uc2e4\ud589\ub418\uba74 <code>\/<\/code> \uacbd\ub85c\ub85c \uc811\uadfc\ud588\uc744 \ub54c &#8220;Hello, FastAPI!&#8221;\ub77c\ub294 \uba54\uc2dc\uc9c0\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc11c\ubc84\ub97c \uc2e4\ud589\ud558\ub824\uba74 \ud130\ubbf8\ub110\uc5d0\uc11c \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\ube0c\ub77c\uc6b0\uc800\ub97c \uc5f4\uace0 <a href=\"http:\/\/127.0.0.1:8000\">http:\/\/127.0.0.1:8000<\/a>\ub85c \uc774\ub3d9\ud558\uba74 &#8220;Hello, FastAPI!&#8221; \uba54\uc2dc\uc9c0\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>3. HTTP \uba54\uc11c\ub4dc \ucc98\ub9ac<\/h2>\n<p>FastAPI\ub294 \ub2e4\uc591\ud55c HTTP \uba54\uc11c\ub4dc\ub97c \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \uc8fc\uc694 HTTP \uba54\uc11c\ub4dc\uc5d0\ub294 GET, POST, PUT, DELETE\uac00 \uc788\uc2b5\ub2c8\ub2e4. \uac01\uac01\uc758 \uba54\uc11c\ub4dc\ub97c \uc0ac\uc6a9\ud558\uc5ec API\ub97c \uc124\uacc4\ud558\uc5ec \ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<h3>3.1 GET \uba54\uc11c\ub4dc<\/h3>\n<p>GET \uba54\uc11c\ub4dc\ub294 \uc11c\ubc84\uc5d0\uc11c \ub370\uc774\ud130\ub97c \uc870\ud68c\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \ub2e4\uc74c \ucf54\ub4dc\ub294 \ud2b9\uc815 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uc870\ud68c\ud558\ub294 API\ub97c \uad6c\ud604\ud569\ub2c8\ub2e4:<\/p>\n<pre><code>@app.get(\"\/users\/{user_id}\")\nasync def read_user(user_id: int):\n    return {\"user_id\": user_id, \"name\": \"User Name\"}<\/code><\/pre>\n<p>\uc704 \ucf54\ub4dc\ub294 <code>\/users\/{user_id}<\/code> \uacbd\ub85c\uc5d0\uc11c GET \uc694\uccad\uc744 \ucc98\ub9ac\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790 ID\ub97c \uc785\ub825\ubc1b\uc544 \ud574\ub2f9 ID\uc5d0 \ub300\ud55c \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n<h3>3.2 POST \uba54\uc11c\ub4dc<\/h3>\n<p>POST \uba54\uc11c\ub4dc\ub294 \uc11c\ubc84\uc5d0 \uc0c8\ub85c\uc6b4 \ub370\uc774\ud130\ub97c \uc0dd\uc131\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \ub2e4\uc74c \uc608\uc81c\ub294 \uc0ac\uc6a9\uc790\ub97c \ucd94\uac00\ud558\ub294 API\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>from pydantic import BaseModel\n\nclass User(BaseModel):\n    name: str\n    age: int\n\n@app.post(\"\/users\/\")\nasync def create_user(user: User):\n    return {\"user_id\": 1, \"name\": user.name, \"age\": user.age}<\/code><\/pre>\n<p>\uc704\uc758 \uc608\uc81c\uc5d0\uc11c <code>User<\/code> \ud074\ub798\uc2a4\ub294 Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130 \ubaa8\ub378\uc744 \uc815\uc758\ud569\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00 POST \uc694\uccad\uc744 \ud1b5\ud574 \uc804\ub2ec\ud558\ub294 \ub370\uc774\ud130\ub294 <code>User<\/code> \ud074\ub798\uc2a4\uc758 \uc778\uc2a4\ud134\uc2a4\ub85c \ubcc0\ud658\ub429\ub2c8\ub2e4.<\/p>\n<h3>3.3 PUT \uba54\uc11c\ub4dc<\/h3>\n<p>PUT \uba54\uc11c\ub4dc\ub294 \uc11c\ubc84\uc5d0 \uc874\uc7ac\ud558\ub294 \ub370\uc774\ud130\ub97c \uc218\uc815\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \uc544\ub798\uc758 \ucf54\ub4dc\ub294 \uc0ac\uc6a9\uc790\uc758 \uc815\ubcf4\ub97c \uc5c5\ub370\uc774\ud2b8\ud558\ub294 API\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>@app.put(\"\/users\/{user_id}\")\nasync def update_user(user_id: int, user: User):\n    return {\"user_id\": user_id, \"updated_name\": user.name, \"updated_age\": user.age}<\/code><\/pre>\n<p>\uc5ec\uae30\uc11c \uc0ac\uc6a9\uc790\uc758 ID\uc640 \uc5c5\ub370\uc774\ud2b8\ud560 \uc815\ubcf4\ub97c \uc218\uc815\ud558\uc5ec \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n<h3>3.4 DELETE \uba54\uc11c\ub4dc<\/h3>\n<p>DELETE \uba54\uc11c\ub4dc\ub294 \uc11c\ubc84\uc5d0\uc11c \uc815\ubcf4\ub97c \uc0ad\uc81c\ud560 \ub54c \uc0ac\uc6a9\ub429\ub2c8\ub2e4. \ub2e4\uc74c\uc740 \uc0ac\uc6a9\uc790\ub97c \uc0ad\uc81c\ud558\ub294 API\uc758 \uc608\uc785\ub2c8\ub2e4:<\/p>\n<pre><code>@app.delete(\"\/users\/{user_id}\")\nasync def delete_user(user_id: int):\n    return {\"message\": f\"User {user_id} has been deleted.\"}<\/code><\/pre>\n<p>\uc774 API\ub294 \ud2b9\uc815 \uc0ac\uc6a9\uc790\uc758 ID\ub97c \ubc1b\uc544 \ud574\ub2f9 \uc0ac\uc6a9\uc790 \uc0ad\uc81c\uc5d0 \ub300\ud55c \uba54\uc2dc\uc9c0\ub97c \ubc18\ud658\ud569\ub2c8\ub2e4.<\/p>\n<h2>4. FastAPI\uc758 \ub370\uc774\ud130 \uac80\uc99d<\/h2>\n<p>FastAPI\ub294 Pydantic\uc744 \ud1b5\ud574 \ub370\uc774\ud130 \uac80\uc99d\uc744 \uc9c0\uc6d0\ud569\ub2c8\ub2e4. \uc704 \uc608\uc81c\uc5d0\uc11c <code>User<\/code> \ud074\ub798\uc2a4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc774\ub984\uacfc \ub098\uc774\ub97c \uac80\uc99d\ud588\uc2b5\ub2c8\ub2e4. \uc62c\ubc14\ub978 \ub370\uc774\ud130 \ud615\uc2dd\uc744 \uc9c0\uc815\ud568\uc73c\ub85c\uc368 API\uac00 \uc815\ud655\ud558\uac8c \uc791\ub3d9\ud558\ub3c4\ub85d \ubcf4\uc7a5\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>5. FastAPI\uc640 \ub370\uc774\ud130\ubca0\uc774\uc2a4 \uc5f0\ub3d9<\/h2>\n<p>\ub300\ubd80\ubd84\uc758 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\ub294 \ub370\uc774\ud130\ub97c \ub370\uc774\ud130\ub97c \uc800\uc7a5\ud558\uace0 \uac80\uc0c9\ud558\uae30 \uc704\ud574 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640\uc758 \uc5f0\ub3d9\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. FastAPI\uc640 SQLAlchemy\ub97c \uc0ac\uc6a9\ud558\uba74 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640 \ud1b5\uc2e0\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 SQLite\ub97c \uc608\ub85c \ub4e4\uc5b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>from fastapi import FastAPI, Depends\nfrom sqlalchemy import create_engine, Column, Integer, String\nfrom sqlalchemy.ext.declarative import declarative_base\nfrom sqlalchemy.orm import sessionmaker, Session\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()<\/code><\/pre>\n<p>\ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0 \uc5f0\uacb0\ud558\uae30 \uc704\ud55c \uc5d4\uc9c4\uc744 \uc0dd\uc131\ud558\uace0 \uc138\uc158\uc744 \uc815\uc758\ud588\uc2b5\ub2c8\ub2e4. \uc774\uc81c \uc0ac\uc6a9\uc790 \ubaa8\ub378\uc744 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc640 \uc5f0\ub3d9\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.<\/p>\n<pre><code>class 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)<\/code><\/pre>\n<p>\uc774\uc81c \ub370\uc774\ud130\ubca0\uc774\uc2a4\ub97c \ucd08\uae30\ud654\ud558\uace0, FastAPI\uc640 \uc5f0\ub3d9\ud558\ub294 \ubc29\ubc95\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code>Base.metadata.create_all(bind=engine)\n\ndef get_db():\n    db = SessionLocal()\n    try:\n        yield db\n    finally:\n        db.close()<\/code><\/pre>\n<p>GET \uba54\uc11c\ub4dc\uc5d0 \ub370\uc774\ud130\ubca0\uc774\uc2a4\uc5d0\uc11c \uc0ac\uc6a9\uc790 \uc815\ubcf4\ub97c \uac00\uc838\uc624\ub294 \ub85c\uc9c1\uc744 \uc791\uc131\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4:<\/p>\n<pre><code>@app.get(\"\/users\/{user_id}\")\nasync def read_user(user_id: int, db: Session = Depends(get_db)):\n    user = db.query(UserModel).filter(UserModel.id == user_id).first()\n    return user if user else {\"message\": \"User not found\"}<\/code><\/pre>\n<h2>6. FastAPI \ubb38\uc11c\ud654<\/h2>\n<p>FastAPI\uc758 \uac00\uc7a5 \ud070 \uc7a5\uc810 \uc911 \ud558\ub098\ub294 \uc790\ub3d9\uc73c\ub85c API \ubb38\uc11c\ub97c \uc0dd\uc131\ud574\uc900\ub2e4\ub294 \uc810\uc785\ub2c8\ub2e4. Swagger UI\ub97c \ud1b5\ud574 API\ub97c \uc27d\uac8c \ud14c\uc2a4\ud2b8\ud558\uace0 \ubb38\uc11c\ud654\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc11c\ubc84\ub97c \uc2e4\ud589\ud55c \ud6c4 <a href=\"http:\/\/127.0.0.1:8000\/docs\">http:\/\/127.0.0.1:8000\/docs<\/a>\ub85c \uc811\uc18d\ud558\uba74 Swagger UI\uc5d0\uc11c API\ub97c \ud655\uc778\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<h2>7. \ubcf4\uc548 \ubc0f \uc778\uc99d<\/h2>\n<p>\uc2e4\uc81c \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc5d0\uc11c\ub294 \uc0ac\uc6a9\uc790 \uc778\uc99d \ubc0f \ubcf4\uc548\uc774 \uc911\uc694\ud569\ub2c8\ub2e4. FastAPI\ub294 OAuth2\ub97c \uc9c0\uc6d0\ud558\uc5ec JWT \ud1a0\ud070 \uae30\ubc18 \uc778\uc99d\uc744 \uad6c\ud604\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc774 \ubd80\ubd84\uc740 \ucd94\uac00\uc801\uc778 \uad6c\ud604\uc774 \ud544\uc694\ud558\ubbc0\ub85c FastAPI\uc758 \uacf5\uc2dd \ubb38\uc11c\ub97c \ucc38\uace0\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<h2>8. \uacb0\ub860<\/h2>\n<p>FastAPI\ub294 \ud604\ub300\uc801\uc778 \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158 \uac1c\ubc1c\uc5d0 \uc801\ud569\ud55c \uac15\ub825\ud55c \ud504\ub808\uc784\uc6cc\ud06c\uc785\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 \uae30\ubcf8\uc801\uc778 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc \ucc98\ub9ac\ub97c \ub2e4\ub8e8\uc5c8\uc2b5\ub2c8\ub2e4. FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc5ec\ub7ec\ubd84\ub9cc\uc758 RESTful API\ub97c \uad6c\ud604\ud574\ubcf4\uae38 \ubc14\ub78d\ub2c8\ub2e4. \ucd94\uac00\uc801\uc778 \ub0b4\uc6a9\uc774 \ud544\uc694\ud558\uc2dc\uba74 FastAPI \uacf5\uc2dd \ubb38\uc11c\uc5d0\uc11c \ub354\uc6b1 \ub2e4\uc591\ud55c \uae30\ub2a5\uacfc \uc0ac\uc6a9\ubc95\uc744 \ud559\uc2b5\ud558\uc2e4 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<p>\uc5ec\ub7ec\ubd84\uc758 \ud504\ub85c\uc81d\ud2b8\uc5d0 FastAPI\ub97c \uc801\uc6a9\ud574 \ubcf4\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4.<\/p>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, API\ub97c \uc27d\uac8c \uad6c\ucd95\ud558\uace0 \ubc30\ud3ec\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae30\ubcf8 \uacbd\ub85c\ub97c \uc124\uc815\ud558\uace0, HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE)\ub97c \ucc98\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \ud544\uc694\ud55c \uc124\uc815\uacfc \uc608\uc81c \ucf54\ub4dc\ub97c \uc81c\uacf5\ud558\ub2c8 \ucc38\uace0\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. 1. FastAPI \uc124\uce58 \ubc0f \uae30\ubcf8 \uc124\uc815 FastAPI\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 Python \ud658\uacbd\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. Python &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38518\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac&#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-38518","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, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \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\/38518\/\" \/>\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, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, API\ub97c \uc27d\uac8c \uad6c\ucd95\ud558\uace0 \ubc30\ud3ec\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae30\ubcf8 \uacbd\ub85c\ub97c \uc124\uc815\ud558\uace0, HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE)\ub97c \ucc98\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \ud544\uc694\ud55c \uc124\uc815\uacfc \uc608\uc81c \ucf54\ub4dc\ub97c \uc81c\uacf5\ud558\ub2c8 \ucc38\uace0\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. 1. FastAPI \uc124\uce58 \ubc0f \uae30\ubcf8 \uc124\uc815 FastAPI\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 Python \ud658\uacbd\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. Python &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38518\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:17:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:06+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\/38518\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38518\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac\",\"datePublished\":\"2024-11-01T18:17:48+00:00\",\"dateModified\":\"2024-11-26T06:44:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38518\/\"},\"wordCount\":90,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38518\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38518\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:17:48+00:00\",\"dateModified\":\"2024-11-26T06:44:06+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38518\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38518\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38518\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac\"}]},{\"@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, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \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\/38518\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 Python\uc744 \uae30\ubc18\uc73c\ub85c \ud55c \ud604\ub300\uc801\uc778 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, API\ub97c \uc27d\uac8c \uad6c\ucd95\ud558\uace0 \ubc30\ud3ec\ud560 \uc218 \uc788\ub294 \uac15\ub825\ud55c \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \ubcf8 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uae30\ubcf8 \uacbd\ub85c\ub97c \uc124\uc815\ud558\uace0, HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE)\ub97c \ucc98\ub9ac\ud558\ub294 \ubc29\ubc95\uc5d0 \ub300\ud574 \uc0c1\uc138\ud788 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \uc774 \uacfc\uc815\uc5d0\uc11c \ud544\uc694\ud55c \uc124\uc815\uacfc \uc608\uc81c \ucf54\ub4dc\ub97c \uc81c\uacf5\ud558\ub2c8 \ucc38\uace0\ud558\uc2dc\uae30 \ubc14\ub78d\ub2c8\ub2e4. 1. FastAPI \uc124\uce58 \ubc0f \uae30\ubcf8 \uc124\uc815 FastAPI\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574\uc11c\ub294 Python \ud658\uacbd\uc774 \ud544\uc694\ud569\ub2c8\ub2e4. Python &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac\"","og_url":"https:\/\/atmokpo.com\/w\/38518\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:17:48+00:00","article_modified_time":"2024-11-26T06:44:06+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\/38518\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38518\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac","datePublished":"2024-11-01T18:17:48+00:00","dateModified":"2024-11-26T06:44:06+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38518\/"},"wordCount":90,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38518\/","url":"https:\/\/atmokpo.com\/w\/38518\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:17:48+00:00","dateModified":"2024-11-26T06:44:06+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38518\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38518\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38518\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, \uae30\ubcf8 \uacbd\ub85c \uc124\uc815 \ubc0f HTTP \uba54\uc11c\ub4dc(POST, GET, PUT, DELETE) \ucc98\ub9ac"}]},{"@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\/38518","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=38518"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38518\/revisions"}],"predecessor-version":[{"id":38519,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38518\/revisions\/38519"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38518"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38518"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38518"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}