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
210
Terraform, GitHub Actions, Cloud Buildでデータ基盤をProvisioningする / Data Platform provisioning for Google Cloud and Terraform
shinyorke
2
2.7k
Cloud RunとCloud PubSubでサーバレスなデータ基盤2024 with Terraform / Cloud Run and PubSub with Terraform
shinyorke
10
2.6k
自らを強いエンジニアにするための3つの習慣 / I need to be myself, I can't be no one else
shinyorke
77
57k
阪神タイガース優勝のひみつ - Pythonでシュッと調べた件 / SABRmetrics for Python
shinyorke
1
1.2k
Pythonとクラウドと野球の推し活. / Baseball Data Platform for Python and Google Cloud
shinyorke
2
2.6k
月額コーヒー3.34杯分のコストでオオタニサンの活躍を見守るデータ基盤のはなし / Pyhack Con
shinyorke
2
430
俺のDXを実現するためのサーバレスなデータ基盤開発と運用 / Serverless Data Platform and Baseball
shinyorke
5
11k
機械学習エンジニアが目指すキャリアパスとその実話 / My Journey to Become a ML Engineer
shinyorke
7
15k
Other Decks in Programming
See All in Programming
CSC509 Lecture 01
javiergs
PRO
1
200
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.1k
Remix × Cloudflare Pages × Sentry 奮闘記 / remix-pages-sentry
nkzn
1
360
CSC305 Lecture 01
javiergs
PRO
1
140
NANIMACHI
naokiito
0
930
Cohesion in Modeling and Design
mploed
3
180
ROS 2のZenoh対応とZenohのROS 2対応
takasehideki
2
240
Cloud Adoption Frameworkにみる組織とクラウド導入戦略(縮小版)
tomokusaba
1
120
ACES Meet におけるリリース作業改善の取り組み
fukucheee
0
110
為醫療加裝Python的引擎
cclai999
0
270
AWS CDKを用いたセキュアなCI/CDパイプラインの構築 / Build a secure CI/CD pipeline using AWS CDK
seike460
PRO
3
500
Re:PandasAI:生成AIがデータ分析業務にもたらすパラダイムシフト【増補改訂版】
negi111111
1
670
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.6k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
26
4k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.1k
Designing the Hi-DPI Web
ddemaree
279
34k
Ruby is Unlike a Banana
tanoku
96
11k
What the flash - Photography Introduction
edds
67
11k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A better future with KSS
kneath
235
17k
KATA
mclloyd
27
13k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
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प͓ΊͰͱ͏͍͟͝·͢🎉 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠