-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: barebones template application
- Loading branch information
Showing
6 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
18 changes: 18 additions & 0 deletions
18
examples/template_application/configuration/application_configuration.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; This is a template application configuration file for a DigitalPy application. | ||
; The application configuration will configure object in the ConfigurationFactory. | ||
; These objects will store configuration data and can be used by the application. | ||
; Some configuration objects are used to configure components, and others are used to configure services. | ||
; Below is an example of a service configuration for a simple TCP service. | ||
; [dp_application.simple_tcp] | ||
; __class = digitalpy.core.service_management.domain.model.service_configuration.ServiceConfiguration | ||
; status = STOPPED | ||
; name = SimpleTCPService | ||
; port = 8443 | ||
; host = 0.0.0.0 | ||
; protocol = TCPNetwork | ||
|
||
; The application configuration file must be updated to include the service configuration of any new services. | ||
; For example, the following configuration will add a new service configuration for a simple TCP service. | ||
; [ServiceManagementConfiguration] | ||
; __class = digitalpy.core.service_management.domain.model.service_management_configuration.ServiceManagementConfiguration | ||
; services = [dp_helloworld.simple_tcp] |
15 changes: 15 additions & 0 deletions
15
examples/template_application/configuration/object_configuration.ini
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; This is the object configuration file for your DigitalPy Application | ||
; You can define your objects here and use them in your application | ||
; via the ObjectFactory. New objects can be added by creating a new | ||
; section and defining the object's properties and class. For example: | ||
; [my_new_object] | ||
; __class = my_app.my_module.MyClass | ||
; named_init_arg1 = value1 | ||
; named_init_arg2 = value2 | ||
|
||
; You can also update the configuration defaults of the digitalpy framework, | ||
; by adding a new section and defining the properties you want to override. | ||
; For example: | ||
;[digitalpy.core_api] | ||
;blueprint_path = NewPath/To/My/blueprints/ | ||
;blueprint_import_base = MyDifferentRoute.blueprints |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
""" | ||
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 | ||
|
||
|
||
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() | ||
|
||
if __name__ == "__main__": | ||
# Entry point for the DigitalPy application. | ||
# | ||
# This block ensures that the application starts only when executed as a script. | ||
DigitalPyApp().start() |
Empty file.