service — YellowService Main ABC


Yellowbox’s main feature is its YellowService, which allows virtualization of other services, such as RabbitMQ, Redis, Kafka and more. Each service has its own set of operations, might run in a docker container or locally, but they all inherit from YellowService and are treated as containerized units.

class service.YellowService[source]

Abstract base class for defining external services.

YellowServices can be used as context managers. For example:

with YellowService().start() as service:
    service.do_stuff()

Service will automatically stop upon leaving the context manager.

abstract start() YellowService[source]

Start the service.

This method should block until the service is fully up and running.

Returns the service itself.

abstract stop()[source]

Stop the service.

This method should block until the service is fully stopped.

abstract is_alive() bool[source]

Returns whether the service is currently running.