--- title: "Getting Started - DataEngine Runtime SDK" slug: "getting-started-dataengine-runtime-sdk" tags: ["5.5", "DataEngine"] updated: 2026-10-27T23:00:54Z published: 2026-10-27T23:00:54Z canonical: "docs.vastdata.com/getting-started-dataengine-runtime-sdk" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.vastdata.com/llms.txt > Use this file to discover all available pages before exploring further. # Getting Started ## Prerequisite Steps 1. *Application user* for a DataEngine instance deployed on a VAST Cluster tenant. Deploying DataEngine and provisioning users requires *cluster admin* for the VAST cluster or a *tenant admin* user for the specific tenant. > [!NOTE] > Note > > - For DataEngine deployment and user provisioning by a *cluster admin* user, see [VAST DataEngine](/docs-5-5/docs/vast-dataengine) in the *VAST Cluster 5.5 Administrator's Guide*. > - For DataEngine deployment and user provisioning by a *tenant admin* user, see VAST DataEngine in the *VAST Cluster 5.5 Tenant Administrator's Guide*. 2. [S3 access key pair](/docs-5-5/docs/managing-your-access-keys) for the user. (Can be created for or by the user). 3. [Install DataEngine CLI](/docs-5-5/docs/getting-started-dataengine#installing-the-vast-dataengine-cli).Installing the VAST DataEngine CLI ## Install the DataEngine Python SDK ```plaintext pip install vast-dataengine-sdk ``` ## Create a Scaffold for a New Function Run the [vastde functions init](https://github.com/vast-data/dataengine-cli/blob/main/docs/references/commands/vastde_functions_init.md) command to create a scaffold for your function. For example: ```plaintext vastde functions init python-pip my_first_function -t ~/functions/ ``` The output is a directory structure needed for implementing your function. ```plaintext ~/functions/my-first_function/ ├── Aptfile          # OS dependencies ├── README.md        # Project documentation ├── customDeps       # custom python libraries ├── main.py          # Handler functions └── requirements.txt # Python dependencies 0 directories, 5 files ``` Once you have prepared your function scaffold, you can edit the files to implement your function. The main function code goes into *main.py*. ## How to Structure Your Function Code *main.py* is your initial default function code with the following content: ```plaintext def init(ctx):    # One time initialization comes here    ctx.logger.info("Initialized...") def handler(ctx, event):    # Events Processing comes here    ctx.logger.info(f"Handler {event}")    return "Hello World" ``` > [!NOTE] > Note > > The runtime supports asynchronous event handling, which is recommended for improved throughput and performance. You can define your event handler as `async def`: > > ```plaintext > def init(ctx): >    # One time initialization comes here >    ctx.logger.info("Initialized...") > > async def handler(ctx, event): >    # Events Processing comes here >    ctx.logger.info(f"Handler {event}") >    return "Hello World" > ``` As you further implement your function, you must retain the following structure: - Write an [init()](/docs-5-5/docs/initializing-the-runtime#init) function, once. - Write a [handler](/docs-5-5/docs/event-handling#handler) function to handle each event. The handler function is invoked whenever the function receives an event.