@contextmanager
def run_services(config, *services, **kwargs):

    container_cls = kwargs.pop('container_cls', ServiceContainer)
    worker_ctx_cls = kwargs.pop('worker_ctx_cls', WorkerContext)
    kill_on_exit = kwargs.pop('kill_on_exit', False)

    runner = ServiceRunner(config, container_cls=container_cls)
    for service in services:
        runner.add_service(service, worker_ctx_cls=worker_ctx_cls)

    runner.start()

    yield runner

    if kill_on_exit:
        runner.kill()
    else:
        runner.stop()
Serves a number of services for a contextual block.
dataset/ETHPy150Open onefinestay/nameko/nameko/runners.py/run_services