api_24sea.singleton#

Singleton pattern implementation for lazy-loading modules.

This module provides a Singleton class that allows lazy-loading of modules. The Singleton instance is used as a namespace for the modules that are imported. When an attribute is accessed, the corresponding module is imported and stored in the _modules

This pattern is particularly useful when the modules are not always needed, and importing them would slow down the startup time of the application, or when there are extra dependencies that are not always required.

Classes#

SingletonBase

Singleton pattern implementation for lazy-loading modules.

Module Contents#

class SingletonBase#

Singleton pattern implementation for lazy-loading modules.