Last active
August 29, 2015 13:56
-
-
Save mtomwing/8890555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import abc | |
class Plugin(object): | |
'''This is the base class. It'll take care of all the lower level stuff.''' | |
__metaclass__ = abc.ABCMeta | |
class OutputPlugin(Plugin): | |
'''This class defines an interface for a "type" of plugin.''' | |
@abc.abstractmethod | |
def some_method_that_this_type_will_need_to_implement(self): | |
pass | |
class MyActualPlugin(OutputPlugin): | |
'''This is the kind of class that you'll see inside the plugin modules.''' | |
def some_method_that_this_type_will_need_to_implement(self): | |
do_work() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment