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
200
PyScriptの話
Python東海 第43回勉強会 発表資料
2bo
July 11, 2023
Tweet
Share
More Decks by 2bo
See All by 2bo
巨大ガジェット買ってみた
2bo
0
510
ZabbixAPIをつんつんした
2bo
0
330
名古屋とお菓子🍪
2bo
0
320
名古屋 勉強会 会場 選定 2019
2bo
2
140
お城Pythonの作り方/OshiroPython
2bo
1
620
Python勉強法
2bo
0
800
Python 環境構築方法 2016
2bo
2
1.7k
Python東海の紹介(仮).py
2bo
0
330
pep8を読んでみよう.pdf
2bo
0
230
Other Decks in Technology
See All in Technology
Evangelismo técnico: ¿qué, cómo y por qué?
trishagee
0
360
BLADE: An Attempt to Automate Penetration Testing Using Autonomous AI Agents
bbrbbq
0
300
Python(PYNQ)がテーマのAMD主催のFPGAコンテストに参加してきた
iotengineer22
0
470
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
500
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
2
520
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
Taming you application's environments
salaboy
0
190
Lexical Analysis
shigashiyama
1
150
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
OCI Vault 概要
oracle4engineer
PRO
0
9.7k
Featured
See All Featured
Code Review Best Practice
trishagee
64
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
A Tale of Four Properties
chriscoyier
156
23k
The Cult of Friendly URLs
andyhume
78
6k
YesSQL, Process and Tooling at Scale
rocio
169
14k
[RailsConf 2023] Rails as a piece of cake
palkan
52
4.9k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Building an army of robots
kneath
302
43k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
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͕ؔΘ͍ͬͯΔͷਖ਼…
͓ΘΓ