Functions
Share reusable code across notebooks, with versions.
A function asset is reusable code, such as a function or class, that you write once and use across notebooks. Use functions for code your team shares, such as a standard way to load positions data or calculate risk metrics, so everyone uses the same version.
Find them under Assets → Functions.
What a function contains
Each version of a function holds:
Code
The function or class itself
Requirements
The packages it needs, each with a version rule, such as pandas >= 2.0
Imports
The imports the code needs
Language
The language and language version it's written in
Versions
Functions are versioned, like constants. Each change creates a new version, and a notebook uses the specific version attached to it. Updating a function doesn't change notebooks using an older version until you switch them.
This lets you improve shared code without breaking work that depends on the old behavior.
Using a function in a notebook
Attach the function to a notebook, optionally with an alias. A notebook can't have the same function attached twice, or two functions with the same name.
Functions, DAGs and skills
Last updated
Was this helpful?
