> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# executePythonFile

> Execute a Python script from a file. The plugin provides the ability for the user to define additional inputs that will be available to the scripts wh

Execute a Python script from a file. The plugin provides the ability for the user to define additional inputs that will be available to the scripts when executing. In addition, the plugin provides the ability for the user to define any number of outputs from the execution of the script that could be utilized in subsequent steps in the workflow.

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>File Path</td><td>`FDPYTHON_INP_FILE_PATH`</td><td>Yes</td><td>Path to the file to run.</td></tr><tr><td>Python Executable</td><td>`FDPYTHON_PYTHON_EXECUTABLE`</td><td>No</td><td>e.g. python or python3 if executable is available on PATHOr specify the full path e.g. /u01/python3.7/bin/python3.Defaults to python.</td></tr></tbody></table>

# Artifacts

This operation delegates the consume/produce artifacts decision to the workflow developer.

# Endpoint Selection

This operation delegates endpoint selection to the workflow developer. The workflow editor will default the selection to "All", which selects all available endpoints associated to the Target. Selecting a specific resource will result in selection of endpoints associated to the Target which have that resource defined.

# Endpoint Execution

This operation delegates endpoint execution to the workflow developer. The workflow editor will default to "Any", which will execute on any one of the selected endpoints, which will be randomly picked from selected endpoints or a specific endpoint where previous step may have executed. Changing this value to "All" to will result in execution on all selected endpoints.

# Special Considerations

## FlexDeploy Properties

FlexDeploy will pass in any Properties normally available in workflows via System Environment Variables.

### Example

##### **Property Example**

```
 import os
TEST_INP = ​os.getenv('TEST_INP')
```

## Outputs

User defined outputs – an output must be defined in the workflow editor to be accessible. Within your script use the setOutput(Key,Value) to set any outputs.

### Example

##### **Output Example**

```
setOutput("MY_STRING_OUTPUT","Output result") # output will be "Output result"
```
