# Settings



The **Settings** tab lets you control how your script behaves at runtime. You can:

* Add environment variables
* Limit execution time
* Reset the script environment
* Delete the script permanently

These settings help keep your scripts portable, reproducible, and secure.

***

#### 🐍 Python Version

**Defined in your YAML config:**

```yaml
python_version: "3.11.0"
```

**Supported versions:**

* _`3.13.x (coming soon)`_
* `3.12.11`
* `3.11.13`
* `3.10.18`
* `3.9.23`



To use a different version, update the `python_version` field in your YAML.\
This will rebuild the environment and reinstall dependencies on your next script run.

> 💡 Need another version? Email support and we’ll do our best to add it.

***

### Max Runtime

Limit how long your script can run:

* Set in the **Settings** panel
* Measured in seconds
* Default is `99999`

Used to avoid runaway jobs or long loops.

***

### Environment Variables

Add secure key-value pairs that your script can read at runtime. These do not go in your YAML — they’re defined through the UI.

**Example:**

```env
API_KEY=sk-12345
DEBUG=true
```

**Access in Python:**

```python
import os
api_key = os.getenv("API_KEY")
```

Use this for secrets, toggles, or runtime configuration.

***

### Dependency Management

Defined in YAML:

```yaml
dependencies:
  - pandas
  - requests==2.31.0
```

When dependencies change, use the buttons in **Settings**:

* **Clear Dependencies**: removes all pip packages for this script
* **Reset Environment**: full rebuild of the Python environment
* Note: Gromet will normally detect this automatically and make the necessary adjustments regarding dependencies and pip installations. However, in the event of an error, you can trigger a manual reset.

Useful when:

* Packages have version conflicts
* You’ve updated `dependencies:`
* Things feel broken

***

### Danger Zone

Click **Delete Script** to remove it permanently. This cannot be undone.

Used to clean up old prototypes or start fresh.

***

### Notes

* Settings are script-specific
* Changes to YAML trigger fresh installs
* UI-defined settings (env vars, runtime) are stored separately
