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
PHPerが聞きたいPythonのいくつかのこと - PyCon mini Sapporo 2...
Search
Kihara, Takuya
PRO
May 11, 2019
Technology
0
1.2k
PHPerが聞きたいPythonのいくつかのこと - PyCon mini Sapporo 2019 #pyconsap
PyCon mini Sapporo 2019 #pyconsap
LTでの発表。
Kihara, Takuya
PRO
May 11, 2019
Tweet
Share
More Decks by Kihara, Takuya
See All by Kihara, Takuya
ゆるWeb勉強会@札幌 #28 #ゆるWeb札幌
tacck
PRO
0
26
AWS Amplify の AI Kit でオレオレAIサイトを作ってみる #ゆるWeb札幌
tacck
PRO
0
33
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
490
Amplify Gen2 Deep Dive / How to convey backend types to the frontend #30DaysOfAmplify
tacck
PRO
0
21
TypeScript 雰囲気勢がライブラリのコードリーディングで得た知識 #sacss
tacck
PRO
1
50
ライブコーディングで知るAmplify Gen 2 #AWSAmplifyJP
tacck
PRO
1
140
AWS Amplify Gen 2 GA記念 ~Gen1との違いを確認
tacck
PRO
0
420
Amplify Gen2 が GA したよ! #jawsug_sapporo #jawsug
tacck
PRO
0
360
Flutter で "Hello World!! #ゆるWeb札幌
tacck
PRO
0
140
Other Decks in Technology
See All in Technology
どちらを使う?GitHub or Azure DevOps Ver. 24H2
kkamegawa
0
1.2k
事業貢献を考えるための技術改善の目標設計と改善実績 / Targeted design of technical improvements to consider business contribution and improvement performance
oomatomo
0
150
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
130
効率的な技術組織が作れる!書籍『チームトポロジー』要点まとめ
iwamot
1
110
2024年にチャレンジしたことを振り返るぞ
mitchan
0
150
Working as a Server-side Engineer at LY Corporation
lycorp_recruit_jp
0
370
宇宙ベンチャーにおける最近の情シス取り組みについて
axelmizu
0
120
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
190
怖くない!ゼロから始めるPHPソースコードコンパイル入門
colopl
0
160
Google Cloud で始める Cloud Run 〜AWSとの比較と実例デモで解説〜
risatube
PRO
0
120
終了の危機にあった15年続くWebサービスを全力で存続させる - phpcon2024
yositosi
27
23k
JVM(JavaVM)の性能分析者観点で探るInstanaの可能性
instanautsjp
0
120
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
A Tale of Four Properties
chriscoyier
157
23k
The Cult of Friendly URLs
andyhume
78
6.1k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
66k
Become a Pro
speakerdeck
PRO
26
5k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Embracing the Ebb and Flow
colly
84
4.5k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Navigating Team Friction
lara
183
15k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Mobile First: as difficult as doing things right
swwweet
222
9k
Transcript
1Z$PONJOJ4BQQPSP @tacck 1)1FS͕ฉ͖͍ͨ 1ZUIPOͷ͍͔ͭ͘ͷ͜ͱ 2019/05/11 1)1FS 1ZUIPO 1ZUIPO 1ZUIPO 1ZUIPO
1ZUIPO 1ZUIPO 1ZUIPO 1ZUIPO 1ZUIPO 1)1FS 1)1FS 1)1FS 1)1FS 1)1FS 1)1FS 1)1FS 1)1FS
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ୭ • ໊લ tacck / ݪ •
ॴଐ גࣜձࣾϊʔεσΟςʔϧ • ࣄ ϞϏϦςΟIoTࣄۀ ͷԿͰ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL 1ZUIPOJTUBͷօʑ༷ʹ ͍͍ͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ͦͷલʹ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ීஈ1)1FSͬͯ·͢ • ࣄͰझຯͰɻ • ͦΕҎ֎ʹɺJavaॻ͍ͨΓɺJavaScriptॻ͍ͨΓɻ • ࣄͰPythonॻ͍ͯͳ͍Ͱ͢ɻɻɻ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ͦΜͳࢲͰ 1ZUIPOΛ৮Δ͕࣌͋Γ·ͯ͠
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ ϒϥβ AWS IoT ηϯαʔ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ ϒϥβ AWS IoT ηϯαʔ ͜͜ʹPython
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ ϒϥβ AWS IoT ηϯαʔ ηϯαʔ͔Β σʔλऔಘ͢Δ Pythonαϯϓϧ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ ϒϥβ AWS IoT ηϯαʔ AWS IoTϔ σʔλૹ৴͢Δ
Pythonαϯϓϧ ηϯαʔ͔Β σʔλऔಘ͢Δ Pythonαϯϓϧ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ AWS IoTϔ σʔλૹ৴͢Δ Pythonαϯϓϧ ηϯαʔ͔Β σʔλऔಘ͢Δ Pythonαϯϓϧ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ֓ཁ ηϯαʔ͔Β σʔλऔಘ͢Δ Pythonαϯϓϧ AWS IoTϔ σʔλૹ৴͢Δ Pythonαϯϓϧ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Ωϝϥ ߹्ϓϩάϥϜ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL • ͱΓ͋͑ͣαϯϓϧϓϩάϥϜΛ ͚ͬͭͯ͘ಈ͔ͯ͠ΈΔ • ಈ͖࢝ΊͨͷͰͦͷ··ಈ͔͠ଓ͚Δ • ҰिؒܦͭͱԿΛ͍͔ͬͯͨΕΔ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ߹्ϓϩάϥϜര
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ߹्ϓϩάϥϜര Έͳ͞Μ ࠇຐज़ͬͯ·͔͢?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Πϯσϯτͷ୩
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL • Πϯσϯτͷਂ͕͞ϒϩοΫΛද͢ • ͜Εྑ͍ • ͨͩɺ͍ίʔυΛεΫϩʔϧ͍ͯ͘͠ͱ ৺ʹҾ͔͔ͬΓ͕ੜ·ΕΔ͜ͱ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫ࢝·ͬͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫ·ͨ࢝·ͬͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘ͔ͬͨͳ?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘͬͯͳ͔ͬͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘͬͯͳ͔ͬͨ ͕͜͜ Πϯσϯτͷ୩
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘ͔ͬͨͳ?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘͬͯͳ͔ͬͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘ͔ͬͨͳ?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ϒϩοΫऴΘͬͯͳ͔ͬͨ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL …
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL … “ } ” ͍ͭग़Δͷ!!!!! (ग़·ͤΜ)
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL … “ } ” ͍ͭग़Δͷ!!!!! (ग़·ͤΜ) Ͳ͏ͬͨΒ ׳Ε·͔͢?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL λϓϧͷṖΛ͑
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ( ( ,) ,)
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL ( ( ,) ,) λϓΔ?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL JNQPSU͍͠
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL • ͿͬͪΌ͚ “import” ͕Θ͔Βͳ͍ • “from” ͕ग़Δͱ͞ΒʹΘ͔Βͳ͍ •
PHPͱPythonͰॻ͖ൺͯ͠Έͨɻ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL 1)1ͰΫϥεΛ͏ͱ͖
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.php SubFolder Bar.php Folder (ύοέʔδ໊: App)
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.php SubFolder Bar.php Folder (ύοέʔδ໊: App) <?php namespace
App\SubFolder; class Bar { … } ΫϥεͱϑΝΠϧ໊ جຊతʹ1ର1
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.php SubFolder Bar.php Folder (ύοέʔδ໊: App) <?php namespace
App; use App\SubFolder\Bar; class Foo { public function someFunc() { $bar = new Bar(); } }
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.php SubFolder Bar.php Folder (ύοέʔδ໊: App) <?php namespace
App; use App\SubFolder\Bar; class Foo { public function someFunc() { $bar = new Bar(); } } “ύοέʔδ໊” + “SubFolder” + “Ϋϥε໊” Ͱɺ “Bar.php” ͷΫϥεΛࢀরɻ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.php SubFolder Bar.php Folder (ύοέʔδ໊: App) <?php namespace
App; use App\SubFolder\Bar; class Foo { public function someFunc() { $bar = new Bar(); } } “ύοέʔδ໊” + “SubFolder” + “Ϋϥε໊” Ͱɺ “Bar.php” ͷΫϥεΛࢀরɻ ͜ͷΫϥεͰ Ϋϥε໊͚ͩͰݺͼग़͠Մೳ
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL 1ZUIPOͰΫϥεΛ͏ͱ͖
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder Bar.py Folder
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder class Bar:
… class Hoge: … ϑΝΠϧ໊Ϟδϡʔϧ໊ ϑΝΠϧʹෳΫϥεهࡌՄೳ PHPͩͱ “ϑΥϧμ໊” ͕ “Ϟδϡʔϧ໊” తͳҐஔ͚
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder import SubFolder.Bar
class Foo: def someFunc(self): bar = SubFolder.Bar.Bar()
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder import SubFolder.Bar
class Foo: def someFunc(self): bar = SubFolder.Bar.Bar() “ύοέʔδ໊” + “Ϟδϡʔϧ໊” + “Ϋϥε໊” “Bar.py” ͷΫϥεΛࢀর ͍͍ͨ “ύοέʔδ໊” + “Ϟδϡʔϧ໊” هࡌ ͜ͷϞδϡʔϧͰ “SubFolder.Bar” Λ༻
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder from SubFolder.Bar
import Bar class Foo: def someFunc(self): bar = Bar() fromʹ “ύοέʔδ໊” + “Ϟδϡʔϧ໊” هࡌ ͜ͷதͷ “Ϋϥε” Λ༻͢Δએݴ importͷޙʹॻ͍ͨ “Bar” ΛϞδϡʔϧͰ༻
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder from SubFolder.Bar
import Bar class Foo: def someFunc(self): bar = Bar() ͜ͷॻ͖ํΛ͢Δͱɺ PHPͱಉ͡Α͏ͳײ͡ͰΫϥεΛࢀরͰ͖Δɻ fromʹ “ύοέʔδ໊” + “Ϟδϡʔϧ໊” هࡌ ͜ͷதͷ “Ϋϥε” Λ༻͢Δએݴ importͷޙʹॻ͍ͨ “Bar” ΛϞδϡʔϧͰ༻
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL Foo.py SubFolder (ύοέʔδ໊) Bar.py (Ϟδϡʔϧ໊) Folder from SubFolder.Bar
import Bar class Foo: def someFunc(self): bar = Bar() fromʹ “ύοέʔδ໊” + “Ϟδϡʔϧ໊” هࡌ ͜ͷதͷ “Ϋϥε” Λ༻͢Δએݴ importͷޙʹॻ͍ͨ “Bar” ΛϞδϡʔϧͰ༻ ͜ͷॻ͖ํΛ͢Δͱɺ PHPͱಉ͡Α͏ͳײ͡ͰΫϥεΛࢀরͰ͖Δɻ ͜ΕͰ ྑ͍ΜͰ͔͢Ͷ?
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL 1ZUIPOJTUBͷօʑ༷ɺ ɹ༏͘͠ڭ͍͑ͯͩ͘͞
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL 13
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL https://phpcon.hokkaido.jp/
1Z$PONJOJ4BQQPSPQZDPOTBQ !UBDDL FOE