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

# @morph.variables

You can declare variables passed from outside with the `@morph.variables` annotation.

```python theme={"dark"}
@morph.variables(
    var_name: str,
	default: Optional[Any] = None,
	required: Optional[bool] = False,
    type: Optional[Literal["str", "bool", "int", "float", "dict", "list"]] = None,
)
def func_name(context):
	# write your code here
```

## Parameters

<ParamField body="var_name" type="string" required>
  You can add arguments when executing the function.

  You can pass arguments from the mdx file or specify arguments when executing the command.
</ParamField>

<ParamField body="default" type="any">
  You can set a default value.

  If not specified, the default value will be None.
</ParamField>

<ParamField body="required" type="bool" default="False">
  You can specify whether the item is required.

  If it is set to required, an error will occur if it is not specified.
</ParamField>

<ParamField body="type" type="string" default="None">
  You can specify the type of the variable.

  If not specified, the type will be inferred automatically.
</ParamField>

## How to Use

```python theme={"dark"}
@morph.func
@morph.variables("var1")
def get_data_from_database(context):
	var1_data = context.vars["var1"]
    # write your code here using var1_data
	return pd.DataFrame({})
```
