Metadata-Version: 2.4
Name: nbpipe
Version: 0.1.1
Summary: Run sequences of Jupyter notebooks as a workflow from the command line.
Project-URL: Homepage, https://github.com/ngafar/nbpipe
Project-URL: Repository, https://github.com/ngafar/nbpipe
Project-URL: Issues, https://github.com/ngafar/nbpipe/issues
Author: Nawaz Gafar
License: MIT
License-File: LICENSE
Keywords: automation,jupyter,nbformat,notebook,pipeline,workflow
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Requires-Dist: ipykernel>=7.2.0
Requires-Dist: jupyter-client>=8.0
Requires-Dist: nbformat>=5.10.4
Requires-Dist: pyyaml>=6.0.3
Description-Content-Type: text/markdown

# nbpipe

Run sequences of Jupyter notebooks as a workflow from the command line.

## Installation

```bash
pip install nbpipe
```

## Usage

Define a workflow in a YAML file:

```yaml
name: my_workflow
steps:
  - notebook: prepare_data.ipynb
    output: data/processed.csv
  - notebook: train_model.ipynb
    output: models/model.pkl
  - notebook: evaluate.ipynb
```

Then run it:

```bash
nbpipe run workflow.yaml
```

Each notebook is executed in place — cell outputs are written back to the `.ipynb` file, and any files the notebook saves to disk are its real outputs.

If a step has an `output` field, nbpipe checks that the file exists after the notebook runs and raises an error if it does not. Steps without an `output` field are always considered successful as long as no cell raises an exception.

## Workflow YAML

| Field | Required | Description |
|-------|----------|-------------|
| `name` | yes | Name of the workflow |
| `steps` | yes | Ordered list of steps to run |

Each step:

| Field | Required | Description |
|-------|----------|-------------|
| `notebook` | yes | Path to the `.ipynb` file (relative to the YAML file) |
| `output` | no | Path to a file the notebook is expected to produce |

All paths are relative to the directory containing the YAML file.
