Saturnin recipes


class saturnin.component.recipe.RecipeType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Recipe type.

BUNDLE = 'bundle'
SERVICE = 'service'
class saturnin.component.recipe.RecipeExecutionMode(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: Enum

Recipe execution mode.

DAEMON = 'daemon'
NORMAL = 'normal'


saturnin.component.recipe.recipe_registry: RecipeRegistry

Saturnin recipe registry


class saturnin.component.recipe.SaturninRecipe[source]

Bases: Config

Saturnin recipe descriptor - configuration section.

application: UUIDOption

Application (if any)

description: StrOption


execution_mode: EnumOption

Recipe execution mode - RecipeExecutionMode enum.

executor: PathOption

Recipe executor (container). If not provided, the default executor according to recipe type is used.

recipe_type: EnumOption

Recipe type - RecipeType enum.

class saturnin.component.recipe.RecipeInfo(name: str, recipe_type: RecipeType, execution_mode: RecipeExecutionMode, executor: Path, application: UUID, description: str, filename: Path)[source]

Bases: Distinct

Dataclass recipe information record stored in recipe registry.

  • name (str) – Recipe name

  • recipe_type (RecipeType) – Recipe type

  • execution_mode (RecipeExecutionMode) – Recipe execution mode

  • executor (Path) – Recipe executor

  • application (UUID) – Application to be used

  • description (str) – Recipe description

  • filename (Path) – Path to recipe file

get_key() Hashable[source]

Returns service UID

Return type:


application: UUID

Application to be used

description: str

Recipe description

execution_mode: RecipeExecutionMode

Recipe execution mode

executor: Path

Recipe executor

filename: Path

Path to recipe file

name: str

Recipe name

recipe_type: RecipeType

Recipe type

class saturnin.component.recipe.RecipeRegistry(data: Mapping | Sequence | Registry = None)[source]

Bases: Registry

Saturnin recipe registry.

Holds RecipeInfo instances.


data (Union[Mapping, Sequence, Registry]) –

load_from(directory: Path, *, ignore_errors: bool = False) None[source]

Populate registry from descriptors of installed recipes.

  • directory (Path) – Directory with recipe files.

  • ignore_errors (bool) – When True, errors are ignored, otherwise Error is raised.

Return type: