Metadata-Version: 2.4
Name: orche
Version: 0.4.2
Summary: A simple, lightweight Python orchestrator for Docker Compose stacks
Author: Pietro Agazzi
Author-email: pietro.agazzi@prconsulting.eu
Requires-Python: >=3.10,<4
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Provides-Extra: dev
Provides-Extra: docs
Requires-Dist: GitPython (>=3.1.0)
Requires-Dist: PyYAML (>=6.0)
Requires-Dist: click (>=8.1.0)
Requires-Dist: mkdocs (>=1.6.0) ; extra == "docs"
Requires-Dist: mkdocs-material (>=9.5.0) ; extra == "docs"
Requires-Dist: mkdocstrings[python] (>=0.25.0) ; extra == "docs"
Requires-Dist: mypy (>=1.8.0) ; extra == "dev"
Requires-Dist: pre-commit (>=4.0.0) ; extra == "dev"
Requires-Dist: pytest (>=8.0.0) ; extra == "dev"
Requires-Dist: pytest-cov (>=5.0.0) ; extra == "dev"
Requires-Dist: pytest-mock (>=3.14.0) ; extra == "dev"
Requires-Dist: pytest-timeout (>=2.3.0) ; extra == "dev"
Requires-Dist: python-on-whales (>=0.80.0,<0.81.0)
Requires-Dist: rich (>=13.0.0)
Requires-Dist: ruff (>=0.2.0) ; extra == "dev"
Requires-Dist: types-PyYAML (>=6.0) ; extra == "dev"
Requires-Dist: types-pygments (>=2.19.0) ; extra == "dev"
Description-Content-Type: text/markdown

# Orche

[![CI](https://github.com/pietroagazzi/orche/actions/workflows/ci.yml/badge.svg)](https://github.com/pietroagazzi/orche/actions/workflows/ci.yml)

A simple, lightweight Python orchestrator for Docker Compose stacks.

## Installation

```bash
pip install -e .
```

## CLI Reference

The `orche` command executes your `orchefile.py` file with the specified command and services.

```bash
orche [command] [services...]
```

### Commands

- `orche up [services]` - Start services (executes orchefile.py with 'up' command)
- `orche build [services]` - Build services (executes orchefile.py with 'build' command)
- `orche down [services]` - Stop services (executes orchefile.py with 'down' command)

### Options

- `-f, --file FILE` - Path to orche file (default: orchefile.py)
- `-v, --verbose` - Enable verbose logging
- `--version` - Show version and exit
- `--help` - Show help and exit

### Examples

```bash
# Execute orchefile.py with up command
orche up

# Build specific services
orche build api web

# Start specific services
orche up postgres redis

# Use custom orche file
orche -f custom.py up
```

## Examples

### Basic Usage

```python
from orche import Stack

stack = Stack(compose_files=["docker-compose.yml"])
stack.build().up()
```

### With Project Name

```python
from orche import Stack

stack = Stack(
    compose_files=["docker-compose.yml"],
    name="myapp",
    path="/path/to/project"
)

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

### Specific Services

```python
from orche import Stack

stack = Stack(compose_files=["docker-compose.yml"])

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

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

If your compose files live under another directory, pass `path` and keep `compose_files` relative to that directory.

## Requirements

- Python >= 3.10
- Docker and Docker Compose installed on the system

## Development

Install development dependencies:

```bash
pip install -e ".[dev]"
```

Run tests:

```bash
pytest
```

Type checking:

```bash
mypy orche
```

Linting:

```bash
ruff check orche
```

