{"id":9883,"date":"2017-05-25T17:44:09","date_gmt":"2017-05-25T08:44:09","guid":{"rendered":"http:\/\/sitest.jp\/blog\/?p=9883"},"modified":"2017-05-25T17:44:37","modified_gmt":"2017-05-25T08:44:37","slug":"python-%e3%81%aeweb%e3%82%a2%e3%83%97%e3%83%aa%e3%83%95%e3%83%ac%e3%83%bc%e3%83%a0%e3%83%af%e3%83%bc%e3%82%af-flask-%e3%81%a7%e3%81%8a%e6%89%8b%e8%bb%bd-webapi-%e6%a7%8b%e7%af%89%e5%89%8d%e7%b7%a8","status":"publish","type":"post","link":"https:\/\/sitest.jp\/blog\/?p=9883","title":{"rendered":"Python \u306eWeb\u30a2\u30d7\u30ea\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af Flask \u3067\u304a\u624b\u8efd WebAPI \u69cb\u7bc9(\u524d\u7de8)"},"content":{"rendered":"<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\nWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3082 Python \u3067!<br \/>\n<\/h3>\n<\/div>\n<p>\u73fe\u5728 Python \u306f\u4e3b\u306b\u30c7\u30fc\u30bf\u89e3\u6790\u3001\u6a5f\u68b0\u5b66\u7fd2\u306e\u7528\u9014\u3067\u5927\u5909\u306a\u4eba\u6c17\u3067\u3059\u3002<\/p>\n<p>Python \u3067\u4f5c\u3089\u308c\u305f\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u308b\u6a5f\u68b0\u5b66\u7fd2\u3084\u30c7\u30fc\u30bf\u89e3\u6790\u3067\u826f\u3044\u7d50\u679c\u304c\u3067\u305f\u5834\u5408\u3001\u6b21\u306b\u3084\u308b\u3079\u304d\u3053\u3068\u306f\u300c\u305d\u306e\u6210\u679c\u3092\u5e83\u304f\u516c\u958b\u3059\u308b\u300d\u3067\u3059\u306d\u3002\u516c\u958b\u3059\u308b\u306a\u3089\u305d\u308c\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u4e00\u756a\u3067\u3059\uff01<\/p>\n<p><!--more--><\/p>\n<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3068\u3044\u3048\u3070\u3001Ruby \u3084\u3001PHP \u3067\u4f5c\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u304c\u3001\u305d\u308c\u3082 Python \u3067\u3067\u304d\u305f\u3089\u7d20\u6575\u3067\u3059\u306d\uff01\u3082\u3061\u308d\u3093\u53ef\u80fd\u3067\u3059\u3002Python<br \/>\n \u81ea\u4f53\u306f\u30c7\u30fc\u30bf\u5206\u6790\u3001\u6a5f\u68b0\u5b66\u7fd2\u306b\u7279\u5316\u3057\u305f\u8a00\u8a9e\u3067\u306f\u306a\u304f\u3001\u6c4e\u7528\u7684\u306a\u8a00\u8a9e\u3067\u3042\u308b\u305f\u3081\u3001\u4f8b\u3048\u3070\u3001Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u52d5\u304b\u3059\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u305d\u3093\u306a\u8a00\u8a9e\u3067\u3059\u304b\u3089\u3001\u5f53\u7136 Ruby \u306b <a href=\"http:\/\/rubyonrails.org\/\" target=\"_blank\" rel=\"nofollow\">Rails<\/a>\u3084 <a href=\"http:\/\/www.sinatrarb.com\/\" target=\"_blank\" rel=\"nofollow\">Sinatra<\/a>\u304c\u3042\u3063\u305f\u308a\u3001PHP \u306b <a href=\"http:\/\/laravel.jp\/\" target=\"_blank\" rel=\"nofollow\">Laravel<\/a> \u3084 <a href=\"http:\/\/codeigniter.jp\/\" target=\"_blank\" rel=\"nofollow\">CodeIgniter<\/a> \u304c\u3042\u3063\u305f\u308a\u3059\u308b\u3088\u3046\u306b\u3001 Python \u306b\u3082Web\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u304c\u3042\u308a\u307e\u3059\u3002<a href=\"https:\/\/www.djangoproject.com\/\" target=\"_blank\" rel=\"nofollow\" target=\"_blank\" rel=\"nofollow\">django<\/a>\u3084\u3001<a href=\"http:\/\/flask.pocoo.org\/\"> Flask <\/a>\u306a\u3069\u304c\u6709\u540d\u3067\u3059\u3002<\/p>\n<p>Django \u306f Rails \u306e\u3088\u3046\u306a\u30d5\u30eb\u30b9\u30bf\u30c3\u30af\u3068\u547c\u3070\u308c\u308b\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3001\u4eca\u56de\u3054\u7d39\u4ecb\u3059\u308b Flask \u306f Sinatra \u306e\u3088\u3046\u306b\u3001\u6700\u4f4e\u9650\u306e\u6a5f\u80fd\u3060\u3051\u3092\u5b9f\u88c5\u3057\u305f\u30de\u30a4\u30af\u30ed\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002<\/p>\n<div class=\"frame_headding\">\n<h3 style=\"text-align: left;\">\n\u30de\u30a4\u30af\u30ed\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af<br \/>\n<\/h3>\n<\/div>\n<p>\u6570\u5e74\u524d\u3001Web\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f Rail \u306b\u4ee3\u8868\u3055\u308c\u308b\u3088\u3046\u306b MVC\u30e2\u30c7\u30eb\u3092\u63a1\u7528\u3057\u3001\u7d71\u4e00\u3055\u308c\u305f\u30eb\u30fc\u30eb\u306b\u57fa\u3065\u3044\u3066\u4f5c\u6210\u3092\u884c\u3048\u3070\u3001\u3042\u308b\u7a0b\u5ea6\u306e\u898f\u6a21\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u304c\u6bd4\u8f03\u7684\u7c21\u5358\u306b\u4f5c\u308c\u308b\u3002\u3068\u3044\u3046\u3082\u306e\u304c\u4e3b\u6d41\u3067\u3057\u305f\u3002<\/p>\n<p>\u4eca\u73fe\u5728\u306f\u3001JS\u30d5\u30ed\u30f3\u30c8\u30a8\u30f3\u30c9\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306e\u5145\u5b9f\u306b\u3088\u308a\u3001\u30b5\u30fc\u30d0\u304c HTML \u306e\u3088\u3046\u306a\u30d3\u30e5\u30fc\u3067\u306f\u306a\u304f\u3001JSON \u5f62\u5f0f\u3092\u8fd4\u3057\u3055\u3048\u3059\u308c\u3070\u3001\u30d5\u30ed\u30f3\u30c8\u5074\u3067\u63cf\u753b\u3092\u884c\u3046\u3053\u3068\u304c\u4ee5\u524d\u3088\u308a\u5bb9\u6613\u306b\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u307e\u305f\u3001\u30c7\u30fc\u30bf\u5074\u3082\u3001\u5fc5\u305a\u3057\u3082 RDB \u3068\u306f\u9650\u3089\u306a\u3044\u3053\u3068\u304c\u591a\u304f\u306a\u308a\u307e\u3057\u305f\u3002<\/p>\n<p>\u3053\u3046\u3044\u3063\u305f\u72b6\u6cc1\u306e\u5909\u5316\u306b\u3088\u3063\u3066\u3001\u5145\u5b9f\u3057\u305f\u6a5f\u80fd\u3092\u3082\u3063\u305fMVC\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f ActiveRecord \u306e\u3088\u3046\u306a\u6a5f\u80fd\u306e\u5145\u5b9f\u3084\u3001\u53b3\u5bc6\u306a\u30eb\u30fc\u30eb\u304c\u304b\u3048\u3063\u3066\u4ec7\u306b\u306a\u308a\u3001\u4f7f\u3044\u3065\u3089\u3044\u3082\u306e\u306b\u306a\u3063\u305f\u3088\u3046\u306b\u601d\u3044\u307e\u3059\u3002<\/p>\n<p>\u5bfe\u3057\u3066\u3001\u30de\u30a4\u30af\u30ed\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u306f\u3001\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u53d7\u4fe1\u3057\u3001\u7279\u5b9a\u306e\u30ed\u30b8\u30c3\u30af\u306b\u7d50\u3073\u3064\u3051\u308b\u3001MVC\u3067\u3044\u3046 Controller \u306e\u6a5f\u80fd\u306b\u7279\u5316\u3057\u305f\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3067\u3059\u3002<\/p>\n<p>\u305d\u3053\u4ee5\u5916\u306f\u81ea\u7531\u306b\u8a2d\u5b9a\u3067\u304d\u308b\u306e\u3067\u3001\u4f8b\u3048\u3070\u3001\u30e2\u30c7\u30eb\u90e8\u5206\u306a\u3089 NoSQL \u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u7279\u5316\u3057\u305f\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u5b9f\u88c5\u3057\u305f\u308a\u3001 RDB \u306a\u3089\u3001 <a href=\"https:\/\/www.sqlalchemy.org\/\" target=\"_blank\" rel=\"nofollow\">SQLALchemy<\/a> \u306e\u3088\u3046\u306a\u5c02\u7528\u306eOR\u30de\u30c3\u30d1\u3092\u4f7f\u3046\u306a\u3069\u3001\u67d4\u8edf\u306a\u69cb\u6210\u304c\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<p>\u30d3\u30e5\u30fc\u3082\u540c\u69d8\u306b\u3001\u30e2\u30c0\u30f3\u306aJS\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u4f7f\u3063\u3066\u3001\u30af\u30e9\u30a4\u30a2\u30f3\u30c8\u306b\u30d3\u30e5\u30fc\u306e\u5207\u66ff\u3092\u4efb\u305b\u3001\u30b5\u30fc\u30d0\u306f JSON \u3092\u8fd4\u3059\u3088\u3046\u306a\u30b7\u30f3\u30d7\u30eb\u306a WebAPI \u3082\u53ef\u80fd\u3067\u3059\u3057\u3001 Flask \u306b\u306f\u4ed8\u5c5e\u3068\u3057\u3066 <a href=\"http:\/\/jinja.pocoo.org\/docs\/2.9\/\" target=\"_blank\" rel=\"nofollow\">jinja2<\/a> \u3068\u3044\u3046 HTML \u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u304c\u3064\u3044\u3066\u3044\u308b\u306e\u3067\u3001\u305d\u308c\u3092\u4f7f\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u6b21\u56de\u306f\u3001 flask \u3092\u4f7f\u3063\u3066\u7c21\u5358\u306a\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u307f\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Web\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3082 Python \u3067! \u73fe\u5728 Python \u306f\u4e3b\u306b\u30c7\u30fc\u30bf\u89e3\u6790\u3001\u6a5f\u68b0\u5b66\u7fd2\u306e\u7528\u9014\u3067\u5927\u5909\u306a\u4eba\u6c17\u3067\u3059\u3002 Python \u3067\u4f5c\u3089\u308c\u305f\u30b7\u30b9\u30c6\u30e0\u306b\u3088\u308b\u6a5f\u68b0\u5b66\u7fd2\u3084\u30c7\u30fc\u30bf\u89e3\u6790\u3067\u826f\u3044\u7d50\u679c\u304c\u3067\u305f\u5834\u5408\u3001\u6b21\u306b\u3084\u308b\u3079\u304d\u3053\u3068\u306f\u300c\u305d\u306e\u6210\u679c\u3092\u5e83\u304f\u516c\u958b\u3059\u308b\u300d\u3067\u3059\u306d\u3002\u516c\u958b\u3059\u308b\u306a\u3089\u305d\u308c\u3092\u4f7f\u3063\u305fWeb\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u4f5c\u3063\u3066\u3057\u307e\u3046\u306e\u304c\u4e00\u756a\u3067\u3059\uff01<\/p>\n","protected":false},"author":1,"featured_media":9886,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[27,49],"tags":[],"acf":false,"_links":{"self":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/9883"}],"collection":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/comments?post=9883"}],"version-history":[{"count":8,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/9883\/revisions"}],"predecessor-version":[{"id":10630,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/posts\/9883\/revisions\/10630"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media\/9886"}],"wp:attachment":[{"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/media?parent=9883"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/categories?post=9883"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sitest.jp\/blog\/wp-json\/wp\/v2\/tags?post=9883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}