Module plugins.console.Platform
Expand source code
from pydantic.class_validators import validator
from modules.base.Configuration import *
from modules.base.Instances import *
@configuration
class ConsolePlatformConfiguration(PlatformConfiguration):
'''Allows to output text to the Console, no configuration needed'''
@validator('platform')
def check_platform(cls, v):
if "plugins.console" not in v:
raise ValueError("wrong platform: plugins.console, is: " + v)
return v
class Platform(BasePlatform):
'''Console Platform'''
def __init__(self, parent: Stackable, config: ConsolePlatformConfiguration) -> None:
super().__init__(parent, config)
def dispose(self):
return super().dispose()
Classes
class ConsolePlatformConfiguration (**data: Any)-
Allows to output text to the Console, no configuration needed
YAML configuration
Expand source code
@configuration class ConsolePlatformConfiguration(PlatformConfiguration): '''Allows to output text to the Console, no configuration needed''' @validator('platform') def check_platform(cls, v): if "plugins.console" not in v: raise ValueError("wrong platform: plugins.console, is: " + v) return vAncestors
- PlatformConfiguration
- StackableConfiguration
- IdConfiguration
- VariablesConfiguration
- Configuration
- pydantic.main.BaseModel
- pydantic.utils.Representation
Static methods
def check_platform(v)-
Expand source code
@validator('platform') def check_platform(cls, v): if "plugins.console" not in v: raise ValueError("wrong platform: plugins.console, is: " + v) return v
Inherited members
class Platform (parent: Stackable, config: ConsolePlatformConfiguration)-
Console Platform
Expand source code
class Platform(BasePlatform): '''Console Platform''' def __init__(self, parent: Stackable, config: ConsolePlatformConfiguration) -> None: super().__init__(parent, config) def dispose(self): return super().dispose()Ancestors
Methods
def dispose(self)-
Expand source code
def dispose(self): return super().dispose()
Inherited members