Just another one of my crazy ideas.
Easy and simple mornings. Listen to TechCrunch, and chill out to your git feed updates.
I'll be providing two methods of setup, one locally, the other one by using zappa to deploy to AWS.
-
In order to deploy to via zappa, you need to make a virtual environment. Create one via the command virtualenv venv.
-
After creating the virtual environment, you need to cd into the venv directory by running the command cd venv.
-
Then, you need to install dependencies. You need to install flask-ask, zappa, and awscli. sudo pip install flask-ask zappa awscli. If you get an error, install all dependencies but awscli and run the command sudo -H pip install awscli --upgrade --ignore-installed six to install awscli.
-
Make sure the venv is up and running, then run the command aws configure. After running that command, make sure to get the proper credentials from the AWS IAM console. After getting those credentials, put it into your terminal via plaintext and make sure to confirm all defaults, unless you want to run your aws console on some other server other than us-east-1.
-
Move all the fies into your the directory with the venv folder. This is the code that will be run.
-
Don't forget to grab your API keys.
You need to first create a keys.py file which will store your API keys and Git usernames. Grab a newsapi key here. Create two methods, one called techAPI, and the other called gitUsername. Below is an example:
def gitUsername():
return "copperstick6"
def techAPI():
return "yourAPIKeyHere"
-
Afterwards, run zappa init. This will get your server initialized. Make sure that zappa knows what the entry point of the program is and also make sure to call your program something, I've called it dev.
-
After running zappa init, make sure to deploy it. Run zappa deploy dev.
You need to first create a keys.py file which will store your API keys and Git usernames. Grab a newsapi key here. Create two methods, one called techAPI, and the other called gitUsername. Below is an example:
def gitUsername():
return "copperstick6"
def techAPI():
return "yourAPIKeyHere"
This utilizes python2.7. Make sure to pip install -r requirements.txt to install requirements and then open up a console and type the command python app.py to run the server locally
Run ./ngrok http 5000 in console on mac. IDK what it is on windows.
Create a new Alexa app through the Amazon Developer Console. Name it whatever you want, invocation name is how you will run the app.
Go to interaction model (click next). Copy the contents of interactionmodel.txt and paste it into the first box, called intent schema. Copy the contents of utterances.txt and paste it into the third box, called sample utterances. This is how Alexa will respond/choose what method to call. Click Next.
The Configuration is pretty important. Click HTTPS and North America, and copy the ngrok.io link found in your console that's running the ./ngrok command. It should be next to forwarding. Paste it into the box under North America. Click Next.
sudo -H pip install awscli --upgrade --ignore-installed six