> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/guide/canvas-view/assets/functions-and-classes.md).

# Functions & Classes

### Create a Function:

This can be accessed through the create function option under function & classes tab in Assets.

<figure><img src="/files/yvVgyDRlGkG4Ctl8C059" alt=""><figcaption><p>Creating a function</p></figcaption></figure>

<figure><img src="/files/ud56CbgD2g3kg4Fsg0v5" alt=""><figcaption><p>Creating a Function</p></figcaption></figure>

There are 4 parts that can be edited once a function is created. First is the function name and versions for tracking.

There are Requirements and Imports that can be used to call certain versions of the library that's required for the function definition to work.

And finally, there is the function definition where python functions and classes can be defined in appropriate syntax.

### Access in Canvas:

The above function can be imported into a canvas by using the Asset Library tab in the canvas. Imported assets are globally available on the canvas and can be accessed from any block.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIQKNeqjEeOp9UwUcB9R9%2Fuploads%2FXx7ys96PUzlk0QQyzjiK%2FScreen%20Recording%202025-04-04%20at%201.00.22%E2%80%AFPM.mp4?alt=media&token=15722529-aff5-4055-bc8e-eff99b780b3e>" %}
Access function in canvas
{% endembed %}

### Share Functions and Classes:

From the asset library tab - based on access level a user can share functions and classes with other team members. This makes sure everyone in the team is using the latest and up to date functions.

<figure><img src="/files/tPVJ8ClUZFfXa9gTbztN" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/EVhXrvx3f9eDe7ynB2Nz" alt=""><figcaption></figcaption></figure>

Each version can be tagged as primary, draft, outdated etc. so that team members are always using the up to date version.

<figure><img src="/files/vZmMGPkhLJDqsizmS3zt" alt=""><figcaption></figcaption></figure>
