mycroft.skills package

mycroft.skills.mycroft_skill module

class mycroft.skills.mycroft_skill.MycroftSkill(intent_manager)[source]

Bases: object

Base class for all Mycroft skills

add_result(key, value)[source]
Adds a result from the skill. For example:
self.add_result(‘time’, ‘11:45 PM’)
Except, of course, ‘11:45 PM’ would be something generated from an API
Results can be both general and granular. Another example:
self.add_result(‘time_seconds’, 23)
create_handler(handler, skill_name=None)[source]

Wrap the skill handler to return added results

register_fallback(handler)[source]

Same as register_intent except the handler only receives a query and is only activated when all other Mycroft intents fail

register_intent(name, handler)[source]

Set a function to be called when the intent called ‘name’ is activated In this handler the skill should receive a dict called intent_data and call self.add_result() to add output data. Nothing should be returned from the handler