Skip to main content

Starlark Built-in Modules

Minimal's Lark steps run Starlark — a sandboxed, deterministic subset of Python. Built-in modules extend what you can do beyond core Starlark.

Load a module at the top of your code block before using any function from it:

load("math", "upby10")
load("strings", "slugify")

math

load("math", "upby10")
FunctionDescriptionExample
upby10(n)Multiplies n by 10upby10(5)50

strings

load("strings", "slugify")
FunctionDescriptionExample
slugify(s)Converts string to URL-safe slugslugify("Hello World")"hello-world"

Core Starlark — No Load Required

These are available in every Lark step without loading:

FunctionDescriptionExample
len(x)Length of list or stringlen(step_0)42
str(x)Convert to stringstr(123)"123"
int(x)Convert to integerint("42")42
range(n)Integer rangerange(3)[0, 1, 2]
print(x)Log to server outputprint(step_0)

What Starlark Does Not Support

Starlark is intentionally limited for safety and determinism. These Python features are not available:

Not supportedUse instead
importUse load()
f-stringsString concatenation — "hello " + name
try / exceptValidate input before using it
classUse dicts instead
GeneratorsUse explicit for loops with append
NoneUse "" or 0 as empty values
tip

If you need something not available in Starlark, do the heavy transformation in SQL and use Lark only for shaping the output.