Skip to main content

Simple tool to wrap and execute sbatch commands from `python` scripts or `Jupyter Notebook` cells with `conda` envs and config files. Secure and reproducible

Project description

SlurmBot 🤖

SlurmBot is a minimalistic tool to wrap and execute sbatch commands from Python scripts with optional Conda environment management, useful for integrating Slurm job submissions directly into your workflows. Based on jbatch.

Simple tool to wrap and execute sbatch commands from python scripts or Jupyter Notebook cells with conda envs and config files. Less mess, more reproducibility and security (if published to GitHub, for instance).

  • ⚙️ Config Files: Create config files in YAML format and reuse them. Make a default.yaml in ~/.config/slurmbot/default.yaml
  • 🐍 Python Variables: Easily integrate Python variables into your Slurm job commands.
  • 🛠️ Conda: Activate Conda environments with the conda property.

Installation

Install SlurmBot via pip: pip install slurmbot

Example

from slurmbot import SlurmBot 
sb = SlurmBot() # using default yaml from ~/.config/slurmbot/default.yaml, if exists OR specify path to config
samples = ["SRR000001", "SRR000002"]
for sample in samples:
	sb.run(f"fasterq-dump {sample}", conda="ngs", mem=4, cpus=4)

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

slurmbot-0.2.0.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

slurmbot-0.2.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file slurmbot-0.2.0.tar.gz.

File metadata

  • Download URL: slurmbot-0.2.0.tar.gz
  • Upload date:
  • Size: 2.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.1.0-26-amd64

File hashes

Hashes for slurmbot-0.2.0.tar.gz
Algorithm Hash digest
SHA256 280a58ff179920f2657a58d39a9db7acbab7092ca6ef6daa758aa528777d652f
MD5 fe866a61cae3acbd0ed350a1ca6740e5
BLAKE2b-256 e22c0db8bae48a5e5c80fb59c6d3e8dd18b40cad7cae692777397d77f403edb2

See more details on using hashes here.

File details

Details for the file slurmbot-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: slurmbot-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.1.0-26-amd64

File hashes

Hashes for slurmbot-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6140d5c7f9dc7ccef87f1376661c99b0de53fced8bff6157fb99b95ac5bdea23
MD5 dfb8711e700d8d0ff8940cfe85bf1d58
BLAKE2b-256 e1cf5154e5314f4b46f322af229415a74b02caca264f8c48d190a616012bbd91

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