API Reference

This page provides detailed documentation for all modules in the substrata package.

Core Modules

Analysis and Processing

Visualization

Configuration and Utilities

Logging configuration and helpers for the substrata package.

substrata.logging.setup_logging(level=20, format_string=None)[source]

Set up logging for the substrata package only.

Attaches a StreamHandler directly to the substrata logger and blocks propagation to the root logger, so third-party library output (kaleido, choreographer, etc.) is unaffected.

Parameters:
  • level (int) – Logging level to use. Defaults to logging.INFO.

  • format_string (Optional[str]) – Custom format string for log messages.

Return type:

None

substrata.logging.tqdm_joblib(tqdm_object)[source]

Context manager to integrate joblib.Parallel with tqdm progress bars.

Usage:
with tqdm_joblib(tqdm(total=N)):

Parallel(n_jobs=-1)(delayed(func)(x) for x in items)

Parameters:

tqdm_object – An instance of tqdm configured with the desired total.

Command Line Interface