base Package

base Package

manager Module

class lemur.plugins.base.manager.PluginManager(class_list=None, instances=True)

Bases: lemur.common.managers.InstanceManager

all(version=1, plugin_type=None)

Returns a list of cached instances.

first(func_name, *args, **kwargs)
get(slug)
register(cls)
unregister(cls)

v1 Module

class lemur.plugins.base.v1.IPlugin

Bases: _thread._local

Plugin interface. Should not be inherited from directly. A plugin should be treated as if it were a singleton. The owner does not control when or how the plugin gets instantiated, nor is it guaranteed that it will happen, or happen more than once. >>> from lemur.plugins import Plugin >>> >>> class MyPlugin(Plugin): >>> def get_title(self): >>> return ‘My Plugin’ As a general rule all inherited methods should allow **kwargs to ensure ease of future compatibility.

author = None
author_url = None
can_disable = True
conf_key = None
conf_title = None
description = None
enabled = True
get_conf_key()

Returns a string representing the configuration keyspace prefix for this plugin.

get_conf_title()

Returns a string representing the title to be shown on the configuration page.

get_description()

Returns the description for this plugin. This is shown on the plugin configuration page. >>> plugin.get_description()

static get_option(name, options)
get_resource_links()

Returns a list of tuples pointing to various resources for this plugin. >>> def get_resource_links(self): >>> return [ >>> (‘Documentation’, ‘https://lemur.readthedocs.io’), >>> (‘Bug Tracker’, ‘https://github.com/Netflix/lemur/issues’), >>> (‘Source’, ‘https://github.com/Netflix/lemur’), >>> ]

get_title()

Returns the general title for this plugin. >>> plugin.get_title()

is_enabled()

Returns a boolean representing if this plugin is enabled. If project is passed, it will limit the scope to that project. >>> plugin.is_enabled()

options = {}
resource_links = ()
slug = None
title = None
version = None
class lemur.plugins.base.v1.Plugin

Bases: lemur.plugins.base.v1.IPlugin

A plugin should be treated as if it were a singleton. The owner does not control when or how the plugin gets instantiated, nor is it guaranteed that it will happen, or happen more than once.

class lemur.plugins.base.v1.PluginMount

Bases: type