PluginManager class for managing plugins.
| Class | |
Dataclass to hold information about a dependency. |
| Class | |
Dataclass to hold runtime information, metadata about a plugin, and state management. |
| Class | |
PluginManager class. |
| Class | |
Plugin states. |
| Class | |
Base class for service classes. |
| Exception | |
Raised when a dependency resolution fails. |
| Exception | |
Raised when a plugin is not configured correctly. |
| Exception | |
Base class for all plugin system errors. |
| Function | configure |
Decorator to mark configuration functions in plugins. |
| Function | endpoint |
Decorator to mark a method as an endpoint for a Service. The service name of the endpoint is given as an argument. |
| Function | finish |
Decorator to mark finalization functions in plugins. |
| Function | init |
Decorator to mark initialization functions in plugins. |
| Function | on |
Decorator to mark a method as a callback to be called when the plugin or class becomes resolved. |
| Function | on |
Decorator to mark a method as a callback to be called when the plugin or class becomes unresolved. |
| Function | pause |
Decorator to mark pause functions in plugins. |
| Function | plugin |
Decorator to mark plugin classes in plugins. |
| Function | provide |
Decorator to mark a function as provided function that can be called by other plugins or external code. |
| Function | requires |
Class decorator to mark plugin and other classes with dependencies. |
| Function | restart |
Decorator to mark restart functions in plugins. |
| Function | start |
Decorator to mark start functions in plugins. |
| Function | stop |
Decorator to mark stop functions in plugins. |
| Function | unpause |
Decorator to mark unpause functions in plugins. |
| Function | validate |
Decorator to mark validation functions in plugins. |
| Type Alias | |
Type alias for a dependency graph. The keys are (plugin) classes or names, and the values are lists of dependencies. |
| Variable | dependencies |
Dictionary to hold the dependencies of plugin and other classes. |
| Variable | dependent |
Dictionary to hold the classes that depend on a plugin or other class. These are classes that have a @requires decorator attached. |
| Variable | provided |
Dictionary to hold the provided functions. The keys are the function paths, the values are the functions themselves. |
| Variable | service |
Dictionary to hold the service classes. The keys are the service names, the values are the service classes. |
| Function | _wrap |
Helper function to wrap a function and set a tag attribute to the wrapper function. |
| Variable | _tag |
Internal tag to specify the endpoint map of the plugin. |
| Variable | _tag |
Internal tag to specify the endpoints of the plugin. |
| Variable | _tag |
Internal tag to specify the attribute name under which the plugin instance should be accessible in the PluginManager. |
| Variable | _tag |
Internal tag to specify the priority of the plugin. Lower values mean higher priority. |
| Variable | _tag |
Internal tag to specify the tags of the plugin. |
| Variable | _tag |
Internal tag to specify that the plugin should not be restarted while paused. |
| Variable | _tag |
Internal tag to identify plugin classes and methods. |
Decorator to mark a method as an endpoint for a Service. The service name of the endpoint is given as an argument.
str | ClassVar = None, priority: int = 50, tags: list[ str] = [], noRestartWhilePaused: bool = False) -> ClassVar:
¶
Decorator to mark plugin classes in plugins.
| Parameters | |
property:str | ClassVar | Optional name for the plugin instance. If a class is given here, it is treated directly as the class to decorate. |
priority:int | The priority of the plugin. It determines the order in which plugins are started, stopped, etc. Lower values mean higher priority. |
tags:list[ | Optional list of tags to attach to the plugin for easier identification and filtering. |
nobool | Flag to indicate whether the plugin should not restart while paused. |
| Returns | |
ClassVar | The class with the plugin class tag set. |
Decorator to mark a function as provided function that can be called by other plugins or external code.
It can be injected as a dependency into other plugins or classes using the @requires decorator, by using the function path as the plugin name in the dependency.
Class decorator to mark plugin and other classes with dependencies.
| Parameters | |
*args:Any | Positional arguments to pass to the plugin decorator. |
**kwargs:Any | Keyword arguments to pass to the plugin decorator. |
| Returns | |
Callable | The class. |
Type alias for a dependency graph. The keys are (plugin) classes or names, and the values are lists of dependencies.
| Value |
|
Dictionary to hold the classes that depend on a plugin or other class. These are classes that have a @requires decorator attached.
- The keys are the classes, the values are tuples containing the names of the plugins they depend
- on and a boolean indicating whether the dependency is resolved.
Dictionary to hold the provided functions. The keys are the function paths, the values are the functions themselves.
Dictionary to hold the service classes. The keys are the service names, the values are the service classes.
Helper function to wrap a function and set a tag attribute to the wrapper function.
| Parameters | |
func:Callable | The function to wrap. |
tagstr | The tag value to set to the wrapper function. |
| Returns | |
Callable | The wrapped function. |
Internal tag to specify the attribute name under which the plugin instance should be accessible in the PluginManager.