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
220
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
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.1k
Subclassing, Composition, Python, and You
hynek
3
100
ファーストペンギンBot @Qiita Hackathon 2024 予選
dyson_web
0
210
Flutterアプリを生成AIで生成する勘所
rizumita
0
240
個人開発で使ってるやつを紹介する回
yohfee
1
640
Modern Functional Fluent CFML REST by Luis Majano
ortus24
0
120
GraphQLとGigaViewer for Apps
numeroanddev
4
880
PHPを書く理由、PHPを書いていて良い理由 / Reasons to write PHP and why it is good to write PHP
seike460
PRO
5
270
CSC509 Lecture 01
javiergs
PRO
1
200
DjangoNinjaで高速なAPI開発を実現する
masaya00
0
420
"型"のあるRailsアプリケーション開発 / Typed Rails application development
sinsoku
8
2.2k
Frontend Magic mit CSS Houdini
joergneumann
0
420
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
360
19k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Happy Clients
brianwarren
97
6.6k
The Cult of Friendly URLs
andyhume
76
6k
Statistics for Hackers
jakevdp
796
220k
How GitHub Uses GitHub to Build GitHub
holman
473
290k
Making Projects Easy
brettharned
114
5.8k
Making the Leap to Tech Lead
cromwellryan
130
8.8k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
25
640
Six Lessons from altMBA
skipperchong
26
3.4k
Bash Introduction
62gerente
608
210k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.5k
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प͓ΊͰͱ͏͍͟͝·͢🎉 ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠