{"id":18094,"date":"2016-02-09T08:00:04","date_gmt":"2016-02-08T23:00:04","guid":{"rendered":"http:\/\/www.sssg.org\/blogs\/hiro345\/?p=18094"},"modified":"2016-03-20T08:06:14","modified_gmt":"2016-03-19T23:06:14","slug":"python%e3%81%a7web%e3%82%a2%e3%83%97%e3%83%aa%e3%82%92%e7%b0%a1%e5%8d%98%e3%81%ab%e4%bd%9c%e6%88%90%e3%81%99%e3%82%8b%e3%81%ab%e3%81%afbottle%e3%81%8c%e4%bd%bf%e3%81%88%e3%82%8b","status":"publish","type":"post","link":"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/18094.html","title":{"rendered":"Python\u3067Web\u30a2\u30d7\u30ea\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3059\u308b\u306b\u306fBottle\u304c\u4f7f\u3048\u308b"},"content":{"rendered":"<p>Python\u3067Web\u30a2\u30d7\u30ea\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3059\u308b\u306b\u306fBottle(<a href=\"https:\/\/github.com\/bottlepy\/bottle\">GitHub &#8211; bottlepy\/bottle: bottle.py is a fast and simple micro-framework for python web-applications.<\/a>, MIT License)\u304c\u4f7f\u3048\u307e\u3059\u3002\u5c11\u3057\u78ba\u8a8d\u3057\u3066\u307f\u305f\u3068\u3053\u308d\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u304c\u3042\u3063\u305f\u308a\u3001RDB\u3082\u4f7f\u3048\u305f\u308a\u3068\u3001\u5145\u5b9f\u3057\u3066\u3044\u307e\u3059\u3002\u500b\u4eba\u304c\u8da3\u5473\u3067\u81ea\u5b85\u5185\u3067\u7a3c\u50cd\u3055\u305b\u308b\u3061\u3087\u3063\u3068\u3057\u305fWeb\u30a2\u30d7\u30ea\u3060\u3063\u305f\u3089\u3001\u6a5f\u80fd\u3082\u5341\u5206\u3067\u624b\u8efd\u306b\u4f7f\u3048\u307e\u3059\u3002\u5099\u5fd8\u9332\u3067\u30ea\u30f3\u30af\u3092\u8a18\u9332\u3057\u3066\u304a\u304d\u307e\u3059\u3002<br \/>\n<!--more--><br \/>\n\u300c<a href=\"http:\/\/bottlepy.org\/docs\/stable\/\">Bottle: Python Web Framework \u2014 Bottle 0.12.9 documentation<\/a>\u300d\u306b\u8aac\u660e\u304c\u3042\u308a\u307e\u3059\u3002\u7279\u9577\u306f\u4e0b\u8a18\u3060\u3068\u306e\u3053\u3068\u3002<\/p>\n<ul>\n<li>Routing: Requests to function-call mapping with support for clean and dynamic URLs.<\/li>\n<li>Templates: Fast and pythonic built-in template engine and support for mako, jinja2 and cheetah templates.<\/li>\n<li>Utilities: Convenient access to form data, file uploads, cookies, headers and other HTTP-related metadata.<\/li>\n<li>Server: Built-in HTTP development server and support for paste, fapws3, bjoern, Google App Engine, cherrypy or any other WSGI capable HTTP server.<\/li>\n<\/ul>\n<p>\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3001\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3001\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u3001\u30b5\u30fc\u30d0\u9023\u643a\u306b\u3064\u3044\u3066\u8a18\u8f09\u3055\u308c\u3066\u3044\u307e\u3059\u3002\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306b\u3064\u3044\u3066\u306f\u3001\u4eba\u6c17\u306emako\u3001jinja2\u3092\u30b5\u30dd\u30fc\u30c8\u3057\u3066\u3044\u308b\u3068\u306e\u3053\u3068\u3002\u30b5\u30fc\u30d0\u9023\u643a\u306b\u3064\u3044\u3066\u306f\u3001Google App Engine\u3067\u52d5\u304f\u306e\u3067\u3059\u306d\u3002WSGI\u30d9\u30fc\u30b9\u306a\u306e\u3067\u9023\u643a\u3059\u308bHTTP\u30b5\u30fc\u30d0\u30fc\u304c\u591a\u3044\u306e\u306f\u3042\u308a\u304c\u305f\u3044\u3053\u3068\u3067\u3059\u3002<\/p>\n<p>\u6c17\u306b\u306a\u308bPython\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f\u3001\u300cBottle runs with Python 2.5+ and 3.x.\u300d\u3068\u3044\u3046\u3053\u3068\u306a\u306e\u3067\u3001Python 2.7\u3084Python 3.4\u3067\u52d5\u4f5c\u3057\u307e\u3059\u3002\u7d20\u6674\u3089\u3057\u3044\u3067\u3059\u306d\u3002<\/p>\n<p><strong>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9<\/strong><br \/>\n\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"http:\/\/bottlepy.org\/docs\/0.12\/plugins\/index.html\">List of available Plugins \u2014 Bottle 0.12.9 documentation<\/a>\u300d\u3092\u898b\u305f\u3068\u3053\u308d\u3001\u30d7\u30e9\u30b0\u30a4\u30f3\u306b\u300c<a href=\"https:\/\/pypi.python.org\/pypi\/bottle-sqlite\/\">bottle-sqlite 0.1.2 : Python Package Index<\/a>\u300d\u304c\u3042\u308a\u307e\u3057\u305f\u3002\u7528\u9014\u3068\u3057\u3066\u306f\u3001\u8efd\u91cf\u306aWeb\u30a2\u30d7\u30ea\u4f5c\u6210\u306b\u4f7f\u304a\u3046\u3068\u601d\u3063\u3066\u3044\u305f\u306e\u3067\u3001\u3053\u308c\u304c\u4f7f\u3048\u308c\u3070\u5341\u5206\u3067\u3059\u3002<\/p>\n<p><strong>\u30d5\u30a9\u30fc\u30e0<\/strong><br \/>\n\u30d5\u30a9\u30fc\u30e0\u306b\u3064\u3044\u3066\u306f\u300c<a href=\"https:\/\/github.com\/wtforms\/wtforms\">GitHub &#8211; wtforms\/wtforms: A flexible forms validation and rendering library for Python.<\/a>\u300d\u3042\u305f\u308a\u3092\u9023\u643a\u3055\u305b\u305f\u3044\u3068\u601d\u3046\u4eba\u304c\u3044\u308b\u3067\u3057\u3087\u3046\u3002\u300c<a href=\"http:\/\/bottlepy.org\/docs\/0.12\/tutorial.html\">Tutorial \u2014 Bottle 0.12.9 documentation<\/a>\u300d\u306b\u3088\u308b\u3068\u3001\u3053\u308c\u3092\u4f7f\u3046\u3068\u304d\u306b\u3001FormsDict.decode() \u3092\u4f7f\u3063\u3066\u6587\u5b57\u30b3\u30fc\u30c9\u3092\u610f\u8b58\u3057\u305f\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0\u304c\u5fc5\u8981\u3060\u3068\u306e\u3053\u3068\u3002<\/p>\n<p><strong>Bottle Utils<\/strong><br \/>\n\u300c<a href=\"http:\/\/outernet-project.github.io\/bottle-utils\/\">Bottle Utils documentation \u2014 Bottle Utils 0.3 documentation<\/a>\u300d\u3068\u3044\u3046\u306e\u3082\u3042\u3063\u3066\u3001\u4fbf\u5229\u306a\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002CSRF\u5bfe\u7b56\u7528\u306e\u300c<a href=\"http:\/\/outernet-project.github.io\/bottle-utils\/csrf.html\">CSRF protection (bottle_utils.csrf) \u2014 Bottle Utils 0.3 documentation<\/a>\u300d\u3082\u3042\u308a\u307e\u3059\u306d\u3002<\/p>\n<p>Python\u306eWeb\u30a2\u30d7\u30ea\u3068\u3044\u3063\u305f\u3068\u304d\u306b\u306fFlask(<a href=\"http:\/\/flask.pocoo.org\/\">Welcome | Flask (A Python Microframework) <\/a> \u3067\u516c\u958b\u3055\u308c\u3066\u3044\u308bBSD\u30e9\u30a4\u30bb\u30f3\u30b9\u30d9\u30fc\u30b9\u306eFlask\u30e9\u30a4\u30bb\u30f3\u30b9)\u306e\u65b9\u304c\u4eba\u6c17\u306a\u306e\u3067\u3057\u3087\u3046\u304b\u3002Bottle\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u308b\u66f8\u7c4d\u306fPython\u30a8\u30f3\u30b8\u30cb\u30a2\u990a\u6210\u8aad\u672c\u3050\u3089\u3044\u3057\u304b\u306a\u3044\u306e\u304b\u306a&#8230; Flask\u306e\u89e3\u8aac\u672c\u3082\u591a\u304f\u306f\u306a\u3044\u306e\u3067\u3059\u304c\u3001Bottle\u306e\u3082\u306e\u3088\u308a\u306f\u591a\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<div>\n<iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=4774173207&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00ZJNH0G0&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00XZTYMG6&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00K00W9LI&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00YSILM8O&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><iframe loading=\"lazy\" style=\"width: 120px; height: 240px;\" src=\"\/\/rcm-jp.amazon.co.jp\/e\/cm?t=hiro345-22&amp;o=9&amp;p=8&amp;l=as1&amp;asins=B00ESX15VS&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr\" height=\"240\" width=\"320\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div>\n<ul>\n<li><a type=\"amzn\" asin=\"4774173207\">Python\u30a8\u30f3\u30b8\u30cb\u30a2\u990a\u6210\u8aad\u672c\uff3b\u3044\u307e\u3069\u304d\u306e\u958b\u767a\u30ce\u30a6\u30cf\u30a6\u6e80\u8f09\uff01\uff3d (Software Design plus) <\/a><\/li>\n<li><a type=\"amzn\" asin=\"B00ZJNH0G0\">Web Scraping with Python: Collecting Data from the Modern Web <\/a><\/li>\n<li><a type=\"amzn\" asin=\"B00XZTYMG6\">Python\u30d7\u30ed\u30d5\u30a7\u30c3\u30b7\u30e7\u30ca\u30eb\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0 \u7b2c2\u7248 <\/a><\/li>\n<li><a type=\"amzn\" asin=\"B00K00W9LI\">Flask Web Development: Developing Web Applications with Python <\/a><\/li>\n<li><a type=\"amzn\" asin=\"B00YSILM8O\">Learning Flask Framework <\/a><\/li>\n<li><a type=\"amzn\" asin=\"B00ESX15VS\">Instant Flask Web Development <\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Python\u3067Web\u30a2\u30d7\u30ea\u3092\u7c21\u5358\u306b\u4f5c\u6210\u3059\u308b\u306b\u306fBottle(GitHub &#8211; bottlepy\/bottle: bottle.py is a fast and simple micro-framework f &hellip; <a href=\"https:\/\/www.hiro345.net\/blogs\/hiro345\/archives\/18094.html\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[1204,60],"class_list":["post-18094","post","type-post","status-publish","format-standard","hentry","category-general","tag-bottle","tag-python"],"_links":{"self":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/18094","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/comments?post=18094"}],"version-history":[{"count":3,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/18094\/revisions"}],"predecessor-version":[{"id":18212,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/posts\/18094\/revisions\/18212"}],"wp:attachment":[{"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/media?parent=18094"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/categories?post=18094"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hiro345.net\/blogs\/hiro345\/wp-json\/wp\/v2\/tags?post=18094"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}