satorbis_kit.dask_utils module¶
- satorbis_kit.dask_utils.dask_client(scheduler_address: str | None = None, n_workers: int = 4, threads_per_worker: int = 1, processes: bool = True) Iterator[dask.distributed.Client][source]¶
Factory/context manager for a Dask
Client.If
scheduler_addressis provided, connects to that scheduler.Otherwise, starts a local
LocalClusterwith the given worker config.Set
processes=Falseto run threads-only workers (useful on macOS to avoid spawn issues).
Yields an active
Clientand guarantees cleanup on exit.