SDK of CEK (Clova Extension Kit) for Python
All the structure and ideas were copied after seeing flask-ask
# setup requires will automatically installed in version >= 0.0.4
# pip install PyYAML
# pip install Flask
pip install flask_clova
from flask import Flask
from flask_clova import Clova, statement, question, say
app = Flask(__name__)
# must set CLOVA_VERIFY_REQUESTS False
# while testing wihtout application_id
# app.config['CLOVA_VERIFY_REQUESTS'] = False
clova = Clova(app, '/user_defined')
@clova.launch
def launch():
return question(say.Korean('시작했습니다'))
@clova.intent('HelloIntent')
def play_game():
speech = "안녕하세요"
return statement(say.Korean(speech)).add_speech(say.English("Hello"))
if __name__ == "__main__":
app.config['CLOVA_VERIFY_REQUESTS'] = False
app.run(port='5000', debug=True)
>> pip install -r requirements-dev.txt
>> python -m unittest discover test/