{"id":1228,"date":"2013-01-21T16:12:11","date_gmt":"2013-01-21T07:12:11","guid":{"rendered":"http:\/\/fry.no.coocan.jp\/WordPress\/?p=1228"},"modified":"2013-01-21T16:12:11","modified_gmt":"2013-01-21T07:12:11","slug":"google-app-engine%e3%81%a8%e3%81%af","status":"publish","type":"post","link":"http:\/\/fry.no.coocan.jp\/WordPress\/?p=1228","title":{"rendered":"Google App Engine\u3068\u306f"},"content":{"rendered":"<p>App Engine\u3068\u3044\u3046\u30cd\u30fc\u30df\u30f3\u30b0\u304c\u672c\u8cea\u3092\u5206\u308a\u306b\u304f\u304f\u3057\u3066\u3044\u307e\u3059\u3002\u5206\u308a\u6613\u3044\u540d\u524d\u306b\u5909\u3048\u308b\u3068\u300cGoogle \u30a2\u30d7\u30ea\u5e83\u5834\u300d\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u8ab0\u3067\u3082Google\u306e\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u3001\u81ea\u5206\u306e\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a2\u30d7\u30ea\u306f\u30a2\u30d7\u30ea\u540d\u3067\u8b58\u5225\u3055\u308c\u3001\u30a2\u30d7\u30ea\u540d\u3054\u3068\u306bURL\u3092\u53d6\u5f97\u3067\u304d\u307e\u3059\u3002\u305d\u306e\u305f\u3081\u3001\u30a2\u30d7\u30ea\u540d\u306f\u65e2\u306b\u516c\u958b\u3055\u308c\u3066\u3044\u308b\u30a2\u30d7\u30ea\u3068\u7570\u306a\u3063\u3066\u3044\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<br \/>\n\u00a0<br \/>\n\u30a2\u30d7\u30ea\u306e\u69cb\u6210\uff1a<br \/>\n\u30a2\u30d7\u30ea\u306fPython\u307e\u305f\u306fJava\u3067\u66f8\u304d\u3001\u30a2\u30d7\u30ea\u540d\u306e\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u6b21\u306e\u3088\u3046\u306b\u683c\u7d0d\u3057\u3066\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u307e\u3059\u3002<br \/>\n\u00a0<a href=\"http:\/\/fry.no.coocan.jp\/WordPress\/wp-content\/uploads\/2013\/01\/python.png\"><img loading=\"lazy\" class=\"alignnone size-medium wp-image-1229\" title=\"python\" src=\"http:\/\/fry.no.coocan.jp\/WordPress\/wp-content\/uploads\/2013\/01\/python-300x248.png\" alt=\"\" width=\"300\" height=\"248\" srcset=\"http:\/\/fry.no.coocan.jp\/WordPress\/wp-content\/uploads\/2013\/01\/python-300x248.png 300w, http:\/\/fry.no.coocan.jp\/WordPress\/wp-content\/uploads\/2013\/01\/python.png 305w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\n\u56f3\u306e\uff5e.py\u304cPython\u306e\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3001app.ampl\u304c\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb\u3067\u3059\u3002\u56f3\u306e\u69d8\u306b\u3001app.yaml\u30d5\u30a1\u30a4\u30eb\u5185\u3067\u30a2\u30d7\u30ea\u540d\u3068\u30d7\u30ed\u30b0\u30e9\u30e0\u540d\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002\u30d5\u30a9\u30eb\u30c0\u30fc\u540d\u306fapp.yaml\u30d5\u30a1\u30a4\u30eb\u3067\u6307\u5b9a\u3059\u308b\u30a2\u30d7\u30ea\u540d\u3068\u540c\u3058\u306b\u3057\u307e\u3059\u3002<br \/>\n\u00a0<br \/>\n\u30a2\u30d7\u30ea\u306e\u5236\u4f5c\uff1a<br \/>\n\u30a2\u30d7\u30ea\u306f\u3001\u5404\u81ea\u306e\uff30\uff23\u3067\u884c\u3044\u307e\u3059\u3002Google\u306fSDK(\u30bd\u30d5\u30c8\u958b\u767a\u30ad\u30c3\u30c8)\u3068\u3044\u3046\u30a2\u30d7\u30ea\u958b\u767a\u74b0\u5883\u3092\u7528\u610f\u3057\u3066\u304a\u308a\u3001\u30e6\u30fc\u30b6\u306f\u3001\u3053\u308c\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u4f7f\u3044\u307e\u3059\u3002SDK\u306b\u306f\u6b21\u306e\u6a5f\u80fd\u304c\u7528\u610f\u3055\u308c\u3066\u3044\u307e\u3059\u3002<br \/>\n\uff0a\u4f5c\u6210\u3057\u305f\u30a2\u30d7\u30ea\u3092\u5404\u81ea\u306e\uff30\uff23\u3067\u52d5\u4f5c\u78ba\u8a8d\u3059\u308b\u30a8\u30df\u30e5\u30ec\u30fc\u30bf<br \/>\n\uff0a\u30a2\u30d7\u30ea\u306bGoogle\u306e\u6a5f\u80fd\u3092\u7d44\u307f\u8fbc\u3080\u4ed5\u639b\u3051<br \/>\n\uff0a\u30a2\u30d7\u30ea\u3092\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3059\u308b\u30a4\u30f3\u30bf\u30d5\u30a7\u30fc\u30b9\uff08Lancher\uff09<br \/>\n\u00a0<br \/>\n\u958b\u767a\u624b\u9806\u3067\u3044\u3046\u3068\uff1a<br \/>\nstep1\uff1aPython\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\nstep2\uff1aSDK\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\nstep3\uff1a\u30a2\u30d7\u30ea\u958b\u767a<br \/>\nstep4\uff1a\u81ea\u5206\u306ePC\u3067\u52d5\u4f5c\u78ba\u8a8d<br \/>\nstep5\uff1a\u30a2\u30d7\u30ea\u306e\u516c\u958b\uff08\u30c7\u30d7\u30ed\u30a4\uff09<br \/>\n\u3067\u3059\u3002<br \/>\n\u00a0<br \/>\n\uff1d\uff1d<\/p>\n<p>\u300cC++\u306e\u30af\u30e9\u30b9\u300d\u3067\u5927\u5b66\u3067\u306e\u5b66\u7fd2\u306f\u7d42\u4e86\u3057\u305f\u3001\u3068\u601d\u3063\u3066\u3044\u307e\u3057\u305f\u304c\u6700\u5f8c\u306e\u6700\u5f8c\u3055\u3089\u306bGoogle App Engine\u3068\u3044\u3046\u8a71\u304c\u98db\u3073\u8fbc\u3093\u3067\u304d\u307e\u3057\u305f\u3002\u5f53\u7136\u3001\u79c1\u306f\u77e5\u3063\u3066\u3044\u306a\u304f\u3066\u306f\u3044\u3051\u306a\u3044\u30b5\u30fc\u30d3\u30b9\u3067\u3057\u305f\u3002\u79c1\u304c\u5229\u7528\u3057\u3066\u3044\u308b\u30af\u30e9\u30a6\u30c9\u306f\u3001\u3053\u306e\u30b5\u30a4\u30c8\u7528\u306e\u30ec\u30f3\u30bf\u30eb\u30b5\u30fc\u30d0\u30fc\u3068\u3001\u901a\u52e4\u9014\u4e2d\u3067\u6587\u66f8\u4f5c\u6210\u306b\u4f7f\u3046Evernote\u3060\u3051\u3067\u3057\u305f\u304c\u3001\u77e5\u3089\u306a\u3044\u5185\u306b\uff08\u3068\u3044\u3063\u3066\u3082\uff14\uff0c\uff15\u5e74\u524d\u304b\u3089\uff09Google App Engine\u306e\u3088\u3046\u306a\u30b5\u30fc\u30d3\u30b9\u304c\u8272\u3005\u3067\u3066\u3044\u308b\u3088\u3046\u3067\u3001\u9a5a\u304d\u307e\u3057\u305f\u3002\u5927\u5909\u306a\u5909\u9769\u3067\u3059\u3067\u3059\u306d\u3002\u8ab0\u3067\u3082\u3001\u30a2\u30a4\u30c7\u30a2\u6b21\u7b2c\u3067\u4e16\u754c\u6700\u5148\u7aef\u306b\u5230\u9054\u3067\u304d\u308b\u30c1\u30e3\u30f3\u30b9\u304c\u5e83\u304c\u3063\u3066\u3044\u307e\u3059\u3002<br \/>\n\uff1d\uff1d<\/p>\n<p>Google App Engine\u3067HelloWorld\u3092\u3084\u3063\u3066\u307f\u305f\u3002<br \/>\nStep1:Python\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<br \/>\n<a href=\"http:\/\/www.python.org\/download\/releases\/2.7.3\/\">http:\/\/www.python.org\/download\/releases\/2.7.3\/<\/a><br \/>\n\u3067\u3001<br \/>\nWindows x86 MSI Installer (2.7.3)<br \/>\n\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u300c\u5b9f\u884c\u300d<\/p>\n<p>Python\u30d5\u30a9\u30eb\u30c0\u30fc\u306fC\u30c9\u30e9\u30a4\u30d6\u306e\u76f4\u4e0b\u306b\u3067\u304d\u305f\u3002<\/p>\n<p>Step2: Google app engine\u306eSDK\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<br \/>\n<a href=\"https:\/\/developers.google.com\/appengine\/downloads?hl=ja\">https:\/\/developers.google.com\/appengine\/downloads?hl=ja<\/a><br \/>\n\u304b\u3089<br \/>\nGoogleAppEngine-1.7.4.msi<br \/>\n\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3002<\/p>\n<p>Step3:\u30d7\u30ed\u30b0\u30e9\u30e0\u4f5c\u6210<br \/>\ngoogle_appengine\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u6b21\u306emyapp\u30d5\u30a9\u30eb\u30c0\u30fc\u3092\u5165\u308c\u308b\u3002<br \/>\nmyapp\u30d5\u30a9\u30eb\u30c0\u30fc\u306b\u6b21\u306e\uff12\u3064\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u5165\u308c\u308b\u3002<br \/>\n\uff08\u30cd\u30c3\u30c8\u306b\u51fa\u3066\u3044\u305f\u3082\u306e\u3092\u305d\u306e\u307e\u307e\u501f\u7528\uff09<br \/>\n==Python\u30d7\u30ed\u30b0\u30e9\u30e0\uff08helloworld.py\uff09==<br \/>\nimport wsgiref.handlers<br \/>\nfrom google.appengine.ext import webapp<\/p>\n<p>class MainPage(webapp.RequestHandler):<br \/>\n\u00a0 def get(self):<br \/>\n\u00a0\u00a0\u00a0 self.response.headers[&#8216;Content-Type&#8217;] = &#8216;text\/plain&#8217;<br \/>\n\u00a0\u00a0\u00a0 self.response.out.write(&#8216;Hello, World!&#8217;)<\/p>\n<p>def main():<br \/>\n\u00a0 application = webapp.WSGIApplication(<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 [(&#8216;\/&#8217;, MainPage)],<br \/>\n\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 debug=True)<br \/>\n\u00a0 wsgiref.handlers.CGIHandler().run(application)<\/p>\n<p>================================<br \/>\n==\u30b3\u30f3\u30d5\u30a3\u30b0\u30d5\u30a1\u30a4\u30eb(app.yaml)==<br \/>\napplication: myapp<br \/>\nversion: 1<br \/>\nruntime: python<br \/>\napi_version: 1<\/p>\n<p>handlers:<br \/>\n&#8211; url: \/.*<br \/>\n\u00a0 script: helloworld.py<\/p>\n<p>================================<\/p>\n<p>Step4:\u81ea\u5206\u306ePC\u3067\u52d5\u4f5c\u78ba\u8a8d<br \/>\n\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u30a2\u30d7\u30ea\u30d5\u30a9\u30eb\u30c0\u30fc\u306e\u3042\u308b\u5834\u6240\u306b\u79fb\u308a\uff1a<br \/>\n&gt; cd &#8220;c:\\Program Files\\Google\\google_appengine&#8221;<br \/>\n\u6b21\u306e\u547d\u4ee4\u3067\u30a2\u30d7\u30ea\u3092\u5b9f\u884c<br \/>\n&gt; dev_appserver.py myapp<br \/>\n\u3053\u308c\u3067\u30b5\u30fc\u30d0\u30fc\u304c\u7acb\u3061\u4e0a\u304c\u308b\u3002<\/p>\n<p>\u4f55\u304b\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u3001\u300cY\u300d\u3092\u6253\u3064\u3002<\/p>\n<p>Step5:\u78ba\u8a8d<br \/>\n\u30d6\u30e9\u30a6\u30b6\u3092\u7acb\u3061\u4e0a\u3052\u3066&#8221;<a href=\"http:\/\/localhost:8080\/\">http:\/\/localhost:8080<\/a>&#8220;\u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u7d50\u679c\u304c\u898b\u3089\u308c\u308b\u3002<\/p>\n<p>Step6:\u30a2\u30d7\u30ea\u306e\u516c\u958b<br \/>\n(1)Google App Engine\u306e\u30da\u30fc\u30b8\u306b\u884c\u3063\u3066\u30ed\u30b0\u30a4\u30f3\uff08\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u8a18\u5165\uff09<br \/>\n(2)\u300cCreate Application\u300d\u30dc\u30bf\u30f3\u304c\u73fe\u308c\u308b\u306e\u3067\u62bc\u3059\u3002<br \/>\n(3)\u643a\u5e2f\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u8a18\u5165<br \/>\n(4)\u643a\u5e2f\u306b\u6570\u5024\u304c\u9001\u3089\u308c\u3066\u304f\u308b\u3002<br \/>\n(5)\u3053\u306e\u6570\u5024\u3092\u5165\u529b\u3057\u3066\u300c\u78ba\u8a8d\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3002<br \/>\n(6)\u30a2\u30d7\u30ea\u540d\u3068\u30bf\u30a4\u30c8\u30eb\u3092\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u3001<br \/>\nApplicatinIdentifire\u306b\u306f\u3001\u30a2\u30d7\u30ea\u540d\uff08\u30d5\u30a1\u30eb\u30c0\u30fc\u540d\uff09<br \/>\nApplicationTitle\u306b\u306f\u9069\u5f53\u306a\u540d\uff08\u4f55\u3067\u3082\u826f\u3044\uff09\u3092\u5165\u308c\u308b\u3002<br \/>\n(7)\u4f55\u304b\u306e\u6761\u9805\u3092Accept\u306b\u3057\u3066\u300cCreate Application\u300d\u30dc\u30bf\u30f3\u3092\u62bc\u3059\u3002<br \/>\n(8)Application Registered Successfully\u3068\u6765\u308b\u306e\u3067\u767b\u9332\u6210\u529f\u3002<br \/>\n(9)\u30a2\u30d7\u30ea\u306e\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9<br \/>\n\u30b3\u30de\u30f3\u30c9\u30d7\u30ed\u30f3\u30d7\u30c8\u3067\u30a2\u30d7\u30ea\u30d5\u30a9\u30eb\u30c0\u30fc\u306e\u3042\u308b\u5834\u6240\u306b\u79fb\u308a\uff1a<br \/>\n&gt; cd &#8220;c:\\Program Files\\Google\\google_appengine&#8221;<br \/>\n\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u5b9f\u884c<br \/>\n&gt;appcfg.py update myapp<br \/>\n(9)Email\u30a2\u30c9\u30ec\u30b9\u3092\u805e\u3044\u3066\u304f\u308b\u306e\u3067\u3001<br \/>\ngoogle account\u306b\u767b\u9332\u3057\u3066\u3042\u308b\u30a2\u30c9\u30ec\u30b9\u3068\u30d1\u30b9\u30ef\u30fc\u30c9\u3092\u8a18\u5165\u3002<br \/>\n(10)\u30d6\u30e9\u30a6\u30b6\u3067\u3069\u3046\u3055\u78ba\u8a8d<br \/>\nhttp:\/\/\u30a2\u30d7\u30eaID(\u4eca\u56de\u306a\u3089myapp).appspot.com\/<br \/>\n\u3067\u78ba\u8a8d\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>App Engine\u3068\u3044\u3046\u30cd\u30fc\u30df\u30f3\u30b0\u304c\u672c\u8cea\u3092\u5206\u308a\u306b\u304f\u304f\u3057\u3066\u3044\u307e\u3059\u3002\u5206\u308a\u6613\u3044\u540d\u524d\u306b\u5909\u3048\u308b\u3068\u300cGoogle \u30a2\u30d7\u30ea\u5e83\u5834\u300d\u3060\u3068\u601d\u3044\u307e\u3059\u3002\u8ab0\u3067\u3082Google\u306e\u30b5\u30fc\u30d0\u30fc\u4e0a\u306b\u3001\u81ea\u5206\u306e\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u30a2\u30d7\u30ea\u306f\u30a2\u30d7\u30ea\u540d\u3067 &hellip; <a href=\"http:\/\/fry.no.coocan.jp\/WordPress\/?p=1228\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1228"}],"collection":[{"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1228"}],"version-history":[{"count":2,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1228\/revisions"}],"predecessor-version":[{"id":1231,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=\/wp\/v2\/posts\/1228\/revisions\/1231"}],"wp:attachment":[{"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1228"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fry.no.coocan.jp\/WordPress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}