hpc_connect
hpc_connect provides Python interfaces for HPC backends (local, Slurm, PBS, Flux, …) and launch (MPI-style mpiexec/mpirun, Slurm srun, etc.). Backends are provided via plugins; configuration selects a backend and optionally overrides its defaults.
Install
python3 -m pip install hpc-connect
Python usage
import hpc_connect
# Select by backend instance name or backend type (see config below)
backend = hpc_connect.get_backend("slurm")
If you have multiple configured backends, pass an explicit name/type or set hpc_connect.backend in YAML.
Configuration
Config is YAML under the hpc_connect: key.
Minimal config
hpc_connect:
backend: slurm
Full config shape
hpc_connect:
debug: false
# Optional default backend selector for CLI / get_backend() with no argument
backend: this-site
backends:
- name: this-site # optional instance name
type: slurm # required backend type (plugin id)
config: {} # backend-specific settings (plugin-defined)
# optional: launch settings for this backend instance
launch:
type: srun # e.g. "mpi" or "srun"
exec: srun # optional; adapter may provide a default
numproc_flag: -n
default_options: []
pre_options: []
variables: {} # string->string map (if adapters use it)
mpmd:
global_options: []
local_options: []
# optional: submit/poll tuning (backend-defined semantics)
submit:
default_options: []
polling_interval: 2.0
Backend selection rules
get_backend("X") selects:
- a backend entry with name == "X", else
- a backend entry with type == "X", else
- treats "X" as a backend type with no per-entry overrides.
If no argument is provided, it uses hpc_connect.backend if set; otherwise, if exactly one backend entry exists, it selects that; else it errors (ambiguous).
hpc-launch (CLI)
hpc-launch runs an application using the selected backend and its launch configuration:
hpc-launch [launcher-options] <application> [application-options]
The command line is constructed roughly as:
<exec> <default_options> [launcher-options] <pre_options> <application> [application-options]
MPMD is supported via launch.mpmd.* when enabled by the launcher type.
Examples
Local + MPICH-style -np
hpc_connect:
backend: local
backends:
- type: local
launch:
type: mpi
exec: mpiexec
numproc_flag: -np
Slurm + srun
hpc_connect:
backend: slurm
backends:
- type: slurm
launch:
type: srun
exec: srun
Metadata
Release files for hpc-connect 26.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hpc_connect-26.9.1.tar.gz | 56.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hpc_connect-26.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 116.6 kB
Release files / hpc_connect-26.9.1.tar.gz
| Download URL | hpc_connect-26.9.1.tar.gz |
|---|---|
| Size | 56.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
275f1bbcd13eea8072be5b7ac34d78ddaeeee01c6a768fa74af18d75d555c025
|
|
BLAKE2b-256 checksum How to use checksums |
7fec66902bb113adfca7057ce2c0ba7ca25b3deaed9026f04dced750b4187986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency logRelease files / hpc_connect-26.9.1-py3-none-any.whl
| Download URL | hpc_connect-26.9.1-py3-none-any.whl |
|---|---|
| Size | 60.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80cb92212ba801bb52e4b4f904c0cd2e9c68ebc8e21ca3912a883c273112bb27
|
|
BLAKE2b-256 checksum How to use checksums |
3d60556719d901534c1c1befefe4b794184dd9ee7e569744a982b9f0c0a5f637
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.
Transparency log