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.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
/* Copyright 2026 Marimo. All rights reserved. */
import type { TypedString } from "@/utils/typed";
const PREFIX = "env:";
export type SecretPlaceholder = TypedString<"secret">;
export function displaySecret(value: string) {
return value;
}
export function isSecret(value: unknown): value is SecretPlaceholder {
if (typeof value !== "string") {
return false;
}
return value.startsWith(PREFIX);
}
export function prefixSecret(value: string): SecretPlaceholder {
return `${PREFIX}${value}` as SecretPlaceholder;
}
export function unprefixSecret(value: SecretPlaceholder): string {
return value.replace(PREFIX, "");
}