pymasep.app
Classes
Main application class. |
Module Contents
- class pymasep.app.App(interface_class_, root_path='.', config_path='config', launch=LAUNCH_ALL_LOCAL, remote_engine_host=None, remote_engine_port=None)
Main application class.
- Parameters:
interface_class – class of the interface
root_path (str) – path of the application root directory. Used for testing and packaging
config_path (str) – path of the config files, relative to the root_path
launch (int) – Type of launch (local, interface only, server only)
remote_engine_host (str) – engine host for remote interface. Maybe None for local and server only
remote_engine_port (int) – engine port for remote interface. Maybe None for local and server only
interface_class_ (Type[pymasep.interface.interface.Interface])
- LAUNCH_ALL_LOCAL = 0
Launch threaded server and interface
- LAUNCH_INTERFACE = 1
Launch only interface (remote)
- LAUNCH_SERVER_STANDALONE = 2
Launch only server (remote)
- engine = None
engine sub application
- interface = None
interface sub application
- queues
queues used to communicate between engine and interface
- interface_queue_id = 0
- engine_queue_id = 0
- max_connection = 10
- root_path
root path of the application
- config
config of the application
- static load_config(config_path)
Load config from a path. Load app.yaml file.
- Parameters:
config_path – Path of the configuration files
- Returns:
OmegaConf Configuration
- Return type:
omegaconf.DictConfig
- run()
Run the application. Launch Engine, Interface or both. Wait for termination.