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
PyScriptの話
Search
2bo
July 11, 2023
Technology
0
280
PyScriptの話
Python東海 第43回勉強会 発表資料
2bo
July 11, 2023
Tweet
Share
More Decks by 2bo
See All by 2bo
おたく監視してみた
2bo
0
46
巨大ガジェット買ってみた
2bo
0
640
ZabbixAPIをつんつんした
2bo
0
400
名古屋とお菓子🍪
2bo
0
390
名古屋 勉強会 会場 選定 2019
2bo
2
180
お城Pythonの作り方/OshiroPython
2bo
1
660
Python勉強法
2bo
0
840
Python 環境構築方法 2016
2bo
2
1.8k
Python東海の紹介(仮).py
2bo
0
380
Other Decks in Technology
See All in Technology
AWSで始める実践Dagster入門
kitagawaz
1
610
[ JAWS-UG 東京 CommunityBuilders Night #2 ]SlackとAmazon Q Developerで 運用効率化を模索する
sh_fk2
3
410
DDD集約とサービスコンテキスト境界との関係性
pandayumi
3
280
20250913_JAWS_sysad_kobe
takuyay0ne
2
190
Automating Web Accessibility Testing with AI Agents
maminami373
0
1.3k
ガチな登山用デバイスからこんにちは
halka
1
240
Function Body Macros で、SwiftUI の View に Accessibility Identifier を自動付与する/Function Body Macros: Autogenerate accessibility identifiers for SwiftUI Views
miichan
2
180
BPaaSにおける人と協働する前提のAIエージェント-AWS登壇資料
kentarofujii
0
140
開発者を支える Internal Developer Portal のイマとコレカラ / To-day and To-morrow of Internal Developer Portals: Supporting Developers
aoto
PRO
1
460
機械学習を扱うプラットフォーム開発と運用事例
lycorptech_jp
PRO
0
230
ChatGPTとPlantUML/Mermaidによるソフトウェア設計
gowhich501
1
130
KotlinConf 2025_イベントレポート
sony
1
130
Featured
See All Featured
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Bash Introduction
62gerente
615
210k
Faster Mobile Websites
deanohume
309
31k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.1k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
131
19k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
Building an army of robots
kneath
306
46k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
What’s in a name? Adding method to the madness
productmarketing
PRO
23
3.7k
BBQ
matthewcrist
89
9.8k
How GitHub (no longer) Works
holman
315
140k
Transcript
͓લ୭Α • ͓ࣄ αʔόʔNWΠϯϑϥԂࣇʹ͋ • झຯ ञɺຊɺϘʔυήʔϜ •
ॅΜͰΔͱ͜ ذෞʢ໊ݹͷ২ຽʣ • ίϛϡχςΟɿPython౦ւɺRaspberryPiUGɺଞ • Twitterɿ@2box2bo (΄΅͍ͳ͍) • ကɿ@
[email protected]
(͍͍ͩͨͬͪ͜) • Python౦ւୈ20ճ͘Β͍?͔ΒࢀՃ
ͳΜͱ͔GPTͱ͔ྲྀߦͬͯΔͷͰ
ڈͪΐͬͱʹͳͬͨ PyScriptͷͰ͠·͔͢
PyScriptͷ͓ Python౦ւ ୈ43ճษڧձ 2023/7/8 @2box2bo
PyScript ͬͯ·͔͢?
PyScriptͬͯԿऀ? • PyCon US 2022ͷΩʔϊʔτͰAnaconda͕ൃ දͨ͠ϒϥβͰಈ͘Python • ʮRun Python in
Your HTMLʯ • https://pyscript.net/
ϒϥβͰಈ͘ʁ
ϒϥβͰಈ͘ • WebαʔόʔͰಈ࡞ͰPythonΛಈ͔͢Θ͚Ͱ ͳ͘ɺWebϒϥβͰPythonΛಈ͔͢ • Python࣮ߦڥͷΠϯετʔϧWebϒϥ βͰಈ͔͢ͷͰෆཁ • WebAssemblyΛ༻
ͳΜͷͬͪ͜Ό? ͬͯͳΔͷͰ Ұͭͮͭઆ໌͍ͯ͘͠
WebAssemblyͬͯ? • ݩʑWebϑϩϯτΤϯυͷߴԽٕज़ͱͯ͠ ੜ • ུশWasm • RustC++ͷιʔεΛWasmʹίϯύΠϧͯ͠ JavaScriptΑΓߴʹಈ͔ٕ͢ज़ •
Disney+ͱ͔AmazonPrimeVideoͰΘΕ͍ͯΔ • PythonͷιʔείʔυWasmίϯύΠϧͰ͖ͳ ͍
Python͑ͳ͍͡ΌΜ
PyodideͬͯͷͰ͑Δ
Pyodide? • Pythonͷιʔείʔυ͕WasmίϯύΠϧͰ͖ͳ ͍ͷͰɺPython࣮ߦڥ(PythonΠϯλϓϦλ)Λ WasmίϯύΠϧͨ͠ͷ • PythonιʔείʔυΛPyodideͰ࣮ߦ͢Δ • ࠷৽0.23.3ͰPython3.11.2ΛWasmίϯύΠϧ •
…ಡΈํʮͺ͍͓͍ͩͲʯ…ʁ • ৄࡉͪ͜Β https://pyodide.org/en/stable/
Pyodided͚ͩͰPython࣮ߦ • Pyodided͚ͩͰPythonΛಈ͔ͤΔʂ • ʮpyodide.runPython(`Pythonίʔυ`);ʯ • ࢼͯ͠ΈΔͱΘ͔Γ·͕͢ɺ͜Εॻ͖ͮΒ ͍…
͜͜·Ͱͷ·ͱΊ • WebAssembly(Wasm)Λ͏ͱWebϒϥβ Ͱ৭ʑͰ͖Δ • PythonΛWasmίϯύΠϧ͢Δ͜ͱͰ͖ͳ͍ • Python࣮ߦڥΛWasmίϯύΠϧͨ͠ Pyodided͕͋Δ͕ͪΐͬͱ͍ʹ͍͘
Α͏͘PyScriptͷʹΔ
ͰɺPyScriptͬͯʁ • WebϒϥβͰಈ͘Python࣮ߦڥ • PyodidedΛ͍ͨ͘͢͠ͷ͕PyScript • PyScriptΛಡΈࠐΜͰɺ<py-script>λάͰғΜ ͩதʹPythonίʔυॻ͚ಈ͘ • ϒϥβίϯιʔϧݟͳͯ݁͘Ռදࣔ͞ΕΔ
• ͪΖΜJavaScriptͱ࿈ܞͰ͖Δ
ಈ࡞Πϝʔδ͕… • ͜Μͳײ͡Ͱಈ͍͍ͯΔ • https://anaconda.cloud/pyscript-python-in-the-browser •
ͱ͍͏͜ͱͰσϞ
σϞ • σϞίʔυ https://github.com/2bobo/PyScript-demo • ެࣜαϯϓϧ https://pyscript.net/examples/ •
·ͱΊ
PyScript·ͱΊ • Webϒϥβ্ͰPythonΛಈ͔͢͜ͱ͕Ͱ͖Δ • Python࣮ߦڥͷΠϯετʔϧෆཁʂ • (ͨΓલ͚ͩͲ)ಈ࡞͍ • ·ͩ·ͩ։ൃத͚ͩͲࠓޙظ͍ͯ͠Δ •
Կʹ͑Δ͔ʁ·ͩ·ͩ͜Ε͔Β • Anaconda͕ؔΘ͍ͬͯΔͷਖ਼…
͓ΘΓ