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.2.tar.gz (3.3 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.2-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: slurmbot-0.2.2.tar.gz
  • Upload date:
  • Size: 3.3 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.2.tar.gz
Algorithm Hash digest
SHA256 5258f3a21e4bc98a8828d967f11ac374b7285a202177558a81cfef9719921e92
MD5 6b9030e06a869af7425bf2227dcbc69f
BLAKE2b-256 849b0e851d6a13a7597ce8384375a2b49380c955455f60df95474141b305b9c3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: slurmbot-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 4.8 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6d6760c2b96ea562b465a9e1e380c14fb5c20bb6149bff6c591bac56540c34d
MD5 5d9018e888b898d1858c3f354927aaba
BLAKE2b-256 d3dfe34b908bddc19ced8ffda26e72d289aecf6891ebb06ba32672026e30acf9

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