pyslurmutils 0.1.0
pip install pyslurmutils==0.1.0
Newer version available (1.0.0)
Released:
SLURM utilities for Python
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: ESRF
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
Project description
pyslurmutils
SLURM utilities for Python.
Demo
Get an access token on rnice
export SLURM_TOKEN=$(scontrol token lifespan=3600)
export SLURM_URL=...
export SLURM_USER=...
Run any of the example scripts
python3 scripts/examples.py
Run the tests (CI or locally)
python3 -m pytest .
When SLURM_TOKEN
, SLURM_URL
or SLURM_USER
is missing it will mock
the SLURM clients.
Execute a python function on SLURM
Execute a function on SLURM with an API similar to python's concurrent.futures
from pyslurmutils.concurrent.futures import SlurmRestExecutor
with SlurmRestExecutor(
url,
user_name,
token,
log_directory="/path/to/log", # for log files
data_directory="/path/to/data", # TCP when not provided
pre_script="module load ewoks", # load environment
python_cmd="python",
) as pool:
future = pool.submit(sum, [1, 1])
assert future.result() == 2
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: ESRF
- Requires: Python >=3.7
Classifiers
- Intended Audience
- License
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file pyslurmutils-0.1.0.tar.gz
.
File metadata
- Download URL: pyslurmutils-0.1.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
3d772dba5b2bd08a57973895a3be0b5d0d7b8d3a354d953d739f70b981c506b1
|
|
MD5 |
b946d3a0bc2536175c256c3ed074cb1e
|
|
BLAKE2b-256 |
1a844f1989e552c2ef235488be5f967e4582ad589f86ba72d1daea0329b93cf3
|