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 whalefile.py file with the specified command and services.

whaler [command] [services...]

Commands

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

Options

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

Examples

# Execute whalefile.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.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_files=["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_files=[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.2.0.tar.gz (9.4 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.2.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for orche-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a42eae2cee0f4e10b284ed88f04d007c839d3e2d851cbc4f7bea9c83091c2182
MD5 98f030f4deabab0306187a7e26cba730
BLAKE2b-256 ca403463bd91dd41f8c427703221fdddf2e1713b9cf65d64baf8ea4fef032b04

See more details on using hashes here.

Provenance

The following attestation bundles were made for orche-0.2.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.2.0-py3-none-any.whl.

File metadata

  • Download URL: orche-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8557d6d16b2e8ebb03d7faabb9d757209f2e7a9d1620ff838ed9ea7b78a5ebee
MD5 bf941cfed1f946a5072601e961f3e966
BLAKE2b-256 3aaf6e82f976f96eab531c331e6cd2dd7fec4468fccc3f80051074a3a5b73f11

See more details on using hashes here.

Provenance

The following attestation bundles were made for orche-0.2.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