scikitplot.utils#

Various utilities to help with development.

Developer guide. See the Contributing Guidelines to scikit-plots section for further details.

Time Utilities#

Lightweight timing context manager with logger support.

_time.Timer

Lightweight timing context manager with logger support.

File/Folder Utilities#

Path and filename utilities.

This module provides small, robust helpers for generating portable and collision-resistant file and folder names. The default format is designed to be:

  • lexicographically sortable by timestamp (UTC)

  • safe across Windows/macOS/Linux filesystems

  • collision-resistant across threads/processes/machines

The core building block is PathNamer, plus a zero-argument convenience wrapper make_path.

Filename format:

  • {prefix}-{YYYYMMDDTHHMMSSmmmZ}-{counter:06d}-{uuid4hex}[ -{secret} ].{ext}

_path.PathNamer

Generate portable, collision-resistant filenames and paths.

_path.make_path

Make Convenience wrapper to build a unique path (callable with zero args).