Skip to content

A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.

498 B
Raw Blame
/* Copyright 2026 Marimo. All rights reserved. */
import { atom } from "jotai";
import { waitFor } from "../state/jotai";

export interface KernelState {
  isInstantiated: boolean;
  error: Error | null;
}

export const kernelStateAtom = atom<KernelState>({
  isInstantiated: false,
  error: null,
});

export const initialRunCompletedAtom = atom(false);

export function waitForKernelToBeInstantiated(): Promise<KernelState> {
  return waitFor(kernelStateAtom, (value) => value.isInstantiated);
}