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

# Run Python Script

> Add a Run Python Script command to a Paradime Bolt schedule with Poetry dependency management and environment variables for secrets and API keys.

Run one or more Python scripts in a Bolt schedule for custom data processing, transformation, API calls, or validation that built-in commands do not cover.

## Prerequisites

* The Python script committed to your project.

## Manage dependencies with Poetry

We recommend managing your Python dependencies with [Poetry](/developers/virtual-environments/using-poetry).

* Keep your Poetry project (`pyproject.toml` and `poetry.lock`) at the **root of your dbt™ project**, alongside `dbt_project.yml`. Paradime resolves the environment from there.
* Make `poetry install` the **first command** in the schedule, so the virtual environment is built before your script runs. Poetry then runs your script inside that environment.

```bash theme={"system"}
poetry install
poetry run python path/to/my/script.py
```

<Info>
  Store secrets (API keys, credentials) as [Bolt schedule environment variables](/products/settings/environment-variables/bolt-schedule-env-variables) and read them with `os.environ` rather than hardcoding them.
</Info>

## Usage

Add the **Run Python Script** command to your schedule and enter one or more commands, one per line. If you use Poetry, start with `poetry install`:

```bash theme={"system"}
poetry install
poetry run python path/to/my/script.py
```

Without Poetry, run the script directly:

```bash theme={"system"}
python path/to/my/script.py
```

## Learn more

See [Using Poetry](/developers/virtual-environments/using-poetry) for dependency management, and [Bolt schedule environment variables](/products/settings/environment-variables/bolt-schedule-env-variables) for handling secrets.


## Related topics

- [Commands](/products/bolt/creating-schedules/command-settings/index.md)
- [Configuring Signed Commits on Paradime with SSH Keys](/guides/working-with-git/configuring-signed-commits-on-paradime-with-ssh-keys.md)
- [Python SDK](/developers/python-sdk/index.md)
- [dbt™ Script Checks](/integrations/pre-commit/dbt-tm-checkpoint-hooks/dbt-tm-script-checks.md)
- [End-to-end PR reviewer](/guides/programmable-agents/end-to-end-pr-reviewer.md)
