Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Google App Engine入門
Search
Satoshi Miura
February 01, 2015
Programming
670
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Google App Engine入門
Python東海26回勉強会での発表資料です
Satoshi Miura
February 01, 2015
More Decks by Satoshi Miura
See All by Satoshi Miura
MarkdownでもSphinx
mursts
1
470
お金ダッシュボードを作ってみた
mursts
0
350
asyncioを軽くさわってみた
mursts
0
180
FlaskとYomanでHello World
mursts
0
410
Other Decks in Programming
See All in Programming
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
160
Engineering Biometric UX Across Android Versions | DroidKnights 2026
ryunen344
1
170
エージェントを使い続けるためのメタワーク / Meta-work for keeping using the agent
rkaga
6
2.2k
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
16
8.5k
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
710
Event is what happens
moro
2
3.4k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
Seven New Principles of Software Engineering
yegor256
0
440
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
1.9k
AWS CDKを理解するために公式の定義を深掘って解説してみる / Understanding AWS CDK by Digging into Its Official Definition
akihisaikeda
2
210
AIで開発が速くなった先で、開発チームは何を目指すか
shihochan
1
2k
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
433
67k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.9k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
310
Into the Great Unknown - MozCon
thekraken
41
2.8k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Utilizing Notion as your number one productivity tool
mfonobong
4
640
Building a Scalable Design System with Sketch
lauravandoore
464
34k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
400
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
The Cost Of JavaScript in 2023
addyosmani
56
10k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
430
Transcript
Google&App&Engineೖ&+&α 2015.01.31'Python౦ւ'26th
͓લͩΕΑ • Έ͏Β͞ͱ͠(@mursts) • PythonɺAndroid͕͖Ͱ͢ • ࣄJavaɺdosbatch • PythonझຯͰ͢
App#EngineΛ͍ͬͯ·͔͢ʁ ͬͨ͜ͱ͋Γ·͔͢ʁ
App#Engineͱ Googleͷఏڙ͢ΔαʔϏεͷ1ͭͰ͋ΓɺΣϒΞϓϦέʔγϣ ϯΛPythonJavaGoݴޠΛ༻ͯ͠։ൃ͠ɺGoogleͷΠϯϑϥ ετϥΫνϟʔ্Ͱ࣮ߦ͠ɺόʔδϣϯཧ͢Δ͜ͱ͕Ͱ͖Δɻ —"Wikipedia"ʮGoogle"App"Engineʯ PythonɺGoɺJavaɺPHP͕ಈ͖·͢
ࠓApp#EngineͱPythonͰ Hello%WorldΛΓ·͢
App#EngineͷڥΛ࡞Δ
SDKͷΠϯετʔϧ h"ps:/ /cloud.google.com/sdk/ $ curl https://sdk.cloud.google.com | bash # for
Linux / OS X $ gcloud auth login $ gcloud components update ※!WindowsΠϯετʔϥ͕༻ҙ͞Ε͍ͯ·͢ App#Engine͚ͩͷSDK͋Γ·͕͢ɺ͜͜ͰCloud#SDKΛΠϯε τʔϧ͠·͢
webapp2Λ༻ͨ͠ϓϩδΣΫτͷςϯϓϨʔτ͕ҎԼʹ༻ҙ͞Ε͍ͯ·͢ ~/google'cloud'sdk/pla/orm/googleappengine/ new_project_template_ ├── app.yaml ├── favicon.ico ├── index.yaml └──
main.py ※ڥʹΑΓͰύε͕ҧ͏߹͕͋ΔΑͰ͢
main.py import webapp2 class MainHandler(webapp2.RequestHandler): def get(self): self.response.write('Hello world!') app
= webapp2.WSGIApplication([ ('/', MainHandler) ], debug=True)
app.yaml application: new-project-template version: 1 runtime: python27 api_version: 1 threadsafe:
yes handlers: - url: /favicon\.ico static_files: favicon.ico upload: favicon\.ico - url: .* script: main.app libraries: - name: webapp2 version: "2.5.2"
GitHubʹଞͷϑϨʔϜϫʔΫͷςϯϓϨʔτ͋Γ·͢ • Django • flask • bo,le
͜ΜͳγΣϧΛ࡞ͬͯϓϩδΣΫτΛ࡞͍ͬͯ·͢1 create&gae&project@gist #!/bin/sh PROJECT_TEMPLATE_PATH=${HOME}/google-cloud-sdk/platform/google_appengine/new_project_template if [ $# -eq 0 ];
then CMD=`basename $0` echo "usage: ${CMD} projectname" exit 1 fi PROJECT_NAME=$1 cp -R $PROJECT_TEMPLATE_PATH $PROJECT_NAME cd $PROJECT_NAME sed -i '' "s/new-project-template/${PROJECT_NAME}/g" app.yaml echo "New Google App Engine Project Created." echo " ${PROJECT_NAME}"
͜ΜͳγΣϧΛ࡞ͬͯϓϩδΣΫτΛ࡞͍ͬͯ·͢2 create&gae&project&flask@gist #!/bin/sh if [ $# -eq 0 ]; then
CMD=`basename $0` echo "usage: ${CMD} projectname" exit 1 fi PROJECT_NAME=$1 if [ -d ${PROJECT_NAME} ] ; then echo "${PROJECT_NAME} is exists" exit 1 fi git clone https://github.com/GoogleCloudPlatform/appengine-python-flask-skeleton.git "${PROJECT_NAME}" cd "${PROJECT_NAME}" #git remote rm origin rm -rf .git pip install -r requirements.txt -t lib sed -i '' "s/your-application-id-here/${PROJECT_NAME}/g" app.yaml exit 0
ϩʔΧϧͰಈ͔ͯ͠ΈΔ copy template or git clone $ dev_appserver.py ./ >
http://localhost:8080
σϓϩΠ ϓϩδΣΫτΛ࡞ h"ps:/ /console.developers.google.com/ project?hl=ja
σϓϩΠ app.yamlͷΞϓϦέʔγϣϯ໊Λ࡞ͨ͠ϓϩδΣΫτ໊ʹมߋ diff app.yaml.org app.yaml 1c1 < application: new-project-template ---
> application: pythontokai26
σϓϩΠ $ appcfg.py update ./ >!h#p:/ /project(id.appspot.com project-id:"Developers"ConsoleͰ࡞ ͨ͠ID
ؒʹ߹͑͏ͻͱͭ +αͰManagedVMͷΛ͠Α͏ͱࢥ͍·ͨ͠ ͕ؒʹ߹͍·ͤΜͰͨ͠ ࣍ճͷษڧձͰΓ͍ͨͱࢥ͍·͢
͋Γ͕ͱ͏͍͟͝·ͨ͠