-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.py
More file actions
53 lines (42 loc) · 1.6 KB
/
main.py
File metadata and controls
53 lines (42 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
"""
Main module for a DigitalPy application.
This script defines the main class for a DigitalPy application,
which serves as the entry point for the application.
"""
from digitalpy.core.main.DigitalPy import DigitalPy
from digitalpy.core.main.singleton_configuration_factory import (
SingletonConfigurationFactory,
)
class DigitalPyApp(DigitalPy):
"""
Main class for the DigitalPy application.
This class inherits from DigitalPy and initializes the application
with the required configuration and setup.
"""
def __init__(self):
"""
Initialize the DigitalPyApp instance.
This constructor initializes the base DigitalPy class and
configures the application by calling the _initialize_app_configuration method.
"""
super().__init__()
self._initialize_app_configuration()
def _initialize_app_configuration(self):
"""Load the application specific configuration."""
super()._initialize_app_configuration()
self.configuration.set_value(
"blueprint_import_base",
"reticulum_app.blueprints",
"digitalpy.core_api",
)
component_management_conf = (
SingletonConfigurationFactory.get_configuration_object(
"ComponentManagementConfiguration"
)
)
component_management_conf.component_import_root = "reticulum_app.components"
if __name__ == "__main__":
# Entry point for the DigitalPy application.
#
# This block ensures that the application starts only when executed as a script.
DigitalPyApp().start()