MycroftAI / mycroft-core

Mycroft Core, the Mycroft Artificial Intelligence platform.
https://mycroft.ai
Apache License 2.0
6.53k stars 1.27k forks source link

Import useful classes in mycroft package #994

Closed MatthewScholefield closed 7 years ago

MatthewScholefield commented 7 years ago

This is open for discussion, but I think it is worth importing a few classes/functions in mycroft/__init__.py so that skills can do things like:

from mycroft import MycroftSkill  # vs. from mycroft.skills.core import MycroftSkil
class MySkill(MycroftSkill):
# ...

Or:


from mycroft import FallbackSkill, play_wav
class MediaFallback(FallbackSkill):
    def handle_fallback(self, message):
        # ...
        play_wav('my_song.wav')
        # ...
forslund commented 7 years ago

I think this is an excellent idea!

Message is another class that's dreadfully long to include if one wants to use:

currently

from mycroft.messagebus.message import Message