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
32
AWS Amplify の AI Kit でオレオレAIサイトを作ってみる #ゆるWeb札幌
tacck
PRO
0
51
Amplify Gen2 Deep Dive / バックエンドの型をいかにしてフロントエンドへ伝えるか #TSKaigi #TSKaigiKansai #AWSAmplifyJP
tacck
PRO
0
640
Amplify Gen2 Deep Dive / How to convey backend types to the frontend #30DaysOfAmplify
tacck
PRO
0
23
TypeScript 雰囲気勢がライブラリのコードリーディングで得た知識 #sacss
tacck
PRO
1
54
ライブコーディングで知るAmplify Gen 2 #AWSAmplifyJP
tacck
PRO
1
150
AWS Amplify Gen 2 GA記念 ~Gen1との違いを確認
tacck
PRO
0
460
Amplify Gen2 が GA したよ! #jawsug_sapporo #jawsug
tacck
PRO
0
380
Flutter で "Hello World!! #ゆるWeb札幌
tacck
PRO
0
150
Other Decks in Technology
See All in Technology
能動的ドメイン名ライフサイクル管理のすゝめ / Practice on Active Domain Name Lifecycle Management
nttcom
0
340
あなたの人生も変わるかも?AWS認定2つで始まったウソみたいな話
iwamot
1
610
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
400
Fearsome File Formats
ange
0
580
自社 200 記事を元に整理した読みやすいテックブログを書くための Tips 集
masakihirose
1
220
Azureの開発で辛いところ
re3turn
0
220
チームが毎日小さな変化と適応を続けたら1年間でスケール可能なアジャイルチームができた話 / Building a Scalable Agile Team
kakehashi
1
170
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
490
【令和最新版】ロボットシミュレータ Genesis x ROS 2で始める快適AIロボット開発
hakuturu583
2
1.5k
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
410
ネットワーク可視化の世界
likr
7
5.7k
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The World Runs on Bad Software
bkeepers
PRO
66
11k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.2k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
49k
Into the Great Unknown - MozCon
thekraken
34
1.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
Side Projects
sachag
452
42k
Statistics for Hackers
jakevdp
797
220k
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