skillful
|PyPIVersion| |BuildStatus| |Coverage|
A Python package for building Amazon Alexa skills.
Features
Request and response objects for custom skills
Simple definition of response logic for each request type
Built-in request parsing/validation, intent dispatch, and response construction
Installation
pip install skillful
Example
import skillful
from skillful.tests import data
application_id = 'amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe'
skill = skillful.Skill(application_id)
@skill.launch
def on_launch():
print('Launched: {}'.format(skill.request.session.session_id))
text = 'Welcome to skillful. Would you like to build an Alexa skill?'
skill.response.set_speech_text(text)
ssml = ('<speak>Please tell me if you would like to build an Alexa '
'skill.</speak>')
skill.response.set_reprompt_ssml(ssml)
@skill.intent('yes')
def on_intent_yes():
text = ('Great! Building Alexa skills is easy with skillful. Open '
'the Alexa app to see more information on skillful, a '
'Python package for building Alexa skills.')
skill.response.set_speech_text(text)
title = 'skillful'
content = ('A Python package for building Alexa skills.\n\n'
'Visit: https://github.com/bmweiner/skillful')
skill.response.set_card_simple(title, content)
skill.terminate()
@skill.intent('no')
def on_intent_no():
text = ('Well, if you change your mind, open the Alexa app to see '
'more information on skillful, a Python package for '
'building Alexa skills.')
skill.response.set_speech_text(text)
title = 'skillful'
content = ('A Python package for building Alexa skills.\n\n'
'Visit: https://github.com/bmweiner/skillful')
skill.response.set_card_simple(title, content)
skill.terminate()
@skill.session_ended
def on_session_ended():
print('Ended: {}'.format(skill.request.session.session_id))
skill.terminate()
# simulate request body
body = data.SAMPLE_LAUNCH_REQUEST
skill.process(body)
Output:
Launched: amzn1.echo-api.session.0000000-0000-0000-0000-00000000000
{
"version": "1.0",
"response": {
"outputSpeech": {
"text": "Welcome to skillful. Would you like to build an Alexa skill?",
"type": "PlainText"
},
"shouldEndSession": false,
"reprompt": {
"outputSpeech": {
"ssml": "<speak>Please tell me if you would like to build an Alexa skill.</speak>",
"type": "SSML"
}
}
}
}
Metadata
Release files for skillful 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| skillful-0.8.2.tar.gz | 21.1 kB | Without provenance | Details for skillful-0.8.2.tar.gz |
Release files / skillful-0.8.2.tar.gz
| Download URL | skillful-0.8.2.tar.gz |
|---|---|
| Size | 21.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3d6597dc21032ec6e59745cd49c215ef3489226f01cd4e08884031587bfe077f
|
|
BLAKE2b-256 checksum How to use checksums |
bbba821ceba71ce2a08e292625854ddd3cd53ccc762499eecf74e1fc69a19600
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for skillful 0.8.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.