# 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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gromet.gitbook.io/docs/basics/settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
