Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.morph-data.io/llms.txt

Use this file to discover all available pages before exploring further.

In the Morph framework, you can set environment variables to be used in your code. Accessing environment variables is done in the same way as in regular Python code.
import os
import pandas as pd
import morph
from morph import MorphGlobalContext

@morph.func
def get_env_value(context: MorphGlobalContext):
    # get env variable named "ENV_NAME"
    env_name = os.environ["ENV_NAME"]
    return pd.DataFrame({})
By creating a .env file at the root of your project and setting your variables there, the Morph framework will automatically read them.
.env
KEY1=value1
KEY2=value2