Skip to main content

A Python orchestrator for Docker Compose stacks

Project description

Whaler

CI

A simple, lightweight Python orchestrator for Docker Compose stacks.

Installation

pip install -e .

CLI Reference

The whaler command executes your whaler.py file with the specified command and services.

whaler [command] [services...]

Commands

  • whaler up [services] - Start services (executes whaler.py with 'up' command)
  • whaler build [services] - Build services (executes whaler.py with 'build' command)
  • whaler down [services] - Stop services (executes whaler.py with 'down' command)

Options

  • -f, --file FILE - Path to whaler file (default: whaler.py)
  • -v, --version - Show version
  • -h, --help - Show help

Examples

# Execute whaler.py with up command
whaler up

# Build specific services
whaler build api web

# Start specific services
whaler up postgres redis

# Use custom whaler file
whaler -f custom-whaler.py up

Examples

Basic Usage

from whaler import Stack

stack = Stack("docker-compose.yml")
stack.build().up()

With Project Name

from whaler import Stack

stack = Stack(
    compose_file="docker-compose.yml",
    project_name="myapp",
    project_path="/path/to/project"
)

stack.build().up(wait=True)

Specific Services

from whaler import Stack

stack = Stack("docker-compose.yml")

# Build specific services
stack.build(["api", "web"])

# Start specific services
stack.up(["postgres", "redis"])

Interactive Script

from whaler import Stack, tui

project_name = tui.input("Project name: ", default="myproject")
environment = tui.input("Environment (dev/prod): ", default="dev")

stack = Stack(
    compose_file=f"docker-compose.{environment}.yml",
    project_name=project_name
)

stack.build().up()

Requirements

  • Python >= 3.14
  • Docker and Docker Compose installed on the system

Development

Install development dependencies:

pip install -e ".[dev]"

Run tests:

pytest

Type checking:

mypy whaler

Linting:

ruff check whaler

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orche-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

orche-0.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file orche-0.1.0.tar.gz.

File metadata

  • Download URL: orche-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for orche-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fde26d160ab3545f390b626743b4868a06721838fcaccb7fdf20c7eaaf696991
MD5 eca45f58aa4295e10ae6e8085e5b7f48
BLAKE2b-256 c7d0be12adca6c5d69da499c1704b1218fe53aceae9df458b6e82b2adc3b7dc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for orche-0.1.0.tar.gz:

Publisher: release.yml on pietroagazzi/whaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file orche-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: orche-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for orche-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 35a6479fbf1143067fbe8d4b2e3f2bb9733abcda50d2205a87f20cc3fac7215d
MD5 d6e066bd1a495a59ad8cad161b5d4bfc
BLAKE2b-256 812e47ce6ccb3558fd1964ffb9d20e5b30274d95cab8a08a494a4d5ec3fd9335

See more details on using hashes here.

Provenance

The following attestation bundles were made for orche-0.1.0-py3-none-any.whl:

Publisher: release.yml on pietroagazzi/whaler

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page