flexget.plugin module#
- exception flexget.plugin.DependencyError(issued_by=None, missing=None, message=None, silent=False)[source]#
Bases:
ExceptionPlugin depends on other plugin, but it cannot be loaded.
- Args:
issued_by: name of the plugin trying to do the import missing: name of the plugin or library that is missing message: customized user readable error message
All args are optional.
- exception flexget.plugin.PluginError(value, logger=<loguru.logger handlers=[(id=0, level=10, sink=<stderr>)]>, **kwargs)[source]#
Bases:
Exception- Parameters:
logger (loguru.Logger)
- exception flexget.plugin.PluginWarning(value, logger=<loguru.logger handlers=[(id=0, level=10, sink=<stderr>)]>, **kwargs)[source]#
Bases:
Warning- Parameters:
logger (loguru.Logger)
- class flexget.plugin.PluginInfo(plugin_class, name=None, interfaces=None, builtin=False, debug=False, api_ver=1, category=None)[source]#
Bases:
dictAllow accessing key/value pairs of this dictionary subclass via attributes.
Also instantiate a plugin and initialize properties.
- Parameters:
- dupe_counter = 0#
- class flexget.plugin.internet(logger_=<loguru.logger handlers=[(id=0, level=10, sink=<stderr>)]>)[source]#
Bases:
object@internet decorator for plugin phase methods.
Catches all internet related exceptions and raises PluginError with relevant message. Task handles PluginErrors by aborting the task.
- Parameters:
logger_ (loguru.Logger)
- flexget.plugin.register#
alias of
PluginInfo
- flexget.plugin._get_standard_components_path()[source]#
Return list of directories where component plugins should be tried to load from.
- flexget.plugin._get_standard_plugins_path()[source]#
Return list of directories where traditional plugins should be tried to load from.
- flexget.plugin._load_components_from_dirs(dirs)[source]#
- Parameters:
dirs (list) – Directories where plugin components are loaded from
- Return type:
None
- flexget.plugin._load_plugins_from_dirs(dirs)[source]#
- Parameters:
dirs (list) – Directories from where plugins are loaded from
- Return type:
None
- flexget.plugin._load_plugins_from_packages()[source]#
Load plugins installed via PIP.
- Return type:
None
- flexget.plugin.get_plugin_by_name(name, issued_by='???')[source]#
Get plugin by name, preferred way since this structure may be changed at some point.
Getting plugin via .get function is recommended for normal use.
This results much shorter and cleaner code:
plugin.get_plugin_by_name('parsing').instance.parse_movie(data=entry['title'])
Shortens into:
plugin.get('parsing', self).parse_movie(data=entry['title'])
This function is still useful if you need to access plugin information (PluginInfo).
:returns PluginInfo instance
- Parameters:
- Return type:
- flexget.plugin.get_plugins(phase=None, interface=None, category=None, name=None, min_api=None)[source]#
Query other plugins characteristics.
- Parameters:
phase (string) – Require phase
interface (string) – Plugin must implement this interface.
category (string) – Type of plugin, phase names.
name (string) – Name of the plugin.
min_api (int) – Minimum api version.
- Returns:
List of PluginInfo instances.
- Return type:
Iterable[PluginInfo]
- flexget.plugin.load_plugins(extra_plugins=None, extra_components=None)[source]#
Load plugins from the standard plugin and component paths.
- flexget.plugin.plugin_schemas(**kwargs)[source]#
Create a dict schema that matches plugins specified by kwargs.