Configuration Options#

This module provides a configuration system that controls the global behavior of all scikit-bio functionalities.

Functions#

get_config

Get one or all current scikit-bio configuration values.

set_config

Set a scikit-bio configuration option.

Available options#

The available options, their accepted values, and their defaults are listed below.

table_output{‘pandas’, ‘numpy’, ‘polars’}, default=’pandas’

Preferred table output format. See Output formats.

compute_engine{‘cython’, ‘numba’, ‘fast’}, default=’cython’

Default compute engine. See Compute engines.

Changed in version 0.7.4: Added option compute_engine.

How to configure#

Settings apply to the current Python session and are not saved between sessions. Explicit function parameters override the corresponding global setting. Passing None uses that setting. Only functions supporting an option are affected. Inspect all current settings with get_config(), or one with get_config(option). The returned dictionary is a copy.

The following example gets and sets the compute engine.

>>> from skbio import get_config, set_config
>>> option = 'compute_engine'
>>> previous = get_config(option)
>>> set_config(option, 'fast')
>>> get_config(option)
'fast'
>>> set_config(option, previous)
>>> get_config(option)
'cython'