Skip to content

An extensible, flexible plugin system written in Python

License

Notifications You must be signed in to change notification settings

Times-0/-Plugins

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

-Plugins

An extensible, flexible plugin system written in Python

Example usage, with requirements

from Plugins.IPlugin import IPlugin, IPluginAbstractMeta
from Example import Example

class TestPlugin(IPlugin):

    requirements = [
        {
            "name" : "ExamplePlugin",
            "code" : "",
            "developer" : "Dote",
            "version" : 0
        }
    ]

    name = "Test Plugin"

    def __init__(self, engine):
        super(TestPlugin, self).__init__(engine)

MyPlugin = TestPlugin(None)

Example usgae, with extensibility

from Plugins.IPlugin import IPlugin, IPluginAbstractMeta
from Plugins.Abstract import ExtensibleObject
from Plugins import extend
from Example import Example

class Extensible(ExtensibleObject):

    extend = True

class Test(IPlugin):

    __metaclass__ = IPluginAbstractMeta

    @classmethod
    def onBuild(cls):
        print Receiver.__bases__
        extend(Extensible, cls)
        extend(Receiver, cls)

    def cool(self):
        print 'cool'

# test
a = Extensible()
a.cool()

About

An extensible, flexible plugin system written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages