Vermont Public Radio Alexa Skill
Using Alexa AudioDirectives, it allows users to:
- play episodic (podcast) VPR programming
- stream live VPR programming including:
- VPR Live Stream
- VPR Jazz
- VPR Classical
- VPR Replay
Running the Alexa Skill
- Sets the
SECRET_KEYvalue on the Flask app. See http://flask.pocoo.org/docs/0.12/config/#builtin-configuration-values
- Sets the
- True - Flask-Ask will not confirm the request originated from Amazon (allowing you to test from any system)
- False - [Default] all requests are checked to see if they originate from Amazon
- A Heroku-like URL to a Redis instance to use for Alexa session caching.
- Note: Heroku-like means following the
redis://h:..pattern. If you add a Redis add-on via Heroku, it should automatically set this environment variable on your dyno.
The project is logically split out across a few modules:
- webapp.py - main web application logic, including Alexa Skills Kit intent handling
- programs.py - VPR programming data model, integration to VPR's podcast site for lookups
- wsgi.py - WSGI setup for running in something like gunicorn
Note: All Alexa requests target the
/ask path on the application.
The project is built to work with both Python 2.7 and Python 3.6. If you'd like to hack on the source code, it's recommended to use a Python virtual environment.
Building the Project
- Clone the project:
git clone https://github.com/vprnet/vpr-alexa-skill
- Install dependencies:
pip install -r requirements.txt
- Verify you project through testing!
- Using tox:
- Using pytest directly:
The project uses the pytest framework, keeping testing simple and straightforward.