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.

8.1 KB
Raw Blame
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <link rel="icon" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/favicon.ico" />
    <!-- Preload is necessary because we show these images when we disconnect from the server,
    but at that point we cannot load these images from the server -->
    <link rel="preload" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/gradient.png"" as="image" />
    <link rel="preload" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/noise.png"" as="image" />
    <!-- Preload the fonts -->
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/Lora-VariableFont_wght.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/PTSans-Regular.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/PTSans-Bold.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/FiraMono-Regular.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/FiraMono-Medium.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />
    <link rel="preload" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/FiraMono-Bold.woff2"" as="font" type="font/woff2" crossorigin="anonymous" />

    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <meta name="theme-color" content="#000000" />
    <meta name="description" content="a marimo app" />
    <link rel="apple-touch-icon" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/apple-touch-icon.png" />
    <link rel="manifest" crossorigin="anonymous" href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/manifest.json" />

    <script data-marimo="true">
      function __resizeIframe(obj) {
        const scrollbarHeight = 20; // Max between windows, mac, and linux

        function setHeight() {
          // Guard against race condition where iframe isn't ready
          if (!obj.contentWindow?.document?.documentElement) {
            return;
          }
          const element = obj.contentWindow.document.documentElement;
          // If there is no vertical scrollbar, we don't need to resize the iframe
          if (element.scrollHeight === element.clientHeight) {
            return;
          }

          // Create a new height that includes the scrollbar height if it's visible
          const hasHorizontalScrollbar = element.scrollWidth > element.clientWidth;
          const newHeight = element.scrollHeight + (hasHorizontalScrollbar ? scrollbarHeight : 0);

          // Only update the height if it's different from the current height
          if (obj.style.height !== `${newHeight}px`) {
            obj.style.height = `${newHeight}px`;
          }
        }

        // Resize the iframe to the height of the content and bottom scrollbar height
        setHeight();

        // Resize the iframe when the content changes
        const resizeObserver = new ResizeObserver((_entries) => {
          setHeight();
        });
        // Only observe if iframe content is ready
        if (obj.contentWindow?.document?.body) {
          resizeObserver.observe(obj.contentWindow.document.body);
        }
      }
    </script>
    <marimo-filename hidden>notebook.py</marimo-filename>
    <title>My App</title>
    <script type="module" crossorigin src="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/index.js""></script>
    <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/cells.css"">
    <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/markdown-renderer.css"">
    <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/JsonOutput.css"">
    <link rel="stylesheet" crossorigin href="https://cdn.jsdelivr.net/npm/@marimo-team/[email protected]/dist/assets/index.css"">
  
<script data-marimo="true">
    Object.defineProperty(window, "__MARIMO_STATIC__", {
        value: Object.freeze({
            files: Object.freeze({}),
            modelNotifications: Object.freeze([]),
        }),
        writable: false,
        configurable: false,
    });
</script>

<script data-marimo="true">
    Object.defineProperty(window, "__MARIMO_EXPORT_CONTEXT__", {
        value: Object.freeze({
            trusted: true,
            notebookCode: "",
        }),
        writable: false,
        configurable: false,
    });
</script>


<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());
    gtag('config', 'G-XXXXXXXXXX');
</script>
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">

</head>
  <body>
    <div id="root"></div>
    <script data-marimo="true">
      Object.defineProperty(window, "__MARIMO_MOUNT_CONFIG__", {
        value: Object.freeze({
            "filename": "notebook.py",
            "cwd": "",
            "lspWorkspace": null,
            "mode": "read",
            "version": "0.0.0",
            "serverToken": "token",
            "config": {"diagnostics": {"sql_linter": true}, "display": {"cell_output": "below", "code_editor_font_size": 14, "code_lens": true, "dataframes": "rich", "default_table_max_columns": 50, "default_table_page_size": 10, "default_width": "medium", "reference_highlighting": true, "theme": "light"}, "formatting": {"infer_types": "off", "line_length": 79}, "keymap": {"overrides": {}, "preset": "default"}, "language_servers": {"pylsp": {"enable_flake8": false, "enable_mypy": true, "enable_pydocstyle": false, "enable_pyflakes": false, "enable_pylint": false, "enable_ruff": true, "enabled": false}}, "package_management": {"manager": "uv"}, "runtime": {"auto_instantiate": false, "auto_reload": "off", "default_csv_encoding": "utf-8", "default_sql_output": "auto", "on_cell_change": "autorun", "output_max_bytes": 8000000, "reactive_tests": true, "show_tracebacks": false, "std_stream_max_bytes": 1000000, "watcher_on_save": "lazy"}, "save": {"autosave": "after_delay", "autosave_delay": 1000, "format_on_save": false}, "server": {"browser": "default", "follow_symlink": false}, "snippets": {"custom_paths": [], "include_default_snippets": true}},
            "configOverrides": {"formatting": {"line_length": 100}},
            "appConfig": {"app_title": "My App", "html_head_file": "head.html", "sql_output": "auto", "width": "compact"},
            "layout": null,
            "view": {"showAppCode": true},
            "notebook": {"cells": [], "metadata": {"marimo_version": "0.0.0"}, "version": "1"},
            "session": {"cells": [], "metadata": {"marimo_version": "0.0.0"}, "version": "1"},
            "runtimeConfig": null,
            "pairConfig": {"command": "uv run marimo", "hostEnabled": false, "templates": {"notebook": "Notebook: {notebook}\n", "prompt": "Pair with me on this running marimo notebook.\n\nURL: {url}\n{notebook}{session}\nRun `{command} pair --help` first.\nUse `{command}` for all marimo commands.{authentication}", "session": "Session: {session}\n", "token": "\n\nFor authenticated notebook discovery, set `export MARIMO_TOKEN={token}` in the shell that runs marimo.", "token_file": "\n\nFor authenticated notebook discovery, pass `--token-file {token_file}`."}}
        }),
        writable: false,
        configurable: false,
      });
    </script>
  <marimo-code hidden=""></marimo-code>
<marimo-code-hash hidden="">07da107bb575cc4e02b0e1d6d99cc204</marimo-code-hash>
</body>
</html>