xorbits.option_context#

xorbits.option_context(config=None)[source]#

Context manager to temporarily set options in a with statement.

Parameters:

config (dict) – A dictionary of key-value option pairs to set temporarily.

Returns:

No return value.

Return type:

None

Examples

>>> with xorbits.option_context({'show_progress': False}):
...     # Code here will run with show_progress=False
>>> # Outside the context, the original configuration is restored