Skip to content

Instantly share code, notes, and snippets.

Created September 2, 2017 17:42
What would you like to do?
Alexa ServerTech SNMPPDU Skill
import logging
from pyservertech.auth import *
from pyservertech.core import *
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
app = Flask(__name__)
app.config['ASK_VERIFY_REQUESTS'] = False
ask = Ask(app, "/")
def new_game():
welcome_msg = render_template('welcome')
return question(welcome_msg)
def select_device():
numbers = []
select_dev_msg = render_template('select_dev')
session.attributes['numbers'] = numbers
return question(select_dev_msg)
@ask.intent("AnswerIntent", convert={'first': int})
def power_on_dev(first):
myauth = STAuth('', 'public', 'private')
print (myauth)
power_on(myauth, first)
msg = render_template('poweron')
return statement(msg)
if __name__ == '__main__':
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment