init(config,
opts,
args,
services,
module=' __svc__ ' )
| source code
|
Initialize services
The function can only be called once (because the module will be only
initialized once)
- Parameters:
config (wtf.config.Config) - Configuration
opts (optparse.OptionContainer) - Command line options
args (list) - Positioned command line arguments
services (iterable) - List of services to initialize. The list items can either
be classes (which are instanciated) or strings containing dotted class
names (which will be loaded and instanciated). Service classes must
implement the ServiceInterface.
module (str) - Dotted module name, where global services are put into
- Returns: ServiceManager
- Service manager
|