peek_plugin_base¶
(M) PeekPlatformCommonHookABC¶
-
class
peek_plugin_base.PeekPlatformCommonHookABC.
PeekPlatformCommonHookABC
[source]¶ Bases:
object
-
getOtherPluginApi
(pluginName: str) → Optional[object][source]¶ Get Other Plugin Api
Asks the plugin for it’s api object and return it to this plugin. The API returned matches the platform service.
Parameters: pluginName – The name of the plugin to retrieve the API for Returns: An instance of the other plugins API for this Peek Platform Service.
-
serviceId
¶ Service ID
Return a unique identifier for this service.
-
(M) PeekPlatformFileStorageHookABC¶
-
class
peek_plugin_base.PeekPlatformFileStorageHookABC.
PeekPlatformFileStorageHookABC
[source]¶ Bases:
object
Peek Platform File Storage Hook
This ABC provides methods allowing plugins to use the file system.
Though there is nothing in place to prevent the plugins doing what ever they like, they should play nice and get their allocated path from here.
-
fileStorageDirectory
¶ File Storage Directory
This method returns a Path object providing access to the managed file storage location where the plugin can persistently store any files it wants to.
See https://docs.python.org/3/library/pathlib.html#basic-use
Returns: The plugins managed storage Path object.
-
(M) PeekPlatformServerInfoHookABC¶
-
class
peek_plugin_base.PeekPlatformServerInfoHookABC.
PeekPlatformServerInfoHookABC
[source]¶ Bases:
object
Peek Platform Server Info Hook
This ABC provides information for plugins that want to connect to their own code running on the server service, via the inter peek service HTTP.
-
peekServerHost
¶ Peek Server Host
Returns: The IP address of the server where the peek server service is running.
-
peekServerHttpPort
¶ Peek Server HTTP Port
Returns: The TCP Port of the Peek Servers HTTP Service (not the admin webapp site)
-
(M) PeekVortexUtil¶
-
peek_plugin_base.PeekVortexUtil.
peekAdminName
= 'peek-admin'¶ The vortex name for the Admin browser client
-
peek_plugin_base.PeekVortexUtil.
peekAgentName
= 'peek-agent'¶ The vortex name for the Agent service
-
peek_plugin_base.PeekVortexUtil.
peekClientName
= 'peek-client'¶ The vortex name for the Client service
-
peek_plugin_base.PeekVortexUtil.
peekDesktopName
= 'peek-desktop'¶ The vortex name for the Desktop browser clients
-
peek_plugin_base.PeekVortexUtil.
peekMobileName
= 'peek-mobile'¶ The vortex name for the Mobile device/browser clients
-
peek_plugin_base.PeekVortexUtil.
peekServerName
= 'peek-server'¶ The vortex name for the Server service
-
peek_plugin_base.PeekVortexUtil.
peekWorkerName
= 'peek-worker'¶ The vortex name for the Worker service
(M) PluginCommonEntryHookABC¶
-
class
peek_plugin_base.PluginCommonEntryHookABC.
PluginCommonEntryHookABC
(pluginName: str, pluginRootDir: str)[source]¶ Bases:
object
-
load
() → None[source]¶ Load
This will be called when the plugin is loaded, just after the db is migrated. Place any custom initialiastion steps here.
-
name
¶ Plugin Name
Returns: The name of this plugin
-
packageCfg
¶ Package Config
Returns: A reference to the plugin_package.json loader object (see json-cfg)
-
rootDir
¶ Plugin Root Dir
Returns: The absolute directory where the Plugin package is located.
-
stop
() → None[source]¶ Stop
This method is called by the platform to tell the peek app to shutdown and stop everything it’s doing
-
title
¶ Peek App Title :return the title of this plugin
-
(M) PluginPackageFileConfig¶
-
class
peek_plugin_base.PluginPackageFileConfig.
PluginPackageFileConfig
(pluginRootDir: str)[source]¶ Bases:
object
This class helps with accessing the config for the plugin_package.json
Constructor
Parameters: pluginRootDir – The root directory of this package, where plugin_package.json lives.
-
config
¶ Config
Returns: The jsoncfg config object, for accessing and saving the config.
-