Metadata-Version: 2.4
Name: flux-batch
Version: 0.0.15
Summary: Python SDK for flux batch jobs and services
Home-page: https://github.com/converged-computing/flux-batch
Author: Vanessa Sochat
Author-email: vsoch@users.noreply.github.com
Maintainer: Vanessa Sochat
License: LICENSE
Keywords: flux,flux framework,hpc,batch,workloads
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: C
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Scientific/Engineering
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python :: 3.11
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: NOTICE
Requires-Dist: pyyaml
Requires-Dist: ply
Requires-Dist: Jinja2
Provides-Extra: all
Requires-Dist: pyyaml; extra == "all"
Requires-Dist: ply; extra == "all"
Requires-Dist: Jinja2; extra == "all"
Requires-Dist: pytest>=4.6.2; extra == "all"
Requires-Dist: sqlalchemy; extra == "all"
Requires-Dist: rich; extra == "all"
Provides-Extra: scribe
Requires-Dist: sqlalchemy; extra == "scribe"
Requires-Dist: rich; extra == "scribe"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: maintainer
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: summary

# flux-batch

> Python SDK to generate Flux batch jobs and services

![PyPI - Version](https://img.shields.io/pypi/v/flux-batch)
[![docs](https://github.com/converged-computing/flux-batch/actions/workflows/docs.yaml/badge.svg)](https://converged-computing.github.io/flux-batch/)

![https://github.com/converged-computing/flux-batch/raw/main/img/flux-batch-small.png](https://github.com/converged-computing/flux-batch/raw/main/img/flux-batch-small.png)

flux-batch builds Flux batch jobs from a list of commands, wraps them with
prologs, epilogs and services, and submits them. Modules deploy something
across every node of the job before your work runs, such as a user space
Kubernetes cluster with [usernetes](https://converged-computing.github.io/flux-batch/modules/usernetes.html).

📖 **Documentation: https://converged-computing.github.io/flux-batch/**

## Quick start

Inside a Flux instance (`flux start`, or an allocation with `FLUX_URI` set; see the
[installation docs](https://converged-computing.github.io/flux-batch/getting-started/install.html)):

```bash
flux python -m pip install --user -e .
flux python my_script.py
```

```python
import flux
import flux_batch

batch = flux_batch.BatchJobV1()
batch.add_job(["echo", "hello from flux-batch"])

spec = flux_batch.BatchJobspecV1.from_jobs(batch, nodes=1, time_limit="10m")
print(flux_batch.submit(flux.Flux(), spec, dry_run=True))  # preview
jobid = flux_batch.submit(flux.Flux(), spec)
```

See the [examples](examples) directory for more.

## License

HPCIC DevTools is distributed under the terms of the MIT license.
All new contributions must be made under this license.

See [LICENSE](https://github.com/converged-computing/cloud-select/blob/main/LICENSE),
[COPYRIGHT](https://github.com/converged-computing/cloud-select/blob/main/COPYRIGHT), and
[NOTICE](https://github.com/converged-computing/cloud-select/blob/main/NOTICE) for details.

SPDX-License-Identifier: (MIT)

LLNL-CODE- 842614
