pyworkflow.plugin module

class pyworkflow.plugin.Domain[source]

Class to represent the application domain. It will allow to specify new objects, protocols, viewers and wizards through the registration of new plugins.

classmethod getModuleClasses(module)[source]
classmethod getName()[source]
classmethod getObjects()[source]

Return all EMObject subclasses from all plugins for this domain.

classmethod getPlugin(name)[source]

Load a given plugin name.

classmethod getPlugins()[source]

Return existing plugins for this Domain.

classmethod getProtocols()[source]

Return all Protocol subclasses from all plugins for this domain.

classmethod getViewers()[source]

Return all Viewer subclasses from all plugins for this domain.

classmethod getWizards()[source]

Return all Wizard subclasses from all plugins for this domain.

classmethod refreshPlugin(name)[source]

Refresh a given plugin name.

classmethod registerPlugin(name)[source]

Register a new plugin. This function should only be called when creating a class with __metaclass__=PluginMeta that will trigger this.

class pyworkflow.plugin.Plugin[source]

Bases: object

classmethod defineBinaries(env)[source]

Define required binaries in the given Environment.

classmethod getActiveVersion(home=None, versions=None)[source]

Return the version of the binaries that are currently active. In the current implementation it will be inferred from the *_HOME variable, so it should contain the version number in it.

classmethod getEnviron()[source]

Setup the environment variables needed to launch programs.

classmethod getHome(*paths)[source]

Return a path from the “home” of the package if the _homeVar is defined in the plugin.

classmethod getSupportedVersions()[source]

Return the list of supported binary versions.

classmethod getVar(varName, defaultValue=None)[source]

Return the value of a given variable.

classmethod getVars()[source]

Return the value of a given variable.

classmethod validateInstallation()[source]

Check if the binaries are properly installed and if not, return a list with the error messages.

The default implementation will check if the _pathVars exists.

class pyworkflow.plugin.PluginInfo(name)[source]

Information related to a given plugin when it is installed via PIP

getAuthor()[source]
getAuthorEmail()[source]
getHomePage()[source]
getKeywords()[source]