(M) PeekPlatformCommonHookABC

class peek_plugin_base.PeekPlatformCommonHookABC.PeekPlatformCommonHookABC[source]

Bases: object

getOtherPluginApi(pluginName: str) → 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.

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.


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.


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.


Peek Server Host

Returns:The IP address of the server where the peek server service is running.

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.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.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]


This will be called when the plugin is loaded, just after the db is migrated. Place any custom initialiastion steps here.


Plugin Name

Returns:The name of this plugin

Package Config

Returns:A reference to the plugin_package.json loader object (see json-cfg)

Plugin Root Dir

Returns:The absolute directory where the Plugin package is located.
start() → None[source]


This method is called by the platform when the plugin should start

stop() → None[source]


This method is called by the platform to tell the peek app to shutdown and stop everything it’s doing


Peek App Title :return the title of this plugin

unload() → None[source]


This method is called after stop is called, to unload any last resources before the PLUGIN is unlinked from the platform

(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


Parameters:pluginRootDir – The root directory of this package, where plugin_package.json




Returns:The jsoncfg config object, for accessing and saving the config.