context
dev_tool.context
CONTEXT = AppContext()
module-attribute
AppContext
A context object that holds shared dependencies.
This class encapsulates shared dependencies, such as configuration management and notifications that are used across the app.
The constructor for the AppContext class.
Initializes shared dependencies including configuration, notification service, event bus, and event manager.
Source code in dev_tool/context.py
configuration
instance-attribute
notification
instance-attribute
event_bus
instance-attribute
event_manager
instance-attribute
__new__
A class method that ensures singleton instance creation.
Returns:
-
–
The singleton AppContext instance.
Source code in dev_tool/context.py
get_configuration_manager
A method that gets the configuration manager instance.
Returns:
-
ConfigManager–The configuration manager instance.
get_event_bus
get_event_manager
A method that gets the event manager instance.
Returns:
-
AppEventManager–The application event manager instance.
get_notification_manager
A method that creates and returns a notification manager instance.
Parameters:
-
terminal(Terminal) –The blessed Terminal instance for display operations.
Returns:
-
NotificationManager–A configured notification manager instance.
Source code in dev_tool/context.py
get_notification_service
A method that gets the notification service instance.
Returns:
-
NotificationService–The notification service instance.