# 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%2FxKyGpj2j1yBXn4gvB30V%2FScreen%20Recording%202025-11-27%20at%204.40.47%E2%80%AFPM.mp4?alt=media&token=c0b488e0-75f9-496c-a13f-16149c114a46>" %}

### 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>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zerve.ai/guide/notebook-view/assets/functions-and-classes.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
