{"id":477257,"date":"2023-08-09T09:09:43","date_gmt":"2023-08-09T09:09:43","guid":{"rendered":""},"modified":"2023-09-05T11:14:23","modified_gmt":"2023-09-05T11:14:23","slug":"flask","status":"publish","type":"wiki","link":"https:\/\/oneproxy.pro\/jp\/wiki\/flask\/","title":{"rendered":"\u30d5\u30e9\u30b9\u30b3"},"content":{"rendered":"<p>Flask \u306f Python \u3067\u66f8\u304b\u308c\u305f\u30de\u30a4\u30af\u30ed \u30a6\u30a7\u30d6 \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002\u30d5\u30a9\u30fc\u30e0\u691c\u8a3c\u3084\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u62bd\u8c61\u5316\u306a\u3069\u3001\u672c\u683c\u7684\u306a\u30a6\u30a7\u30d6 \u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306b\u3088\u304f\u3042\u308b\u7279\u5b9a\u306e\u6a5f\u80fd\u304c\u542b\u307e\u308c\u3066\u3044\u306a\u3044\u305f\u3081\u3001\u300c\u30de\u30a4\u30af\u30ed\u300d\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u547c\u3070\u308c\u308b\u3053\u3068\u304c\u3088\u304f\u3042\u308a\u307e\u3059\u3002\u4ee3\u308f\u308a\u306b\u3001Flask \u306f\u8efd\u91cf\u3067\u4f7f\u3044\u3084\u3059\u3044\u307e\u307e\u3001\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u306e\u69cb\u7bc9\u306b\u5fc5\u8981\u306a\u57fa\u672c\u69cb\u9020\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002Flask \u306f\u62e1\u5f35\u6027\u304c\u9ad8\u304f\u3001\u5fc5\u8981\u306a\u3068\u304d\u306b\u62e1\u5f35\u6a5f\u80fd\u3092\u901a\u3058\u3066\u3053\u308c\u3089\u306e\u4e0d\u8db3\u3057\u3066\u3044\u308b\u6a5f\u80fd\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30e9\u30b9\u30b3\u306e\u8d77\u6e90\u3068\u6b74\u53f2<\/h2>\n<p>Flask \u306f\u3001\u56fd\u969b\u7684\u306a Python \u611b\u597d\u5bb6\u306e\u30b0\u30eb\u30fc\u30d7\u3067\u3042\u308b Pocoo \u30c1\u30fc\u30e0\u306e\u30a2\u30af\u30c6\u30a3\u30d6 \u30e1\u30f3\u30d0\u30fc\u3067\u3042\u308b Armin Ronacher \u306b\u3088\u3063\u3066\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f\u3002Flask \u306e\u6700\u521d\u306e\u30d1\u30d6\u30ea\u30c3\u30af \u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u30012010 \u5e74 4 \u6708 1 \u65e5\u306b\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306f\u5f53\u521d\u3001\u30a8\u30a4\u30d7\u30ea\u30eb \u30d5\u30fc\u30eb\u306e\u30b8\u30e7\u30fc\u30af\u306e\u4e00\u90e8\u3067\u3057\u305f\u304c\u3001\u672c\u683c\u7684\u306a\u4eba\u6c17\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u767a\u5c55\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u308c\u306f\u3001Werkzeug \u306e\u30b7\u30f3\u30d7\u30eb\u306a\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0 \u30b7\u30b9\u30c6\u30e0\u3068 Jinja2 \u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u30a8\u30f3\u30b8\u30f3\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3088\u3063\u3066\u958b\u767a\u3055\u308c\u307e\u3057\u305f\u3002\u3053\u308c\u3089 2 \u3064\u306e\u30b3\u30f3\u30dd\u30fc\u30cd\u30f3\u30c8\u3082 Pocoo \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3059\u3002\u9577\u5e74\u306b\u308f\u305f\u308a\u3001Flask \u306f\u3001\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u3001\u67d4\u8edf\u6027\u3001\u304a\u3088\u3073\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5bfe\u3059\u308b\u304d\u3081\u7d30\u304b\u306a\u5236\u5fa1\u306b\u3088\u308a\u3001Web \u958b\u767a\u30b3\u30df\u30e5\u30cb\u30c6\u30a3\u3067\u5f37\u3044\u652f\u6301\u3092\u5f97\u3066\u304d\u307e\u3057\u305f\u3002<\/p>\n<h2>Flask \u3092\u8a73\u3057\u304f\u8abf\u3079\u308b<\/h2>\n<p>Flask \u306f\u3001WSGI (Web Server Gateway Interface) \u30c4\u30fc\u30eb\u30ad\u30c3\u30c8\u3068 Jinja2 \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u30a8\u30f3\u30b8\u30f3\u306b\u57fa\u3065\u3044\u3066\u3044\u307e\u3059\u3002\u3069\u3061\u3089\u3082 Python \u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3059\u3002WSGI \u306f\u3001Python Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u958b\u767a\u306e\u6a19\u6e96\u3067\u3059\u3002Jinja2 \u306f Python \u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u30a8\u30f3\u30b8\u30f3\u3067\u3042\u308a\u3001\u8907\u96d1\u306a HTML \u307e\u305f\u306f XML \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Flask \u306f\u4f7f\u3044\u3084\u3059\u304f\u3001\u3059\u3050\u306b\u4f7f\u3044\u59cb\u3081\u3089\u308c\u308b\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u304c\u3001\u5927\u898f\u6a21\u3067\u8907\u96d1\u306a Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u51e6\u7406\u3067\u304d\u308b\u3088\u3046\u306b\u3082\u69cb\u7bc9\u3055\u308c\u3066\u3044\u307e\u3059\u3002micro \u3068\u3044\u3046\u30d7\u30ec\u30d5\u30a3\u30c3\u30af\u30b9\u306f\u3001\u30b3\u30a2\u3092\u30b7\u30f3\u30d7\u30eb\u306b\u4fdd\u3061\u306a\u304c\u3089\u62e1\u5f35\u6027\u3092\u7dad\u6301\u3059\u308b\u3053\u3068\u3092\u76ee\u6307\u3057\u3066\u3044\u308b\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002<\/p>\n<p>Flask \u306b\u306f\u3001\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3001\u30d5\u30a9\u30fc\u30e0\u691c\u8a3c\u3001\u307e\u305f\u306f\u3055\u307e\u3056\u307e\u306a\u30c6\u30af\u30ce\u30ed\u30b8\u304c\u9069\u5207\u306a\u3082\u306e\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u4ee3\u308f\u308a\u306b\u3001Flask \u81ea\u4f53\u306b\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u304b\u306e\u3088\u3046\u306b\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u305d\u306e\u3088\u3046\u306a\u6a5f\u80fd\u3092\u8ffd\u52a0\u3059\u308b\u305f\u3081\u306e\u62e1\u5f35\u6a5f\u80fd\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\u3002\u3053\u306e\u30a2\u30d7\u30ed\u30fc\u30c1\u306b\u3088\u308a\u3001\u958b\u767a\u8005\u306f\u597d\u307f\u306e\u30c4\u30fc\u30eb\u3068\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u9078\u629e\u3067\u304d\u308b\u305f\u3081\u3001Flask \u306f\u67d4\u8edf\u306a\u9078\u629e\u80a2\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d5\u30e9\u30b9\u30b3\u306e\u5185\u90e8\u69cb\u9020\u3068\u6a5f\u80fd<\/h2>\n<p>Flask \u306e\u672c\u8cea\u306f\u3001Werkzeug \u3068 Jinja2 \u306e\u5358\u7d14\u306a\u7d44\u307f\u5408\u308f\u305b\u3067\u3059\u3002Werkzeug \u306f Python \u7528\u306e WSGI \u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3 \u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u3001Flask \u306f\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ea\u30af\u30a8\u30b9\u30c8 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3068\u30ec\u30b9\u30dd\u30f3\u30b9 \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3001URL \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3001HTTP \u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u306a\u3069\u306e\u4f4e\u30ec\u30d9\u30eb\u6a5f\u80fd\u3092\u51e6\u7406\u3057\u307e\u3059\u3002\u4e00\u65b9\u3001Jinja2 \u306f Python \u7528\u306e\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u30a8\u30f3\u30b8\u30f3\u3067\u3001Flask \u306f\u3053\u308c\u3092\u4f7f\u7528\u3057\u3066\u30d3\u30e5\u30fc\u3092\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3057\u307e\u3059\u3002<\/p>\n<p>\u4e00\u822c\u7684\u306a Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u306f\u3001\u30d5\u30ed\u30fc\u306f\u30af\u30e9\u30a4\u30a2\u30f3\u30c8 (Web \u30d6\u30e9\u30a6\u30b6\u30fc\u306a\u3069) \u304c Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u5b9f\u884c\u3055\u308c\u3066\u3044\u308b\u30b5\u30fc\u30d0\u30fc\u306b\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u9001\u4fe1\u3059\u308b\u3053\u3068\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002\u6b21\u306b\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3057\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u5fdc\u7b54\u3092\u8fd4\u3057\u307e\u3059\u3002Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306f\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3092\u4f7f\u7528\u3057\u3066\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u306e URL \u306b\u57fa\u3065\u3044\u3066\u5b9f\u884c\u3059\u308b\u30ed\u30b8\u30c3\u30af\u3092\u6c7a\u5b9a\u3057\u3001\u3053\u306e\u30ed\u30b8\u30c3\u30af\u306f\u5fdc\u7b54\u304c\u8fd4\u3055\u308c\u308b\u3053\u3068\u3067\u7d42\u4e86\u3057\u307e\u3059\u3002<\/p>\n<h2>Flask\u306e\u4e3b\u306a\u7279\u5fb4<\/h2>\n<ol>\n<li>\n<p><strong>\u30b7\u30f3\u30d7\u30eb\u3055:<\/strong> Flask \u306f\u975e\u5e38\u306b\u30b7\u30f3\u30d7\u30eb\u3067\u4f7f\u3044\u3084\u3059\u3044\u3067\u3059\u3002\u7121\u99c4\u3092\u7701\u3044\u305f\u30b7\u30f3\u30d7\u30eb\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306a\u306e\u3067\u3001\u90aa\u9b54\u306b\u306a\u3089\u305a\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u7bc9\u306b\u96c6\u4e2d\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u67d4\u8edf\u6027:<\/strong> Flask \u306b\u306f\u3059\u3050\u306b\u4f7f\u3048\u308b\u6a5f\u80fd\u306f\u307b\u3068\u3093\u3069\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u9ad8\u5ea6\u306a\u62e1\u5f35\u6027\u3092\u6301\u3064\u3088\u3046\u306b\u8a2d\u8a08\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30d5\u30a9\u30fc\u30e0\u306e\u691c\u8a3c\u304b\u3089\u753b\u50cf\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u307e\u3067\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u5fc5\u8981\u306a\u307b\u307c\u3059\u3079\u3066\u306e\u6a5f\u80fd\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u304d\u3081\u7d30\u304b\u306a\u5236\u5fa1:<\/strong> Flask \u3067\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u69cb\u6210\u304c\u30e6\u30fc\u30b6\u30fc\u306b\u4efb\u3055\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u7279\u5b9a\u306e\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306b\u6700\u3082\u9069\u3057\u305f\u65b9\u6cd5\u3067 Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u69cb\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>HTTP \u30ea\u30af\u30a8\u30b9\u30c8\u306e\u51e6\u7406:<\/strong> Flask \u306f\u3001HTTP \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u51e6\u7406\u3059\u308b\u305f\u3081\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u63d0\u4f9b\u3057\u307e\u3059\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u30fc\u306b\u7279\u5b9a\u306e HTTP \u30ea\u30af\u30a8\u30b9\u30c8\u304c\u9001\u4fe1\u3055\u308c\u305f\u3068\u304d\u306b\u5b9f\u884c\u3055\u308c\u308b\u95a2\u6570\u3092\u5b9a\u7fa9\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>URL \u30eb\u30fc\u30c6\u30a3\u30f3\u30b0:<\/strong> Flask \u3092\u4f7f\u7528\u3059\u308b\u3068\u3001URL \u3092 Python \u95a2\u6570\u306b\u30de\u30c3\u30d4\u30f3\u30b0\u3067\u304d\u308b\u305f\u3081\u3001Web \u30da\u30fc\u30b8\u306e\u304d\u308c\u3044\u306a URL \u3092\u7c21\u5358\u306b\u4f5c\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<li>\n<p><strong>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3:<\/strong> Flask \u306f\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8 \u30a8\u30f3\u30b8\u30f3\u3068\u3057\u3066 Jinja2 \u3092\u4f7f\u7528\u3057\u307e\u3059\u3002\u3064\u307e\u308a\u3001\u30e6\u30fc\u30b6\u30fc\u306e\u30d6\u30e9\u30a6\u30b6\u30fc\u304c\u30ec\u30f3\u30c0\u30ea\u30f3\u30b0\u3067\u304d\u308b HTML\u3001XML\u3001\u307e\u305f\u306f\u305d\u306e\u4ed6\u306e\u30de\u30fc\u30af\u30a2\u30c3\u30d7\u5f62\u5f0f\u3092\u751f\u6210\u3067\u304d\u307e\u3059\u3002<\/p>\n<\/li>\n<\/ol>\n<h2>\u30d5\u30e9\u30b9\u30b3\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u7a2e\u985e<\/h2>\n<p>Flask \u306b\u306f\u3001\u81ea\u52d5\u8eca\u3084\u643a\u5e2f\u96fb\u8a71\u306b\u3055\u307e\u3056\u307e\u306a\u30bf\u30a4\u30d7\u304c\u3042\u308b\u306e\u3068\u540c\u3058\u3088\u3046\u306b\u3001\u660e\u78ba\u306a\u300c\u30bf\u30a4\u30d7\u300d\u306f\u3042\u308a\u307e\u305b\u3093\u3002\u305f\u3060\u3057\u3001\u8907\u96d1\u3055\u3084\u542b\u307e\u308c\u308b\u7279\u5b9a\u306e\u6a5f\u80fd\u306b\u57fa\u3065\u3044\u3066 Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u5206\u985e\u3067\u304d\u307e\u3059\u3002\u57fa\u672c\u7684\u306a\u5185\u8a33\u306f\u6b21\u306e\u3068\u304a\u308a\u3067\u3059\u3002<\/p>\n<ul>\n<li><strong>\u5c0f\u898f\u6a21\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3:<\/strong> \u3053\u308c\u3089\u306f\u3001\u3044\u304f\u3064\u304b\u306e\u30eb\u30fc\u30c8\u3092\u6301\u3064\u5358\u7d14\u306a Web \u30da\u30fc\u30b8\u3067\u3042\u308b\u5834\u5408\u3082\u3042\u308c\u3070\u3001\u3088\u308a\u5927\u898f\u6a21\u306a\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u30d7\u30ed\u30c8\u30bf\u30a4\u30d7\u3067\u3042\u308b\u5834\u5408\u3082\u3042\u308a\u307e\u3059\u3002<\/li>\n<li><strong>RESTful API:<\/strong> Flask \u306f\u3001\u7279\u5b9a\u306e\u5f62\u5f0f (\u901a\u5e38\u306f JSON) \u3067 Web \u30b5\u30fc\u30d3\u30b9\u3068\u5bfe\u8a71\u3059\u308b\u305f\u3081\u306e\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9\u3067\u3042\u308b RESTful API \u3092\u69cb\u7bc9\u3059\u308b\u305f\u3081\u306b\u3088\u304f\u4f7f\u7528\u3055\u308c\u307e\u3059\u3002<\/li>\n<li><strong>\u4e2d\u898f\u6a21 Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3:<\/strong> \u3053\u308c\u3089\u306b\u306f\u3001\u30e6\u30fc\u30b6\u30fc\u8a8d\u8a3c\u3001\u30d5\u30a9\u30fc\u30e0\u691c\u8a3c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u64cd\u4f5c\u306a\u3069\u306e\u6a5f\u80fd\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<li><strong>\u5927\u898f\u6a21 Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3:<\/strong> \u4e0a\u8a18\u306b\u52a0\u3048\u3066\u3001\u3053\u308c\u3089\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u306f\u3001\u753b\u50cf\u51e6\u7406\u3084\u30ea\u30a2\u30eb\u30bf\u30a4\u30e0 \u30e1\u30c3\u30bb\u30fc\u30b8\u30f3\u30b0\u306a\u3069\u306e\u3088\u308a\u8907\u96d1\u306a\u6a5f\u80fd\u304c\u542b\u307e\u308c\u308b\u5834\u5408\u304c\u3042\u308a\u307e\u3059\u3002<\/li>\n<\/ul>\n<h2>Flask \u306e\u4f7f\u3044\u65b9\u3001\u554f\u984c\u70b9\u3001\u89e3\u6c7a\u7b56<\/h2>\n<p>Flask \u306f\u6c4e\u7528\u6027\u304c\u9ad8\u304f\u3001\u5358\u7d14\u306a\u9759\u7684 Web \u30b5\u30a4\u30c8\u306e\u4f5c\u6210\u304b\u3089\u8907\u96d1\u306a\u30c7\u30fc\u30bf\u99c6\u52d5\u578b Web \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3084 API \u306e\u69cb\u7bc9\u307e\u3067\u3001\u3055\u307e\u3056\u307e\u306a Web \u958b\u767a\u30bf\u30b9\u30af\u306b\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305f\u3060\u3057\u3001Flask \u306e\u30b7\u30f3\u30d7\u30eb\u3055\u3068\u67d4\u8edf\u6027\u306f\u8af8\u5203\u306e\u5263\u306b\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002\u958b\u767a\u8005\u306b\u591a\u304f\u306e\u9078\u629e\u80a2\u3068\u5b9f\u88c5\u306e\u8a73\u7d30\u304c\u59d4\u306d\u3089\u308c\u307e\u3059\u3002\u958b\u767a\u8005\u304c Web \u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u30d9\u30b9\u30c8 \u30d7\u30e9\u30af\u30c6\u30a3\u30b9\u306b\u7cbe\u901a\u3057\u3066\u3044\u306a\u3044\u5834\u5408\u3001\u3053\u306e\u67d4\u8edf\u6027\u304c\u554f\u984c\u3092\u5f15\u304d\u8d77\u3053\u3057\u3001\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u8106\u5f31\u6027\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u3053\u308c\u3089\u306e\u554f\u984c\u306e\u89e3\u6c7a\u7b56\u306f\u3001\u591a\u304f\u306e\u5834\u5408\u3001\u62e1\u5f35\u6a5f\u80fd\u3084\u30d7\u30e9\u30b0\u30a4\u30f3\u306e\u5f62\u3067\u63d0\u4f9b\u3055\u308c\u307e\u3059\u3002Flask \u306f\u62e1\u5f35\u6027\u306b\u512a\u308c\u3066\u3044\u308b\u305f\u3081\u3001\u7c21\u5358\u306b\u30d7\u30e9\u30b0\u30a4\u30f3\u3057\u3066\u6a5f\u80fd\u3092\u8ffd\u52a0\u3067\u304d\u308b\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3 \u30e9\u30a4\u30d6\u30e9\u30ea\u304c\u591a\u6570\u3042\u308a\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001Flask-SQLAlchemy \u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u30b7\u30f3\u30d7\u30eb\u3067\u52b9\u7387\u7684\u306a\u3084\u308a\u53d6\u308a\u3092\u63d0\u4f9b\u3057\u3001Flask-WTF \u306f\u30d5\u30a9\u30fc\u30e0\u306e\u691c\u8a3c\u3068 CSRF \u4fdd\u8b77\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<h2>\u985e\u4f3c\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u306e\u6bd4\u8f03<\/h2>\n<table>\n<thead>\n<tr>\n<th>\u7279\u5fb4<\/th>\n<th>\u30d5\u30e9\u30b9\u30b3<\/th>\n<th>\u30b8\u30e3\u30f3\u30b4<\/th>\n<th>\u30a8\u30af\u30b9\u30d7\u30ec\u30b9<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>\u8a00\u8a9e<\/td>\n<td>\u30d1\u30a4\u30bd\u30f3<\/td>\n<td>\u30d1\u30a4\u30bd\u30f3<\/td>\n<td>JavaScript<\/td>\n<\/tr>\n<tr>\n<td>\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u30a8\u30f3\u30b8\u30f3<\/td>\n<td>\u30b8\u30f3\u30b8\u30e32<\/td>\n<td>\u30b8\u30e3\u30f3\u30b4<\/td>\n<td>EJS\u3001\u30d1\u30b0<\/td>\n<\/tr>\n<tr>\n<td>ORM<\/td>\n<td>\u62e1\u5927<\/td>\n<td>\u5185\u8535<\/td>\n<td>\u62e1\u5927<\/td>\n<\/tr>\n<tr>\n<td>\u30d5\u30a9\u30fc\u30e0\u691c\u8a3c<\/td>\n<td>\u62e1\u5927<\/td>\n<td>\u5185\u8535<\/td>\n<td>\u62e1\u5927<\/td>\n<\/tr>\n<tr>\n<td>\u7ba1\u7406\u8005\u30a4\u30f3\u30bf\u30fc\u30d5\u30a7\u30fc\u30b9<\/td>\n<td>\u62e1\u5927<\/td>\n<td>\u5185\u8535<\/td>\n<td>\u62e1\u5927<\/td>\n<\/tr>\n<tr>\n<td>\u8a8d\u8a3c<\/td>\n<td>\u62e1\u5927<\/td>\n<td>\u5185\u8535<\/td>\n<td>\u62e1\u5927<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>\u8868\u304b\u3089\u308f\u304b\u308b\u3088\u3046\u306b\u3001Flask \u306e\u300c\u30de\u30a4\u30af\u30ed\u300d\u306a\u6027\u8cea\u306f\u3001\u672c\u683c\u7684\u306a\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3042\u308b Django \u3068\u6bd4\u8f03\u3059\u308b\u3068\u3001\u3059\u3050\u306b\u4f7f\u3048\u308b\u6a5f\u80fd\u304c\u5c11\u306a\u3044\u3053\u3068\u3092\u610f\u5473\u3057\u307e\u3059\u3002\u305f\u3060\u3057\u3001\u8981\u4ef6\u306b\u5fdc\u3058\u3066\u3055\u307e\u3056\u307e\u306a\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u4f7f\u7528\u3057\u3066\u62e1\u5f35\u3067\u304d\u307e\u3059\u3002<\/p>\n<h2>Flask\u306e\u5c06\u6765\u5c55\u671b<\/h2>\n<p>Flask \u306f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066\u3001\u305d\u306e\u30b7\u30f3\u30d7\u30eb\u3055\u3001\u67d4\u8edf\u6027\u3001\u30b9\u30b1\u30fc\u30e9\u30d3\u30ea\u30c6\u30a3\u306b\u3088\u308a\u4eba\u6c17\u304c\u9ad8\u307e\u308a\u7d9a\u3051\u3066\u3044\u307e\u3059\u3002\u30de\u30a4\u30af\u30ed\u30b5\u30fc\u30d3\u30b9 \u30a2\u30fc\u30ad\u30c6\u30af\u30c1\u30e3\u3092\u63a1\u7528\u3059\u308b\u958b\u767a\u8005\u304c\u5897\u3048\u308b\u306b\u3064\u308c\u3001Flask \u306f Docker \u3084 Kubernetes \u3068\u306e\u4e92\u63db\u6027\u306b\u3088\u308a\u3001\u3053\u306e\u3088\u3046\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u958b\u767a\u306b\u304a\u3044\u3066\u5927\u304d\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30c7\u30fc\u30bf\u30b5\u30a4\u30a8\u30f3\u30b9\u3084\u6a5f\u68b0\u5b66\u7fd2\u306e\u5206\u91ce\u3067 Python \u306e\u4eba\u6c17\u304c\u9ad8\u307e\u308b\u306b\u3064\u308c\u3066\u3001Flask \u306f\u6a5f\u68b0\u5b66\u7fd2\u30e2\u30c7\u30eb\u7528\u306e API \u3092\u4f5c\u6210\u3059\u308b\u305f\u3081\u306e\u30b7\u30f3\u30d7\u30eb\u3067\u52b9\u7387\u7684\u306a\u65b9\u6cd5\u3092\u63d0\u4f9b\u3059\u308b\u305f\u3081\u3001\u8fd1\u3044\u5c06\u6765\u306b\u9069\u5207\u306a\u9078\u629e\u80a2\u3068\u306a\u308a\u307e\u3059\u3002<\/p>\n<h2>\u30d7\u30ed\u30ad\u30b7\u30b5\u30fc\u30d0\u30fc\u3068Flask<\/h2>\n<p>\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u3001Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3067\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3057\u307e\u3059\u3002\u305f\u3068\u3048\u3070\u3001Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u7279\u5b9a\u306e\u5730\u7406\u7684\u306a\u5834\u6240\u3092\u7d4c\u7531\u3057\u3066\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3059\u308b\u5834\u5408\u306f\u3001\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u3092\u4f7f\u7528\u3067\u304d\u307e\u3059\u3002\u3053\u308c\u306f\u3001\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u4e16\u754c\u306e\u3055\u307e\u3056\u307e\u306a\u5834\u6240\u304b\u3089\u306e\u30ea\u30af\u30a8\u30b9\u30c8\u306b\u3069\u306e\u3088\u3046\u306b\u5fdc\u7b54\u3059\u308b\u304b\u3092\u30c6\u30b9\u30c8\u3059\u308b\u306e\u306b\u5f79\u7acb\u3061\u307e\u3059\u3002<\/p>\n<p>\u3055\u3089\u306b\u3001\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f Flask \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u306e\u5c64\u3092\u8ffd\u52a0\u3067\u304d\u307e\u3059\u3002\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u30b5\u30fc\u30d0\u30fc\u306e ID \u3092\u96a0\u3059\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u653b\u6483\u8005\u304c\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u76f4\u63a5\u653b\u6483\u3059\u308b\u3053\u3068\u304c\u96e3\u3057\u304f\u306a\u308a\u307e\u3059\u3002\u30d7\u30ed\u30ad\u30b7 \u30b5\u30fc\u30d0\u30fc\u306f\u8ca0\u8377\u5206\u6563\u306b\u3082\u5f79\u7acb\u3061\u3001\u8907\u6570\u306e\u30b5\u30fc\u30d0\u30fc\u9593\u3067\u30c8\u30e9\u30d5\u30a3\u30c3\u30af\u3092\u5206\u6563\u3059\u308b\u3053\u3068\u3067\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\u3002<\/p>\n<h2>\u95a2\u9023\u30ea\u30f3\u30af<\/h2>\n<ol>\n<li><a href=\"https:\/\/flask.palletsprojects.com\/\" target=\"_new\" rel=\"noopener nofollow\">Flask \u516c\u5f0f\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a><\/li>\n<li><a href=\"http:\/\/flask.pocoo.org\/extensions\/\" target=\"_new\" rel=\"noopener nofollow\">\u30d5\u30e9\u30b9\u30b3\u62e1\u5f35<\/a><\/li>\n<li><a href=\"https:\/\/realpython.com\/tutorials\/flask\/\" target=\"_new\" rel=\"noopener nofollow\">Python \u306b\u3088\u308b Flask Web \u958b\u767a\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a><\/li>\n<li><a href=\"https:\/\/blog.miguelgrinberg.com\/post\/the-flask-mega-tutorial-part-i-hello-world\" target=\"_new\" rel=\"noopener nofollow\">Miguel Grinberg \u306b\u3088\u308b Flask \u30e1\u30ac\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a><\/li>\n<\/ol>","protected":false},"featured_media":468419,"menu_order":0,"template":"","meta":{"_acf_changed":false,"content-type":"","inline_featured_image":false,"footnotes":""},"class_list":["post-477257","wiki","type-wiki","status-publish","has-post-thumbnail","hentry"],"acf":{"faq_title":"Frequently Asked Questions about <mark>Flask: A Lightweight Framework for Web Development<\/mark>","faq_items":[{"question":"What is Flask?","answer":"<p>Flask is a micro web framework written in Python. It's often described as a \"micro\" framework because it doesn't include certain features commonly found in full-fledged web frameworks, such as form validation or database abstraction. However, Flask provides the basic structures required to build a website and is highly extensible.<\/p>"},{"question":"Who is the creator of Flask?","answer":"<p>Flask was created by Armin Ronacher, an active member of the Pocoo team, a group of international Python enthusiasts.<\/p>"},{"question":"What is Flask used for?","answer":"<p>Flask can be used for various web development tasks ranging from creating simple static websites to building complex, data-driven web applications or APIs.<\/p>"},{"question":"What are the key features of Flask?","answer":"<p>Some key features of Flask include its simplicity, flexibility, fine-grained control, HTTP request handling, URL routing, and Jinja2 template engine.<\/p>"},{"question":"How does Flask work?","answer":"<p>In a typical Flask application, the flow starts with a client sending a request to the server where the Flask application is running. The application then processes the request and returns a response back to the client. Flask uses routing to determine what logic to execute based on the URL of the request.<\/p>"},{"question":"How do proxy servers interact with Flask?","answer":"<p>Proxy servers can add an additional layer of security to your Flask applications. They can hide the identity of your server, making it harder for attackers to target your application directly. Proxy servers can also help in load balancing, improving your application's performance by distributing the traffic among multiple servers.<\/p>"},{"question":"What is the future of Flask?","answer":"<p>Flask, as a framework, is continuing to grow in popularity due to its simplicity, flexibility, and scalability. It is especially relevant in the development of microservices and providing APIs for machine learning models.<\/p>"},{"question":"How does Flask compare to other similar frameworks?","answer":"<p>While Flask comes with fewer features out of the box compared to Django, a full-fledged framework, it is more lightweight and can be extended with various plugins as per the requirements. On the other hand, Express.js, a JavaScript web framework, is more comparable to Flask in terms of flexibility and extensibility.<\/p>"},{"question":"Where can I learn more about Flask?","answer":"<p>You can learn more about Flask from the <a href=\"https:\/\/flask.palletsprojects.com\/\" target=\"_new\">official Flask documentation<\/a> and various tutorials such as <a href=\"https:\/\/realpython.com\/tutorials\/flask\/\" target=\"_new\">Flask Web Development with Python Tutorial<\/a> and <a href=\"https:\/\/blog.miguelgrinberg.com\/post\/the-flask-mega-tutorial-part-i-hello-world\" target=\"_new\">Flask Mega-Tutorial by Miguel Grinberg<\/a>.<\/p>"}]},"_links":{"self":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/477257","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki"}],"about":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/types\/wiki"}],"version-history":[{"count":0,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/wiki\/477257\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media\/468419"}],"wp:attachment":[{"href":"https:\/\/oneproxy.pro\/jp\/wp-json\/wp\/v2\/media?parent=477257"}],"curies":[{"name":"\u3046\u30fc\u3093","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}