Skip to main content

SLURM utilities for Python

Project description

pyslurmutils

SLURM utilities for scheduling jobs from Python.

The main purpose of this library is to provide a concurrent.futures.Executor implementation for SLURM which can be used on any machine, not necessarily a SLURM client.

pip install pyslurmutils
from pyslurmutils.concurrent.futures import SlurmRestExecutor

with SlurmRestExecutor(
    url=url,                               # SLURM REST URL
    user_name=user_name,                   # SLURM user name
    token=token,                           # SLURM access token
    log_directory="/path/to/log",          # for log files (optional)
    data_directory="/path/to/data",        # TCP communication when not provided
    pre_script="module load ewoks",        # load environment (optional)
    parameters={"time_limit": "02:00:00"}, # SLURM job parameters (optional)
    python_cmd="python",                   # python command (python3 by default)
) as executor:
    future = executor.submit(sum, [1, 1])
    assert future.result() == 2

Documentation

https://pyslurmutils.readthedocs.io/

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

pyslurmutils-1.5.0.tar.gz (78.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyslurmutils-1.5.0-py3-none-any.whl (97.5 kB view details)

Uploaded Python 3

File details

Details for the file pyslurmutils-1.5.0.tar.gz.

File metadata

  • Download URL: pyslurmutils-1.5.0.tar.gz
  • Upload date:
  • Size: 78.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyslurmutils-1.5.0.tar.gz
Algorithm Hash digest
SHA256 4e56bb3e2424add259f168a3b50741878387dd1344d9c6683ccea69d44eb9877
MD5 fd30f04c15b7a88f34389b3746483ad3
BLAKE2b-256 5315d22342b5d02fa41b25dcb860560b2278b7bcf4640519cceda19449ddfd4b

See more details on using hashes here.

File details

Details for the file pyslurmutils-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: pyslurmutils-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 97.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for pyslurmutils-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 821aaa5af635cb14cf757c1f5d48b3b109198a9db21fa670f5a79b41de5635fb
MD5 bec0053048ba729f6e8d2b21720dcf33
BLAKE2b-256 84ed9c0f94721b23e0d6ca64d24c954ec7f65398f8fa6642999ce2c39077ac7d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page