set_compute_context#

polars_cloud.set_compute_context(context: ComputeContext) None#

Set a compute context as the default during this session.

Setting a compute context allows spawning queries without explicitly passing a compute context.

See also

ComputeContext

Examples

>>> ctx = pc.ComputeContext(workspace="workspace-name", cpus=24, memory=24)
>>> pc.set_compute_context(context=ctx)
>>> query.remote().show()