> For the complete documentation index, see [llms.txt](https://gromet.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gromet.gitbook.io/docs/getting-started/quickstart.md).

# Quickstart

To run your script with Gromet, you only need two files:

* A `.yaml` config
* A `.py` script with a `main()` function

***

#### 1. Create a YAML (`.yaml`)

In the **Setup** tab, define:

* `script_name` and `script_description` (used for labelling)
* `python_version` (e.g. "3.12.11")
* A list of `dependencies` (e.g. pandas, openpyxl, etc.)
* A list of `inputs` that your Python function will receive

```yaml
script_name: "Excel Invoice Merger"
script_description: |
  Merge multiple Excel invoice files into a single consolidated report,
  summarising totals and highlighting discrepancies.

python_version: "3.12"
dependencies:
  - pandas==2.2.2
  - openpyxl==3.1.2

inputs:
  - arg: input_file
    title: Upload Excel File
    required: true
    type: file
    extensions: [xlsx, xls]

  - arg: simple_text
    title: Label
    type: text
    placeholder: "Experiment 42"

  - arg: environment
    title: Environment
    type: dropdown
    required: true
    options:
      - value: dev
        label: Development
      - value: staging
        label: Staging
      - value: prod
        label: Production
        
  - arg: accept_terms
    title: Save to database
    type: checkbox
```

**🧠 Dependency Tips**

* If you **omit the version**, Gromet will install the **latest** available version from PyPI.

  ```yaml
  dependencies:
    - openpyxl  # installs the latest
  ```
* To ensure stability, **pin versions**:

  ```yaml
  dependencies:
    - openpyxl==3.1.2
  ```
* Or allow minor updates only:

  ```yaml
  dependencies:
    - openpyxl~=3.1  # latest 3.1.x
  ```
* Incorrect or missing dependencies can cause runtime errors.

***

#### 2. Write Your Script

In the **Script** tab, define a function called `main()` that accepts the same inputs as defined in your YAML. Match names **exactly**.

```python
def main(input_file, simple_text, environment):
    # Your code here
    return
```

📌 Notes:

* Uploaded files are passed as **file paths**
* Dropdowns, text, and date inputs are passed as **strings**
* `multiselect` fields return a list of the selected values, like `["u123", "u128"]`&#x20;

***

#### ✅ Supported Python Versions

Gromet supports running scripts across multiple Python versions. Each version includes the latest stable patch.

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

> Gromet will automatically fetch and run the specified version behind the scenes — no setup required.

***

#### 3. Hit ▶ Run

That’s it. Just click **Run**.

Your script will execute with your defined inputs and environment.

> ⏳ The first run may take a few minutes while dependencies and the specified Python version are installed. Future runs are much faster.
