{"id":38440,"date":"2024-11-01T18:16:58","date_gmt":"2024-11-01T18:16:58","guid":{"rendered":"http:\/\/atmokpo.com\/w\/?p=38440"},"modified":"2024-11-26T06:44:19","modified_gmt":"2024-11-26T06:44:19","slug":"fastapi-%ec%84%9c%eb%b2%84%ea%b0%9c%eb%b0%9c-jinja-%eb%b0%98%eb%b3%b5%eb%ac%b8","status":"publish","type":"post","link":"https:\/\/atmokpo.com\/w\/38440\/","title":{"rendered":"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38"},"content":{"rendered":"<p><body><\/p>\n<p>\n        FastAPI\ub294 \uc6f9 API \uac1c\ubc1c\uc744 \uc704\ud574 \uc124\uacc4\ub41c \ud604\ub300\uc801\uc774\uace0 \ube60\ub978 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc73c\uba70 Starlette\uc640 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uc5ec \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ucf54\ub4dc \uc791\uc131 \uc2dc \uc790\ub3d9\uc73c\ub85c OpenAPI\uc640 JSON Schema\ub97c \uc0dd\uc131\ud574\uc90d\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0, Jinja \ud15c\ud50c\ub9bf \uc5b8\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec HTML\uc744 \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ub610\ud55c, \ubc18\ubcf5\ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \ub3d9\uc801\uc73c\ub85c HTML \ucf58\ud150\uce20\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 \ud568\uaed8 \uc54c\uc544\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>1. FastAPI \uc18c\uac1c<\/h2>\n<p>\n        FastAPI\ub294 Python 3.6 \uc774\uc0c1\uc5d0\uc11c \uc0ac\uc6a9\ud560 \uc218 \uc788\ub294 \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, RESTful API\ub97c \uac04\ud3b8\ud558\uac8c \uad6c\ucd95\ud560 \uc218 \uc788\uac8c \ud574\uc90d\ub2c8\ub2e4. FastAPI\uc758 \uac00\uc7a5 \ud070 \ud2b9\uc9d5\uc740 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<ul>\n<li><strong>\ube44\ub3d9\uae30 \uc9c0\uc6d0:<\/strong> FastAPI\ub294 async\/await \uad6c\ubb38\uc744 \uc9c0\uc6d0\ud558\uc5ec \ube44\ub3d9\uae30 \uc694\uccad\uc744 \ucc98\ub9ac\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/li>\n<li><strong>\uc790\ub3d9 \ubb38\uc11c\ud654:<\/strong> \uc791\uc131\ud55c API\uc5d0 \ub300\ud574 \uc790\ub3d9\uc73c\ub85c OpenAPI \ubb38\uc11c\ub97c \uc0dd\uc131\ud569\ub2c8\ub2e4.<\/li>\n<li><strong>\ub370\uc774\ud130 \uac80\uc99d:<\/strong> Pydantic\uc744 \uc0ac\uc6a9\ud558\uc5ec API \uc694\uccad \ubc0f \uc751\ub2f5 \ub370\uc774\ud130\uc758 \uac80\uc99d\uc774 \uc6a9\uc774\ud569\ub2c8\ub2e4.<\/li>\n<\/ul>\n<h2>2. FastAPI \uc124\uce58<\/h2>\n<p>\n        FastAPI\ub97c \uc124\uce58\ud558\uae30 \uc704\ud574\uc11c\ub294 Python\uc774 \uc124\uce58\ub418\uc5b4 \uc788\uc5b4\uc57c \ud558\uba70, \ub2e4\uc74c\uacfc \uac19\uc740 \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc124\uce58\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>pip install fastapi uvicorn<\/code><\/pre>\n<h2>3. FastAPI \uae30\ubcf8 \uc124\uc815<\/h2>\n<p>\n        FastAPI\ub97c \ucc98\uc74c \uc124\uc815\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \uc544\ub798\ub294 \uae30\ubcf8\uc801\uc778 FastAPI \uc11c\ubc84\uc758 \uc608\uc81c\uc785\ub2c8\ub2e4.\n    <\/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<p>\n        \uc704\uc758 \ucf54\ub4dc\ub294 FastAPI \uc11c\ubc84\ub97c \uc0dd\uc131\ud558\uace0, \ub8e8\ud2b8 \uacbd\ub85c(&#8220;\/&#8221;)\uc5d0 GET \uc694\uccad\uc774 \ub4e4\uc5b4\uc624\uba74 &#8220;Hello, World&#8221;\ub77c\ub294 JSON \uc751\ub2f5\uc744 \uc0dd\uc131\ud569\ub2c8\ub2e4. \uc774 \ucf54\ub4dc\ub97c \uc2e4\ud589\ud558\uae30 \uc704\ud574\uc11c\ub294 \ub2e4\uc74c \uba85\ub839\uc5b4\ub97c \uc0ac\uc6a9\ud569\ub2c8\ub2e4.\n    <\/p>\n<pre><code>uvicorn main:app --reload<\/code><\/pre>\n<p>\n        \uc5ec\uae30\uc11c &#8220;main&#8221;\uc740 Python \ud30c\uc77c\uc758 \uc774\ub984\uc774\uba70, &#8220;app&#8221;\uc740 FastAPI \uc778\uc2a4\ud134\uc2a4 \uc774\ub984\uc785\ub2c8\ub2e4. &#8211;reload \ud50c\ub798\uadf8\ub97c \uc0ac\uc6a9\ud558\uba74 \ucf54\ub4dc \ubcc0\uacbd \uc2dc \uc790\ub3d9\uc73c\ub85c \uc11c\ubc84\ub97c \uc7ac\uc2dc\uc791\ud569\ub2c8\ub2e4.\n    <\/p>\n<h2>4. Jinja \ud15c\ud50c\ub9bf \uc18c\uac1c<\/h2>\n<p>\n        Jinja\ub294 Python \uc6f9 \ud504\ub808\uc784\uc6cc\ud06c\uc5d0\uc11c \ub110\ub9ac \uc0ac\uc6a9\ub418\ub294 \ud15c\ud50c\ub9bf \uc5d4\uc9c4\uc785\ub2c8\ub2e4. Jinja\ub97c \uc0ac\uc6a9\ud558\uba74 HTML \ud30c\uc77c\uacfc Python \ucf54\ub4dc\ub97c \ubd84\ub9ac\ud558\uc5ec \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uad00\ub9ac \ubc0f \uc720\uc9c0\ubcf4\uc218\ub97c \uc6a9\uc774\ud558\uac8c \ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 Jinja\ub97c \ud1b5\ud574 HTML \ud15c\ud50c\ub9bf\uc744 \ub80c\ub354\ub9c1\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>5. FastAPI\uc5d0\uc11c Jinja \uc0ac\uc6a9\ud558\uae30<\/h2>\n<p>\n        FastAPI\uc5d0\uc11c Jinja\ub97c \uc0ac\uc6a9\ud558\uae30 \uc704\ud574 \uba3c\uc800 Jinja2\ub97c \uc124\uce58\ud574\uc57c \ud569\ub2c8\ub2e4.\n    <\/p>\n<pre><code>pip install jinja2<\/code><\/pre>\n<p>\n        \ub2e4\uc74c\uc73c\ub85c, Jinja \ud15c\ud50c\ub9bf\uc744 \uc0ac\uc6a9\ud558\uae30 \uc704\ud55c FastAPI\uc758 \uae30\ubcf8 \uc124\uc815\uc744 \uc0b4\ud3b4\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\nfrom fastapi import FastAPI, Request\nfrom fastapi.responses import HTMLResponse\nfrom fastapi.templating import Jinja2Templates\n\napp = FastAPI()\n\ntemplates = Jinja2Templates(directory=\"templates\")\n\n@app.get(\"\/\", response_class=HTMLResponse)\nasync def read_root(request: Request):\n    return templates.TemplateResponse(\"index.html\", {\"request\": request})\n<\/code><\/pre>\n<p>\n        \uc5ec\uae30\uc11c &#8220;templates&#8221;\ub77c\ub294 \ub514\ub809\ud1a0\ub9ac\ub97c \uc0dd\uc131\ud558\uace0 \uadf8 \uc548\uc5d0 &#8220;index.html&#8221; \ud30c\uc77c\uc744 \ub9cc\ub4e4\uc5b4\uc57c \ud569\ub2c8\ub2e4. &#8220;TemplateResponse&#8221;\ub97c \uc0ac\uc6a9\ud558\uc5ec Jinja \ud15c\ud50c\ub9bf\uc744 \ub80c\ub354\ub9c1\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>6. Jinja \ud15c\ud50c\ub9bf\uc5d0 \ubc18\ubcf5\ubb38 \uc0ac\uc6a9\ud558\uae30<\/h2>\n<p>\n        Jinja\uc5d0\uc11c\ub294 Python\uc758 \ub9ac\uc2a4\ud2b8\ub098 \ub515\uc154\ub108\ub9ac\uc640 \uac19\uc740 iterable \uac1d\uccb4\ub97c \uc27d\uac8c \ubc18\ubcf5\ud560 \uc218 \uc788\ub294 \uae30\ub2a5\uc744 \uc81c\uacf5\ud569\ub2c8\ub2e4. \uc544\ub798\ub294 Python \ub9ac\uc2a4\ud2b8\ub97c \ubc18\ubcf5\ud558\uc5ec HTML \ub9ac\uc2a4\ud2b8\ub97c \uc0dd\uc131\ud558\ub294 \uc608\uc81c\uc785\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\n@app.get(\"\/items\/\", response_class=HTMLResponse)\nasync def read_items(request: Request):\n    items = [\"Apple\", \"Banana\", \"Cherry\"]\n    return templates.TemplateResponse(\"items.html\", {\"request\": request, \"items\": items})\n<\/code><\/pre>\n<p>\n        \uc704 \ucf54\ub4dc\uc5d0\uc11c &#8220;items&#8221; \ub9ac\uc2a4\ud2b8\ub97c FastAPI \uacbd\ub85c(&#8220;\/items\/&#8221;)\uc5d0 \ub300\ud55c GET \uc694\uccad\uc5d0 \ub300\ud55c \uc751\ub2f5\uc73c\ub85c HTML \ud15c\ud50c\ub9bf\uc5d0 \uc804\ub2ec\ud569\ub2c8\ub2e4. \uc774\uc81c &#8220;items.html&#8221; \ud30c\uc77c\uc744 \uc0dd\uc131\ud558\uc5ec Jinja \ubc18\ubcf5\ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub9ac\uc2a4\ud2b8 \ud56d\ubaa9\uc744 \ucd9c\ub825\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\n<!DOCTYPE html>\n\n<html lang=\"ko\">\n<head>\n    <meta charset=\"utf-8\"\/>\n    <title>Items List<\/title>\n<\/head>\n<body>\n    <h1>\uacfc\uc77c \ubaa9\ub85d<\/h1>\n    <ul>\n        {% for item in items %}\n            <li>{{ item }}<\/li>\n        {% endfor %}\n    <\/ul>\n<\/body>\n<\/html>\n<\/code><\/pre>\n<p>\n        \uc704\uc758 &#8220;items.html&#8221; \ud30c\uc77c\uc5d0\uc11c Jinja\uc758 {% for %} \uad6c\ubb38\uc744 \uc0ac\uc6a9\ud558\uc5ec &#8220;items&#8221; \ub9ac\uc2a4\ud2b8\uc758 \uac01 \ud56d\ubaa9\uc744 \ubc18\ubcf5\ud558\uc5ec \ucd9c\ub825\ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub97c \ud1b5\ud574 \uc6f9 \ud398\uc774\uc9c0\uc5d0 \ub3d9\uc801\uc73c\ub85c HTML \ucf58\ud150\uce20\ub97c \uc0dd\uc131\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>7. Jinja\uc758 \uc870\uac74\ubb38 \uc0ac\uc6a9\ud558\uae30<\/h2>\n<p>\n        \ubc18\ubcf5\ubb38\uacfc \ud568\uaed8 Jinja\uc5d0\uc11c\ub294 \uc870\uac74\ubb38\ub3c4 \uc0ac\uc6a9\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4, \uacfc\uc77c \ubaa9\ub85d\uc5d0\uc11c \ud2b9\uc815 \uc870\uac74\uc5d0 \ub530\ub77c \ub2e4\ub978 \ub0b4\uc6a9\uc744 \ucd9c\ub825\ud558\ub3c4\ub85d \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\n<!DOCTYPE html>\n\n<html lang=\"ko\">\n<head>\n    <meta charset=\"utf-8\"\/>\n    <title>Items List<\/title>\n<\/head>\n<body>\n    <h1>\uacfc\uc77c \ubaa9\ub85d<\/h1>\n    <ul>\n        {% for item in items %}\n            <li>{{ item }}<\/li>\n            {% if item == \"Banana\" %}\n                <strong>(\uc774\uac83\uc740 \ubc14\ub098\ub098\uc785\ub2c8\ub2e4!)<\/strong>\n            {% endif %}\n        {% endfor %}\n    <\/ul>\n<\/body>\n<\/html>\n<\/code><\/pre>\n<p>\n        \uc704\uc758 \uc608\uc81c\uc5d0\uc11c\ub294 &#8220;item&#8221;\uc774 &#8220;Banana&#8221;\uc77c \ub54c, \ucd94\uac00 \uba54\uc2dc\uc9c0\ub97c \ucd9c\ub825\ud558\ub3c4\ub85d \uc124\uc815\ud558\uc600\uc2b5\ub2c8\ub2e4. Jinja\uc758 \uc870\uac74\ubb38\uc744 \ud1b5\ud574 HTML \ud15c\ud50c\ub9bf \ub0b4\uc5d0\uc11c \ub3d9\uc801\uc778 \ucf58\ud150\uce20\ub97c \uc27d\uac8c \uc81c\uc5b4\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>8. FastAPI\uc640 Jinja\ub97c \ud65c\uc6a9\ud55c \uc804\uccb4 \uc608\uc81c<\/h2>\n<p>\n        \uc9c0\uae08\uae4c\uc9c0 \ubc30\uc6b4 \ub0b4\uc6a9\uc744 \ubc14\ud0d5\uc73c\ub85c FastAPI\uc640 Jinja\ub97c \ud65c\uc6a9\ud55c \uc804\uccb4 \uc608\uc81c\ub97c \ub9cc\ub4e4\uc5b4 \ubcf4\uaca0\uc2b5\ub2c8\ub2e4. \ud504\ub85c\uc81d\ud2b8 \ud3f4\ub354 \uad6c\uc870\ub294 \ub2e4\uc74c\uacfc \uac19\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\nproject\/\n\u2502\n\u251c\u2500\u2500 main.py\n\u2514\u2500\u2500 templates\/\n    \u251c\u2500\u2500 index.html\n    \u2514\u2500\u2500 items.html\n<\/code><\/pre>\n<p>\n        \uc774\uc81c &#8220;main.py&#8221; \ud30c\uc77c\uc5d0 \uc804\uccb4 \ucf54\ub4dc\ub97c \uc791\uc131\ud574\ubcf4\uaca0\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<pre><code>\nfrom fastapi import FastAPI, Request\nfrom fastapi.responses import HTMLResponse\nfrom fastapi.templating import Jinja2Templates\n\napp = FastAPI()\ntemplates = Jinja2Templates(directory=\"templates\")\n\n@app.get(\"\/\", response_class=HTMLResponse)\nasync def read_root(request: Request):\n    return templates.TemplateResponse(\"index.html\", {\"request\": request})\n\n@app.get(\"\/items\/\", response_class=HTMLResponse)\nasync def read_items(request: Request):\n    items = [\"Apple\", \"Banana\", \"Cherry\"]\n    return templates.TemplateResponse(\"items.html\", {\"request\": request, \"items\": items})\n<\/code><\/pre>\n<p>\n        \uc774\uc81c &#8220;index.html&#8221; \ud30c\uc77c\uacfc &#8220;items.html&#8221; \ud30c\uc77c\uc740 \uc774\uc804\uc5d0 \uc124\uba85\ud55c \ub0b4\uc6a9\uacfc \ub3d9\uc77c\ud558\uac8c \uc791\uc131\ud558\uc2ed\uc2dc\uc624. FastAPI \uc11c\ubc84\ub97c \uc2e4\ud589\ud55c \ud6c4, &#8220;\/&#8221; \uacbd\ub85c\uc5d0 \uc811\uc18d\ud558\uc5ec \uba54\uc778 \ud398\uc774\uc9c0\ub97c \ud655\uc778\ud558\uace0 &#8220;\/items\/&#8221; \uacbd\ub85c\uc5d0 \uc811\uc18d\ud558\uc5ec \uacfc\uc77c \ubaa9\ub85d\uc744 \ubcfc \uc218 \uc788\uc2b5\ub2c8\ub2e4.\n    <\/p>\n<h2>9. \uacb0\ub860<\/h2>\n<p>\n        \uc774\ubc88 \uac15\uc88c\uc5d0\uc11c\ub294 FastAPI\ub97c \uc0ac\uc6a9\ud558\uc5ec \uc6f9 API\ub97c \uac1c\ubc1c\ud558\ub294 \ubc29\ubc95\uacfc Jinja \ud15c\ud50c\ub9bf\uc744 \ud1b5\ud574 HTML\uc744 \ub3d9\uc801\uc73c\ub85c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95, \uadf8\ub9ac\uace0 \ubc18\ubcf5\ubb38\uacfc \uc870\uac74\ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \ubcf4\ub2e4 \ubcf5\uc7a1\ud55c UI\ub97c \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc744 \ubc30\uc6e0\uc2b5\ub2c8\ub2e4. FastAPI\uc758 \ub9e4\ub825\uc740 \uadf8 \uac04\uacb0\ud568\uacfc \ube44\ub3d9\uae30 \ucc98\ub9ac \ub2a5\ub825, \uadf8\ub9ac\uace0 \uc790\ub3d9 \ubb38\uc11c\ud654 \uae30\ub2a5\uc5d0 \uc788\uc2b5\ub2c8\ub2e4. \uc55e\uc73c\ub85c FastAPI\uc640 Jinja\ub97c \ud65c\uc6a9\ud558\uc5ec \ub354\uc6b1 \ub2e4\uc591\ud55c \uc6f9 \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc744 \uac1c\ubc1c\ud574\ubcf4\uc2dc\uae38 \ubc14\ub78d\ub2c8\ub2e4.\n    <\/p>\n<h2>10. \ub2e4\uc74c \ub2e8\uacc4<\/h2>\n<p>\n        \ub354 \ub098\uc544\uac00 FastAPI\uc758 \uace0\uae09 \uae30\ub2a5\uc778 \uc720\uc800 \uc778\uc99d, \ub370\uc774\ud130\ubca0\uc774\uc2a4 \ud1b5\ud569, \ube44\ub3d9\uae30 \uc791\uc5c5 \ub4f1\uc744 \ud559\uc2b5\ud558\uc5ec \uc2e4\ubb34\uc5d0 \uc801\uc6a9\ud560 \uc218 \uc788\ub294 \ubc29\ud5a5\uc73c\ub85c \ubc1c\uc804\uc2dc\ucf1c \ubcf4\uc2ed\uc2dc\uc624. FastAPI\uc758 \uacf5\uc2dd \ubb38\uc11c\ub3c4 \ucc38\uace0\ud558\uc2dc\uba74 \ub9ce\uc740 \ub3c4\uc6c0\uc774 \ub420 \uac83\uc785\ub2c8\ub2e4.\n    <\/p>\n<footer>\n<p>\u00a9 2023 Your Name. All rights reserved.<\/p>\n<\/footer>\n<p><\/body><\/p>\n","protected":false},"excerpt":{"rendered":"<p>FastAPI\ub294 \uc6f9 API \uac1c\ubc1c\uc744 \uc704\ud574 \uc124\uacc4\ub41c \ud604\ub300\uc801\uc774\uace0 \ube60\ub978 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc73c\uba70 Starlette\uc640 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uc5ec \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ucf54\ub4dc \uc791\uc131 \uc2dc \uc790\ub3d9\uc73c\ub85c OpenAPI\uc640 JSON Schema\ub97c \uc0dd\uc131\ud574\uc90d\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0, Jinja \ud15c\ud50c\ub9bf \uc5b8\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec HTML\uc744 \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ub610\ud55c, \ubc18\ubcf5\ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \ub3d9\uc801\uc73c\ub85c HTML \ucf58\ud150\uce20\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 &hellip; <a href=\"https:\/\/atmokpo.com\/w\/38440\/\" class=\"more-link\">\ub354 \ubcf4\uae30<span class=\"screen-reader-text\"> &#8220;FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38&#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-38440","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, Jinja, \ubc18\ubcf5\ubb38 - \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\/38440\/\" \/>\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, Jinja, \ubc18\ubcf5\ubb38 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"og:description\" content=\"FastAPI\ub294 \uc6f9 API \uac1c\ubc1c\uc744 \uc704\ud574 \uc124\uacc4\ub41c \ud604\ub300\uc801\uc774\uace0 \ube60\ub978 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc73c\uba70 Starlette\uc640 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uc5ec \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ucf54\ub4dc \uc791\uc131 \uc2dc \uc790\ub3d9\uc73c\ub85c OpenAPI\uc640 JSON Schema\ub97c \uc0dd\uc131\ud574\uc90d\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0, Jinja \ud15c\ud50c\ub9bf \uc5b8\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec HTML\uc744 \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ub610\ud55c, \ubc18\ubcf5\ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \ub3d9\uc801\uc73c\ub85c HTML \ucf58\ud150\uce20\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 &hellip; \ub354 \ubcf4\uae30 &quot;FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38&quot;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/atmokpo.com\/w\/38440\/\" \/>\n<meta property=\"og:site_name\" content=\"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\" \/>\n<meta property=\"article:published_time\" content=\"2024-11-01T18:16:58+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-11-26T06:44:19+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\/38440\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38440\/\"},\"author\":{\"name\":\"root\",\"@id\":\"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7\"},\"headline\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38\",\"datePublished\":\"2024-11-01T18:16:58+00:00\",\"dateModified\":\"2024-11-26T06:44:19+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38440\/\"},\"wordCount\":118,\"publisher\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#organization\"},\"articleSection\":[\"FastAPI\uc11c\ubc84\uac1c\ubc1c\"],\"inLanguage\":\"ko-KR\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/atmokpo.com\/w\/38440\/\",\"url\":\"https:\/\/atmokpo.com\/w\/38440\/\",\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8\",\"isPartOf\":{\"@id\":\"https:\/\/atmokpo.com\/w\/#website\"},\"datePublished\":\"2024-11-01T18:16:58+00:00\",\"dateModified\":\"2024-11-26T06:44:19+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/atmokpo.com\/w\/38440\/#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/atmokpo.com\/w\/38440\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/atmokpo.com\/w\/38440\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\ud648\",\"item\":\"https:\/\/atmokpo.com\/w\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38\"}]},{\"@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, Jinja, \ubc18\ubcf5\ubb38 - \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\/38440\/","og_locale":"ko_KR","og_type":"article","og_title":"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","og_description":"FastAPI\ub294 \uc6f9 API \uac1c\ubc1c\uc744 \uc704\ud574 \uc124\uacc4\ub41c \ud604\ub300\uc801\uc774\uace0 \ube60\ub978 \ud504\ub808\uc784\uc6cc\ud06c\ub85c, Python\uc73c\ub85c \uc791\uc131\ub418\uc5b4 \uc788\uc73c\uba70 Starlette\uc640 Pydantic\uc744 \uae30\ubc18\uc73c\ub85c \ud558\uace0 \uc788\uc2b5\ub2c8\ub2e4. FastAPI\ub294 \ube44\ub3d9\uae30 \ud504\ub85c\uadf8\ub798\ubc0d\uc744 \uc9c0\uc6d0\ud558\uc5ec \ub192\uc740 \uc131\ub2a5\uc744 \uc790\ub791\ud558\uba70, \ucf54\ub4dc \uc791\uc131 \uc2dc \uc790\ub3d9\uc73c\ub85c OpenAPI\uc640 JSON Schema\ub97c \uc0dd\uc131\ud574\uc90d\ub2c8\ub2e4. \uc774\ubc88 \uae00\uc5d0\uc11c\ub294 FastAPI \uc11c\ubc84 \uac1c\ubc1c \ubc29\ubc95\uc744 \ub2e4\ub8e8\uace0, Jinja \ud15c\ud50c\ub9bf \uc5b8\uc5b4\ub97c \uc0ac\uc6a9\ud558\uc5ec HTML\uc744 \uad6c\uc131\ud558\ub294 \ubc29\ubc95\uc744 \uc124\uba85\ud558\uaca0\uc2b5\ub2c8\ub2e4. \ub610\ud55c, \ubc18\ubcf5\ubb38\uc744 \ud65c\uc6a9\ud558\uc5ec \ub3d9\uc801\uc73c\ub85c HTML \ucf58\ud150\uce20\ub97c \uc0dd\uc131\ud558\ub294 \ubc29\ubc95\uc744 &hellip; \ub354 \ubcf4\uae30 \"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38\"","og_url":"https:\/\/atmokpo.com\/w\/38440\/","og_site_name":"\ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","article_published_time":"2024-11-01T18:16:58+00:00","article_modified_time":"2024-11-26T06:44:19+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\/38440\/#article","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/38440\/"},"author":{"name":"root","@id":"https:\/\/atmokpo.com\/w\/#\/schema\/person\/91b6b3b138fbba0efb4ae64b1abd81d7"},"headline":"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38","datePublished":"2024-11-01T18:16:58+00:00","dateModified":"2024-11-26T06:44:19+00:00","mainEntityOfPage":{"@id":"https:\/\/atmokpo.com\/w\/38440\/"},"wordCount":118,"publisher":{"@id":"https:\/\/atmokpo.com\/w\/#organization"},"articleSection":["FastAPI\uc11c\ubc84\uac1c\ubc1c"],"inLanguage":"ko-KR"},{"@type":"WebPage","@id":"https:\/\/atmokpo.com\/w\/38440\/","url":"https:\/\/atmokpo.com\/w\/38440\/","name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38 - \ub77c\uc774\ube0c\uc2a4\ub9c8\ud2b8","isPartOf":{"@id":"https:\/\/atmokpo.com\/w\/#website"},"datePublished":"2024-11-01T18:16:58+00:00","dateModified":"2024-11-26T06:44:19+00:00","breadcrumb":{"@id":"https:\/\/atmokpo.com\/w\/38440\/#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/atmokpo.com\/w\/38440\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/atmokpo.com\/w\/38440\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\ud648","item":"https:\/\/atmokpo.com\/w\/en\/"},{"@type":"ListItem","position":2,"name":"FastAPI \uc11c\ubc84\uac1c\ubc1c, Jinja, \ubc18\ubcf5\ubb38"}]},{"@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\/38440","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=38440"}],"version-history":[{"count":1,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38440\/revisions"}],"predecessor-version":[{"id":38441,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/posts\/38440\/revisions\/38441"}],"wp:attachment":[{"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/media?parent=38440"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/categories?post=38440"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atmokpo.com\/w\/wp-json\/wp\/v2\/tags?post=38440"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}