Falcon-Ask 
Minimal Python3 toolkit to create Amazon Alexa skills with Falcon.
Builds on top of Alexa Skills Kit (ASK) to bootstrap boilerplate code so you don't have to!
Inspired by Flask-Ask and Alexandra.
Synopsis
A Falcon app might look like this.
import json
import falcon
from falcon_ask import dispatch_request, FalconAskMiddleware, respond
def intent_fn(body):
# "body" contains request POST data.
return 'Congratulations! Your new alexa skill works great.'
class AlexaResource(object):
# Dictionary mapping of "IntentRequest" to function.
intent_maps = {
'GreetingIntent': intent_fn,
}
# Message to return when "LaunchRequest" is received.
welcome = 'Hi, welcome to your new alexa skill.'
def on_post(self, req, resp):
response = dispatch_request(req)
resp.body = json.dumps(respond(response, end_session=False))
app = falcon.API(middleware=[
# Do validation of request certificate and timestamp.
FalconAskMiddleware(AlexaResource, validate=True),
])
app.add_route('/', AlexaResource())
Save above code to alexa.py and run via $ gunicorn alexa:app. Make sure gunicorn is installed.
Installation
To install Falcon-Ask, simply use pipenv (or pip, of course):
$ pip install falcon-ask
✨🍰✨
Satisfaction guaranteed.
Thank You
Thanks for checking this library out! I hope you find it useful.
Of course, there's always room for improvement. Feel free to open an issue so we can make Falcon-Ask better.
Special thanks to @muxspace for giving me an Echo Dot.
Metadata
Release files for falcon-ask 1.1.1
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 |
|---|---|---|---|---|
| falcon_ask-1.1.1.tar.gz | 4.8 kB | Without provenance | Details for falcon_ask-1.1.1.tar.gz |
Release files / falcon_ask-1.1.1.tar.gz
| Download URL | falcon_ask-1.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04cfd66568826ce192008c944d887cd6821472e5b83fd9ebae45facbeff8ce8f
|
|
BLAKE2b-256 checksum How to use checksums |
8b453f7c3a91c40828c1dd00b6485687f71cf22445ea5fc215fee59159ef1ae0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0
|
Security for falcon-ask 1.1.1
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.