custodian
A simple JIT job management framework in Python.
What it is and what it does
Custodian is a Python framework designed to manage long-running computational jobs that may fail due to transient errors. It wraps job execution with pluggable error handlers that can detect failures, apply recovery strategies, and restart jobs with modified parameters—critical for high-throughput projects where even a 1% error rate becomes unmanageable at scale. The framework is particularly valuable for scientific computing workflows where individual jobs may run for days and occasional IO or system errors are inevitable.
The package comes with built-in error handlers and job management tools for Vienna Ab Initio Simulation Package (VASP), NwChem, QChem, FEFF, Lobster, and CP2K calculations, though the core framework is application-agnostic. It depends on monty, psutil, and ruamel.yaml for utilities, process monitoring, and YAML configuration handling. The plugin architecture allows developers to extend custodian for domain-specific workflows without modifying the core library.
Use it for:
- Manage VASP or QChem calculations that may fail due to convergence or IO errors, automatically restarting with adjusted parameters.
- Wrap multi-day computational simulations to gracefully handle transient system errors and resume from checkpoints.
- Orchestrate high-throughput materials discovery or molecular dynamics campaigns where thousands of jobs run in parallel.
- Build custom error recovery workflows for scientific codes by implementing domain-specific error handlers via the plugin framework.
- Monitor and manage long-running batch jobs on HPC clusters with automatic failure detection and recovery.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Custodian is a just-in-time job management framework that wraps long-running tasks with error checking, recovery logic, and automatic restart capabilities for high-throughput computational workloads.
Yes. Custodian is a mature, actively maintained framework (production-stable, last commit August 2026) with low install friction and no known vulnerabilities. It directly solves a real problem in computational science—graceful error recovery for long-running jobs—and is particularly valuable if you work with VASP, QChem, or similar scientific codes. The MIT license places no restrictions on use. Install if you need robust job management for high-throughput or long-duration computational workloads.
Install
custodian on PyPI
pip
pip install custodianuv
uv add custodianpoetry
poetry add custodianInstalling custodian
Before you install
Low friction installation with only three runtime dependencies (monty, psutil, ruamel.yaml). Active maintenance with recent commits and stable production status; last release 243 days ago.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both academic and commercial projects.
Quickstart
pip install custodian
from custodian import Custodian
from custodian.jobs import Job
# Create a job wrapper with error handlers
custodian = Custodian(handlers=[], jobs=[job_instance], max_errors=5)
Requires Python 3.10 or later. Optional dependencies (pymatgen) needed for VASP, NWChem, QChem, FEFF, Lobster, and CP2K error handlers.
Verify before relying
- Whether the plugin framework documentation clearly specifies how to develop custom error handlers and job workflows for non-standard applications.
- Performance characteristics and overhead when managing hundreds of thousands of jobs simultaneously.
- Compatibility and integration details with specific computational chemistry packages (VASP, QChem, NWChem, etc.).
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — monty, psutil, ruamel.yaml |
| Maintenance | actively maintained — 243 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 123,282/month — #11,916 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: custodian-2025.12.14-py3-none-any.whl
Keywords: jit, job, just-in-time, management, nwchem, qchem, vasp
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
metaflow-checkpointProvides decorators for Metaflow workflows to…
unclear · top 15,000 on PyPI
jobflowJobflow is a Python library for defining and…
permissive · top 15,000 on PyPI
c7nCloud Custodian is a rules engine that enforces…
permissive · top 5,000 on PyPI
c7n-azureAn Azure plugin for Cloud Custodian that…
permissive · top 15,000 on PyPI
c7n-orgRuns Cloud Custodian policies in parallel…
permissive · top 5,000 on PyPI
c7n-mailerA message relay service that subscribes to SQS…
permissive · top 15,000 on PyPI
rqRQ is a Python library for queueing jobs and…
permissive · top 5,000 on PyPI
slurm-usageCollects and preserves SLURM job efficiency…
permissive · top 15,000 on PyPI
timeloopTimeloop runs periodic tasks at fixed intervals…
permissive · top 15,000 on PyPI
APSchedulerAPScheduler lets you schedule Python code to…
permissive · top 1,000 on PyPI