You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
æè¿ãCertified ScrumMasterï¼èªå®ã¹ã¯ã©ã ãã¹ã¿ã¼ï¼ãç¡äºGETããç§ã§ãããã°ãã¯ï¼*1 ä»æ¥ã¯ãã¡ãã®åå¼·ä¼ï¼ããããä¼ï¼ã§ããæãã®ã¢ããåºæ¥ãã®ã§ãã¡ããã¨ç´¹ä»ãããã¨æãã¾ãã mokupy.connpass.com ã¹ã¿ã¼ãã£ã³ã°ã¡ã³ãã¼ ã¹ã¿ã¡ã³è¡¨ã£ã½ããã¸ã·ã§ã³ãå ¥ãã¾ããããç¹ã«æå³ã¯ããã¾ãã*2 (2B)ãã®ã¨ã³ããªã¼ã®å¯¾è±¡èªè (LF)èæ¯ (RF)Beautifulsoupã§ã¹ã¯ã¬ã¤ãã³ã° (3B)geopyã§ããããGeocoding (1B)bottle + Google Map APIã§ãµã¯ãã¨å°å³ã¢ããªãä½ã (CF)å®æï¼ (C)ä»å¾ã®å±æ (SS)ãAppendixãPythonã¨ã³ã¸ãã¢é¤æèªæ¬ã«ã¤ã㦠(P)ãAppendixãPythonããããä¼ (2B)ãã®ã¨ã³ããªã¼ã®å¯¾è±¡èªè 以ä¸ã®äººã«ãªã¹ã¹ã¡ãã¾ãã Pythonã§ã¹
以åãwsgi-interceptã使ã£ãæã«ãPythonã®HTTPã©ã¤ãã©ãªã¨ãã¦ãRequestsã使ãã¾ããã Requests: HTTP for Humans â Requests 2.13.0 documentation 使ã£ã¦ããä¸ã§ãRequestã®Cookieã®ä½¿ãæ¹ã«ã¤ãã¦è¿·ã£ããã¨ããã£ããããã¡ã¢ãæ®ãã¾ãã ç°å¢ Mac OS X 10.11.6 Python 3.6.1 Requests 2.13.0 Bottle 0.12.13 Requestsã試ãããã®ã¢ã㪠pytest 3.0.7 ãã¹ãã©ã³ãã¼ Requestsã試ãããã®ç¨æããBottleã¢ã㪠Cookieãã»ããããã ãã®Bottleã¢ããªãç¨æãã¾ããã ä»æ§ã¯ /ã¸ã¢ã¯ã»ã¹ Cookieã«rootãã»ãã /redirectã¸ã¢ã¯ã»ã¹ Cookieã«redirectãã»ãã /ããªãã¤
shuzo-kino.hateblo.jp ã§ã¯APIçãªç»åã¢ããå ãã¤ããã¾ããã $ curl -F "upload=@/PATH/TO/FILE.EXT" http://localhost:8080/imgãªæãã§ãã³ãªãã奴ã§ããã å®éã®ã¨ãã from bottle import route, request @route('/upload', method='POST') def do_upload(): name = request.forms.name data = request.files.data if name and data and data.file: raw = data.file.read() # This is dangerous for big files filename = data.filename with open(filename,'w
#ã¯ããã« èªåç¨ã¡ã¢ã§ããçµç·¯ã¯ä¸è¨ã ååä½æãããããªBottleã¢ããªã±ã¼ã·ã§ã³ããã¼ã«ã«ã§ãªãã¤ã³ã¿ã¼ãããä¸ã§åããã¦ã¿ããã£ãã ä»æ´ãªããHerokuã使ã£ã¦ã¿ããã£ãã ãã¼ã«ã«ç°å¢ãæ§ç¯ããã«éçºãã§ããã¨ããCloud9ã®åå¨ãç¥ã£ã¦ã使ã£ã¦ã¿ããã£ãã #åææ¡ä»¶ã¨ã Cloud9, heroku, GitHubã®ã¢ã«ã¦ã³ãã¯ä½ææ¸ã¿ Pythonã¯ãã¼ã¸ã§ã³3.5.1ã使ã #ãã£ãã㨠##ãCloud9ãã¯ã¼ã¯ã¹ãã¼ã¹ã®ä½æ https://c9.io/new Choose a templateã§Pythonãæå®ãã¦Create workspace ##ãCloud9ãPythonã®ãã¼ã¸ã§ã³ã¢ãã Cloud9ã®ããã©ã«ãã ã¨Pythonã®ãã¼ã¸ã§ã³ã¯Python2ç³»ãªã®ã§ãPython3.5.1ãå©ç¨ããããå¤æ´ãã¦ããã ç»é¢ä¸é¨ã®ç·è²ã®ï¼ãã¿ã³ãæ¼ã
ã¯ããã« Pythonã¾ã£ãã使ã£ããã¨ãªããããPythonã§ãªããä½ã£ã¦ã¿ããã¨æã£ãã®ããã£ããã§ãã ãã¨ãã£ã¦ããHello Worldãåºãã ããªãã¦ããã¼ããªããã¨ãã¦ãæå³ãç¡ãã®ã§ãã¡ããã¨ãã¬ã¼ã ã¯ã¼ã¯ã使ã£ã¦MVCã£ã½ãä½ããã¨æãã¾ããã ãã£ãããªã®ã§ãèªåããã³ã¬ãä»ä½å·»ã¾ã§æã£ã¦ãããã管çãããã¼ã«ãä½ãããã¨æãã¾ãããã¤ãä½å·»ã¾ã§æã£ã¦ãã£ãããªã¼ã£ã¦å¿ãã¡ããã®ã§ã CRUDã®åºæ¬ãæãããµã³ãã«ã§ãã ã¡ãªã¿ã«ãPythonã®æ§æãã¢ã¸ã¥ã¼ã«ã®ã¤ã³ã¹ãã¼ã«çã¯ãæ¤ç´¢ããã°ããåºã¦ããã®ã§ã°ã°ã£ã¦ãã ããã Pythonã®ãã¬ã¼ã ã¯ã¼ã¯ Pythonã®ãã¬ã¼ã ã¯ã¼ã¯ã§æåãªã®ã¯ããã«ã¹ã¿ãã¯ãªDjangoãã©ã¤ããªFlaskããããã人æ°ãåºã¦ãã¦ããããPyramidãªã©ãããã¾ããã å人çã«ãã«ã¹ã¿ãã¯ãªãã¬ã¼ã ã¯ã¼ã¯ã¯å¥½ãã§ãªãã®ã¨ãï¼ãã¡ã¤ã«
Pythonã®é¢æ°ï¿½ã®é¨åé©ç¨ãè¡ãfunctools.partialããã³ã¬ã¼ã¿ãæ¸ãã¨ããªã©ã«ä½¿ãfunctools.wrapsã«ã¤ãã¦ã ãã¼ã¨ã社å ã®æå¿ã§bottle.pyã®ã½ã¼ã¹ã³ã¼ããªã¼ãã£ã³ã°ããã£ããã ããããã§ãã¾ããfunctoolsã®ç解ãå¼±ãã¦èªãã®ã«è©°ã¾ã£ãã®ã§ãä¸æ¦èªåã®ç解ã¨ãã¦ã¾ã¨ãã¦ããããã³ã¬ã¼ã¿ã¨ãæ®æ®µèªåã§å®è£ ããæ©ä¼ãã¾ããªãã®ã§ããã®ãããã®ç解ãæ·±ãããã¨ãã§ããã®ãåç©«ã ã£ãããã£ã±åå¼·ä¼ã¯å°äººæ°ã®æ¹ãããããããæ°ãã人ã ãã§å¬ãã¯ãã¼ãºããªãã¤ããããå ¨å¡çºè¡¨ã«ã¼ã«ã®ãä¼å¡å¶ã¯ã©ãã¿ã¦ã¼ãªãã¤(éãã)ã 0. functoolsã«ã¤ã㦠ã¾ããfunctoolsã¨ã¯ãªããªã®ãï¼ã¨ãã話ãªãã ãã©ãå ¬å¼ãè¦ã¦ã¿ãã¨æ¬¡ã®ãããªè¨è¿°ãããã 9.8. functools â é«éé¢æ°ã¨å¼ã³åºãå¯è½ãªãã¸ã§ã¯ãã®æä½ ãã¼ã¸ã§ã³ 2.5 ã§è¿½
æè¿bottleã¨geventã使ã£ã¦ã¿ã¦ãã¨ã¦ã便å©ã§ã¡ã«ããºã ãèå³æ·±ãã¨æã£ãã®ã ãããã¾ãæ¥æ¬èªã®è§£èª¬ããªããããªã®ã§ããã«ã¾ã¨ãã¦ã¿ããPythonã«ããã¦ã§ãã¢ããªéçºã§ãã¬ã¹ãã³ã¹é度ãéè¦ãªã¨ãã«åèã«ãªããã¨æãã bottleã¨ã¯ï¼ Pythonã®è»½éã¦ã§ããã¬ã¼ã ã¯ã¼ã¯ã§ããã使ãæ¹ã¯ã¨ã¦ãã·ã³ãã«ã§ãç¬èªã®ãã³ãã¬ã¼ãã¨ã³ã¸ã³ãæã£ã¦ããã詳細ã¯æ¬å®¶ã®ããã¥ã¡ã³ããåç §ã ãããã®æ¬å®¶ã®ããã¥ã¡ã³ãã®æåã®ãã®ä¾ã示ãã°å¤§ä½ã®é°å²æ°ã¯ã¤ãããã§ãããã from bottle import route, run, template @route('/hello/<name>') def index(name): return template('<b>Hello {{name}}</b>!', name=name) run(host='localhost', port
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}