A Python orchestrator for Docker Compose stacks
Project description
Whaler
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fde26d160ab3545f390b626743b4868a06721838fcaccb7fdf20c7eaaf696991
|
|
| MD5 |
eca45f58aa4295e10ae6e8085e5b7f48
|
|
| BLAKE2b-256 |
c7d0be12adca6c5d69da499c1704b1218fe53aceae9df458b6e82b2adc3b7dc0
|
Provenance
The following attestation bundles were made for orche-0.1.0.tar.gz:
Publisher:
release.yml on pietroagazzi/whaler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orche-0.1.0.tar.gz -
Subject digest:
fde26d160ab3545f390b626743b4868a06721838fcaccb7fdf20c7eaaf696991 - Sigstore transparency entry: 854173015
- Sigstore integration time:
-
Permalink:
pietroagazzi/whaler@747e81758c9d08d3dfe9c43a597436ec9b3d7291 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pietroagazzi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@747e81758c9d08d3dfe9c43a597436ec9b3d7291 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35a6479fbf1143067fbe8d4b2e3f2bb9733abcda50d2205a87f20cc3fac7215d
|
|
| MD5 |
d6e066bd1a495a59ad8cad161b5d4bfc
|
|
| BLAKE2b-256 |
812e47ce6ccb3558fd1964ffb9d20e5b30274d95cab8a08a494a4d5ec3fd9335
|
Provenance
The following attestation bundles were made for orche-0.1.0-py3-none-any.whl:
Publisher:
release.yml on pietroagazzi/whaler
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
orche-0.1.0-py3-none-any.whl -
Subject digest:
35a6479fbf1143067fbe8d4b2e3f2bb9733abcda50d2205a87f20cc3fac7215d - Sigstore transparency entry: 854173037
- Sigstore integration time:
-
Permalink:
pietroagazzi/whaler@747e81758c9d08d3dfe9c43a597436ec9b3d7291 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/pietroagazzi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@747e81758c9d08d3dfe9c43a597436ec9b3d7291 -
Trigger Event:
push
-
Statement type: