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
Alexa Skills kit SDK for Python を使ってみた
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Ippei Sumida
September 03, 2018
Programming
440
0
Share
Alexa Skills kit SDK for Python を使ってみた
AAJUG Vol.2でLTしたスライドです。 #aajug
Ippei Sumida
September 03, 2018
More Decks by Ippei Sumida
See All by Ippei Sumida
DROBEの生成AI活用事例 with AWS
ippey
0
320
みんなでQAしてる話
ippey
0
170
AIで生成したものをAIでチェックしてる話
ippey
0
2.3k
『WordPressコミュニティで学ぶ』OSS貢献の多様性
ippey
0
1.3k
25分で理解する!Symfonyの魅力とその実践的活用法
ippey
1
7.7k
素早いバリュー提供のための DROBEの新戦略
ippey
0
1.4k
Symfony 6.3のおすすめ新機能まとめ
ippey
1
2.1k
PhpStorm + GitHub Copilotはいいぞ
ippey
0
3.2k
それぞれの特徴から考えるフレームワーク選び
ippey
1
1.1k
Other Decks in Programming
See All in Programming
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
120
Stage 3 Decorators でできること / できないこと / TSKaigi 2026
susisu
0
120
UaaL×Androidアプリのメモリ計測 — Memory Profilerの先へ
rio432
0
160
書き換えて学ぶTemporal #fukts
pirosikick
2
380
cloudnative conference 2026 flyle
azihsoyn
1
190
プラグインで拡張される Context をtype-safe にする難しさと設計判断
kazupon
1
190
開発とはなにか、Essenceカーネルで見えるもの
ukin0k0
0
190
(Re)make Regexp in Ruby: Democratizing internals for the JIT
makenowjust
3
1.1k
GoogleCloudとterraform完全に理解した
terisuke
1
200
次世代リンターで探る、tsgo 時代における型認識カスタムルールの現実解
ytakahashii
0
160
エラー処理の温故知新 / history of error handling technic
ryotanakaya
7
1.9k
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
140
Featured
See All Featured
Paper Plane
katiecoart
PRO
1
50k
ラッコキーワード サービス紹介資料
rakko
1
3.3M
My Coaching Mixtape
mlcsv
0
130
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
140
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.8k
Unsuck your backbone
ammeep
672
58k
The Spectacular Lies of Maps
axbom
PRO
1
750
Crafting Experiences
bethany
1
150
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.5k
The browser strikes back
jonoalderson
0
1.1k
Transcript
Alexa Skills kit SDK for Python ΛͬͯΈͨ 2018.09.03 AAJUG #2
# whoami - ֯ాɹҰฏʢ͢Έͩɹ͍͍ͬʣ - ϑϦʔϥϯε - PHPͱ͔ - CoderDojoຕํͬͯ·͢
- Alexa Skill Contest Լ͔Β͑ͯ2Ґ
※ͬͯΈͨϨϕϧͰ͢ɻ ʢ·ͩεΩϧ࡞ͬͯΔ్தʣ
None
None
͍ͭ࠷ۙެ͔ࣜΒ Python༻ͷSDK͕ൃදʂ
Requirement • Python 2.7, Python 3.6Ҏ্ • VirtualenvʢԾڥߏஙπʔϧʣ • Lambda͕͑Δ
What’s Python ?
Python • ίʔυ͕γϯϓϧ • ίʔυྔ͕গͳ͍ • Մಡੑ͕ߴ͍
ͬͯΈͨ
Πϯετʔϧ virtualenv skill source skill/bin/activate pip install ask-sdk
from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.dispatch_components import AbstractRequestHandler from ask_sdk_model.ui
import SimpleCard from ask_sdk_core.utils import is_intent_name, is_request_type class HelloWorldIntentHandler(AbstractRequestHandler): def can_handle(self, handler_input): return is_request_type("IntentRequest") and is_intent_name("HelloWorldIntent") def handle(self, handler_input): speech_text = "Hello World"; return handler_input.response_builder.speak(speech_text).set_card( SimpleCard("Hello World", speech_text)).response sb = SkillBuilder() sb.request_handlers.extend([ HelloWorldIntentHandler() ]) handler = sb.lambda_handler() Ϋϥεόʔδϣϯ
from ask_sdk_core.skill_builder import SkillBuilder from ask_sdk_core.utils import is_intent_name from ask_sdk_model.ui
import SimpleCard sb = SkillBuilder() @sb.request_handler(can_handle_func=is_intent_name("HelloWorldIntent")) def hello_world_intent_handler(handler_input): speech_text = "Hello World!" return handler_input.response_builder.speak(speech_text).set_card( SimpleCard("Hello World", speech_text)).response handler = sb.lambda_handler() σίϨʔλʔόʔδϣϯ
ʢݸਓతʹʣ ݟ௨͕͠ྑ͍ʂ
ख์͠Ͱتͳ͍
lambdaͷΞοϓϩʔυ ϑΝΠϧ࡞
node.jsͷ߹
cd /path/to/project zip project.zip .
6.5MB
Pythonͷ߹
cd /path/to/project zip project.zip project.py cd venv/lib/python3.6/site-packages zip -r9g /path/to/project/project.zip
.
12.2MB
Node.js > Python खؒతʹ
Node.js < Python ݸਓతʹ