# YAML Template

This template demonstrates a typical Gromet YAML config.

```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: assignee
    title: Assign User
    type: multiselect
    options:
      - value: "u123"
        label: "Alice Lee"
      - value: "u456"
        label: "Bob Zhang"

  - arg: schedule_date
    title: Execution Date
    type: date
    required: true

  - arg: notes
    title: Add Notes
    type: textarea
    placeholder: "Optional context here"
    
  - arg: accept_terms
    title: Save to database
    type: checkbox

```

***

#### Notes on Fields

* **`script_name` / `script_description`**: For display and documentation purposes.
* **`python_version`**: Must be one of the supported versions (3.9 to 3.12).
* **`dependencies`**:
  * Pin versions exactly with `==` for reproducible installs.
  * Use `>=` or `~=` for flexible version ranges.
  * No version means the latest from PyPI will be installed.
  * **Only list third-party packages that need to be installed via pip.**\
    Do **not** include built-in Python libraries such as `os` or `time`. These should still be imported manually in the Python script.
    * ```yaml
      dependencies:
        - pandas==2.2.2
        - openpyxl==3.1.2
      ```
    * ```python
      # Add your imports below
      import pandas
      import openpyxl
      import time
      import os

      def main(input_file=None):
        for i in range(10, 0, -1):
          print(i)
          time.sleep(1)
        print("Blastoff! 🚀")
      ```
* **`inputs`**:
  * `arg`: must exactly match your Python `main()` function parameter.
  * `required`: if `true`, user must provide this input; if `false` or omitted, input is optional and `None` if missing.
  * `file`: input passed as local file path string.
  * `text` / `textarea`: input passed as a string.
  * `dropdown`: input passed as selected option’s `value` string.
  * `multiselect`: input passed as a list of selected user IDs (`string[]`).
  * `date`: input passed as a string formatted `YYYY-MM-DD`.

***

Customise this template according to your script’s needs, and remember to keep `arg` names aligned with your Python function parameters!


---

# 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/getting-started/yaml-template.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.
