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でいい感じに作った話 / Data Visualization for Dash and Cloud Run
Search
Shinichi Nakagawa
November 19, 2022
Programming
1
170
カンファレンス映えするデモアプリを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
Terraform, GitHub Actions, Cloud Buildでデータ基盤をProvisioningする / Data Platform provisioning for Google Cloud and Terraform
shinyorke
2
2.1k
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
8
2.1k
自らを強いエンジニアにするための3つの習慣 / I need to be myself, I can't be no one else
shinyorke
76
53k
阪神タイガース優勝のひみつ - Pythonでシュッと調べた件 / SABRmetrics for Python
shinyorke
1
990
Pythonとクラウドと野球の推し活. / Baseball Data Platform for Python and Google Cloud
shinyorke
2
2.3k
月額コーヒー3.34杯分のコストでオオタニサンの活躍を見守るデータ基盤のはなし / Pyhack Con
shinyorke
2
390
俺のDXを実現するためのサーバレスなデータ基盤開発と運用 / Serverless Data Platform and Baseball
shinyorke
5
11k
機械学習エンジニアが目指すキャリアパスとその実話 / My Journey to Become a ML Engineer
shinyorke
6
14k
一人でも小さく始められるGoogle Cloudで実現するほぼサーバレスなデータ基盤 / Serverless Dataplatform for Google Cloud
shinyorke
0
450
Other Decks in Programming
See All in Programming
Sheets API使ってみた
toshi0383
2
170
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
280
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
PostmanでAPIの動作確認が楽になった話
h455h1
0
180
OpenAPIを中心に考えるAPI開発入門 / Introduction to API Development with a Focus on OpenAPI
seike460
PRO
2
180
The Cutting Edge Of Versioning (LambdaConf 2024)
chriskrycho
0
150
Let's learn code review
riofujimon
2
600
AppRouter Panel Talk
yosuke_furukawa
PRO
1
480
雑に思考を整理する技術と効能
konifar
64
30k
Introducing Kotlin Multiplatform in an existing mobile app - Workshop Edition | AndroidMakers Paris
prof18
0
160
Ruby Function Composition
bkuhlmann
1
340
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
Featured
See All Featured
Building Effective Engineering Teams - LeadDev
addyosmani
32
1.9k
Bash Introduction
62gerente
605
210k
KATA
mclloyd
16
12k
Testing 201, or: Great Expectations
jmmastey
30
6.4k
GraphQLの誤解/rethinking-graphql
sonatard
56
9.3k
Designing on Purpose - Digital PM Summit 2013
jponch
111
6.5k
What the flash - Photography Introduction
edds
64
11k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
34
6k
Fantastic passwords and where to find them - at NoRuKo
philnash
39
2.5k
Six Lessons from altMBA
skipperchong
22
3k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Rails Girls Zürich Keynote
gr2m
91
13k
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प͓ΊͰͱ͏͍͟͝·͢🎉 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠