Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
カンファレンス映えするデモアプリをPythonとCloud Runでいい感じに作った話 / D...
Search
Shinichi Nakagawa
November 19, 2022
Programming
1
210
カンファレンス映えするデモアプリをPythonとCloud Runでいい感じに作った話 / Data Visualization for Dash and Cloud Run
PyLadies Tokyo 8 周年記念パーティーLT
Shinichi Nakagawa
November 19, 2022
Tweet
Share
More Decks by Shinichi Nakagawa
See All by Shinichi Nakagawa
実践Dash - 手を抜きながら本気で作るデータApplicationの基本と応用 / Dash for Python and Baseball
shinyorke
2
1.1k
Terraform, GitHub Actions, Cloud Buildでデータ基盤をProvisioningする / Data Platform provisioning for Google Cloud and Terraform
shinyorke
2
2.8k
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
10
2.8k
自らを強いエンジニアにするための3つの習慣 / I need to be myself, I can't be no one else
shinyorke
77
58k
阪神タイガース優勝のひみつ - Pythonでシュッと調べた件 / SABRmetrics for Python
shinyorke
1
1.3k
Pythonとクラウドと野球の推し活. / Baseball Data Platform for Python and Google Cloud
shinyorke
2
2.7k
月額コーヒー3.34杯分のコストでオオタニサンの活躍を見守るデータ基盤のはなし / Pyhack Con
shinyorke
2
460
俺のDXを実現するためのサーバレスなデータ基盤開発と運用 / Serverless Data Platform and Baseball
shinyorke
5
11k
機械学習エンジニアが目指すキャリアパスとその実話 / My Journey to Become a ML Engineer
shinyorke
9
16k
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
180
2024/11/8 関西Kaggler会 2024 #3 / Kaggle Kernel で Gemma 2 × vLLM を動かす。
kohecchi
5
920
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
340
Remix on Hono on Cloudflare Workers
yusukebe
1
290
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.8k
as(型アサーション)を書く前にできること
marokanatani
10
2.7k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
340
レガシーシステムにどう立ち向かうか 複雑さと理想と現実/vs-legacy
suzukihoge
14
2.2k
受け取る人から提供する人になるということ
little_rubyist
0
230
とにかくAWS GameDay!AWSは世界の共通言語! / Anyway, AWS GameDay! AWS is the world's lingua franca!
seike460
PRO
1
880
RubyLSPのマルチバイト文字対応
notfounds
0
120
Realtime API 入門
riofujimon
0
150
Featured
See All Featured
Making Projects Easy
brettharned
115
5.9k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Faster Mobile Websites
deanohume
305
30k
4 Signs Your Business is Dying
shpigford
180
21k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
370
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Designing the Hi-DPI Web
ddemaree
280
34k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Transcript
ΧϯϑΝϨϯεө͑͢Δ σϞΞϓϦΛ΄΅Python͚ͩͰ ࡞ͬͨ with Cloud Run⚾ ㅟ ㅟ ㅟ ㅟ
ㅟ ㅟ ㅟ ㅟ ㅟ ㅟ PyConJP 2022 ͰΕͳ͔ͬͨΛ͜͜Ͱڙཆ͠·͢ͷר Shinichi Nakagawa@shinyorke 2022/11/19 PyLadies Tokyo 8पه೦LT
Who am ɹ? ʢ͓લ୭Α?ʣ • Shinichi Nakagawa@shinyorke • େख֎ࢿܥITίϯαϧاۀϚωʔδϟʔ •
ຊͷPythonք۾Ͱʮ⽁ͷਓʯͱݺΕ͍ͯΔ • PyConJPొஃ8ճʢ2014-2018, 2020-2022ʣ ʢ2019ຐ͕ࠩͨ͠ҰൠࢀՃऀʣ • PyLadies Tokyo ̋पLTࢀՃ8ճ ʢॳճ͔Βϑϧग़ܧଓதʣ #Python #Serverless #GoogleCloud #Baseball #DataScience #SABRmetrics
ຊͷ͓ • DashΛͬͯʮ΄΅Python͚ͩʯͰWebΞϓϦέʔγϣϯΛ࡞Δ • DashΞϓϦέʔγϣϯΛGoogle CloudͰ͍͍ײ͡ʹϗετ͢Δ
Ͳ͏͍͏Ϟϊ͔ͻͱ·͓ͣݟͤ͠·͢.
ΦΦλχαϯʂʂΩϡϯͰ͢ὑ खͰೋܻউͪͳ͕Βଧͬͯ34ຊྥଧ…Τά͍.
ΦΦλχαϯʂʂΩϡϯͰ͢ὑ खͰೋܻউͪͳ͕Βଧͬͯ34ຊྥଧ…Τά͍.
σϞΞϓϦέʔγϣϯߏ • ΞϓϦຊମDashͰ࣮ͨ͠ϑϩϯτΤϯυ, Cloud RunͰϗετ • API GatewayΛ௨ͯ͠όοΫΤϯυʹΞΫηε • όοΫΤϯυCloud
Functionsʹ͋Δʢ͜ΕPythonʣ, DatabaseͷதΛJSONͰฦ͢RESTful API
Dash • άϥϑඳըɾՄࢹԽϥΠϒϥϦʮPlotlyʯΛ ͍͍ײ͡ͳWebΞϓϦͱͯ͠࡞ΔͨΊͷFW • αʔόʔαΠυΞϓϦͷϕʔεFlask, ϑϩϯτReactͱ͍͏ ʢྲྀߦΓͬΆͯ͘ʣ͍͍ײ͡ͳߏ
• ૉͷJavaScriptɾHTMLΛॻ͔ͳͯ͘, Python͚ͩͰΠέΔॴ͕ ؾʹೖΓ, σϞΞϓϦͷϕʔεͱͯ͠࠾༻
ίʔυʢงғؾʣ • ࠷ॳظͷίʔυͷεΫγϣͰ͢ • HTMLʹͨ͠ίϯϙʔωϯτΛ ΰϦͬͱॻ͘ • ΠϕϯτۦಈͰͷॻ͖͑
CallbackͳσίϨʔλʔͰ࣮ • ͳΜͱͳ͘Ͱ͕͢ReactͬΆ͍ งғؾʹʢͳ͓callbackࠈʣ
Cloud RunͷϗεςΟϯά • GitHub Repositoryʹpushͨ͠ΒGitHub Actions͕ൃՐ, ςετ -> Docker Build
-> Cloud RunσϓϩΠ • ςετpytest, flake8, mypyΛGitHub Actions্Ͱ࣮ࢪʢunit, integration·Ͱ୲อ͢ΔΠϝʔδʣ • Docker buildCloud Runͷඪ४తͳΓํʹै͏. • Cloud Build্ͰϏϧυ • Artifact Registryʹpush • Cloud RunͷσϓϩΠGithub ActionsͷެࣜΛ࣮ͬͯࢪ. • ͪͳΈʹଞͷΫϥυαʔϏεͰ༨༟ͰΕΔͱࢥ͍·͢ʢAWS, Azure, etc…ʣ
Github Actionsͷఆٛ test->build->deploy • ݱࡏӡ༻͍ͯ͠ΔΞϓϦͷ GitHub Actionsఆٛ • ࣮ݱ͢Δͷʹ100ߦ͍ۙ
yamlఆ͕ٛඞཁʹ…orz • ͜͜·ͰΔΜͩͬͨΒ build/deployterraformͷํ͕ Ή͠Ζָ͔͠Εͳ͍આ
·ͱΊ • DashΛ͑΄΅Python͚ͩͰ σʔλΛݟͤΔΞϓϦΛ࡞Ε·͢. • ίϯςφԽͯ͠Cloud RunͰ ϗετ͢Δͷָ͕Ͱྑ͍Ͱ͠ΐ͏.
ʢଞͷΫϥυͰͪΖΜOKʣ • ΦΦλχαϯ, ΩϡϯͰ͢ὑ
࣌ؒͷ߹্ંͬͨ • API GatewayͱόοΫΤϯυͷંΓ·ͨ͠🙏 • ϦΫΤετ͋Ε࣭ٙԠɾϒϩάɾผͰ͢ͳͲ͠·͢ • ͜͏͍͏ઃܭʹԿނ͔ͨ͠ʁؚΊͯ·ͨΓ·͢👍
PyLadies Tokyo 8प͓ΊͰͱ͏͍͟͝·͢🎉 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠