When you start a workspace, a file called .env is created in the root of the project.

By defining environment variables in this file, they are automatically set when the Python file is executed.

Access to environment variables can be done in the same way as in normal Python code.

import os
import pandas as pd

import morph
from morph import MorphGlobalContext

@morph.func(
    name="example_python_cell",
    description="Example Python cell",
)
def get_data_from_database(context: MorphGlobalContext):
    # get env variable named "ENV_NAME"
    env_name = os.environ["ENV_NAME"]
	return pd.DataFrame({})