# Python deployment scripts and step-scoped variables

Source: https://www.jawsdeploy.net/changelog/python-scripts-and-step-scoped-variables

Python is now a first-class scripting language in Jaws — the agent provisions and caches a managed Python runtime on every target for you. Plus variable values scoped to a single project step, smarter step template management.

## What's new

This release lands two features teams have asked for: **Python as a first-class scripting language**, and **variable values scoped to a single deployment step**.

### Python deployment scripts

Python now sits alongside PowerShell 7 and Windows PowerShell 5.1 as a fully supported script runtime. Add a *Run Python script* step — or switch any script step's language to Python — and write your deployment logic in Python 3. There is nothing to install on your targets: the Jaws agent provisions a managed Python runtime automatically the first time a Python step runs, and caches it per workspace so later deployments start instantly.

Inside a script, `import jaws` gives you the same deployment context PowerShell steps reach through `$Jaws`. Read resolved variables from `jaws.parameters`, look up packages in `jaws.packages`, fetch a single value with `jaws.get_parameter(name)`, and hand results to later steps with `jaws.set_output_value(name, value, type, scope)` — the direct counterpart of `Set-JawsOutputValue`. Output values support the same types (Text, Number, Secret, Boolean, Date, Json) and the same Machine and Global scopes, and secrets are redacted in the deployment log immediately.

Runtime provisioning follows a per-workspace policy. The agent can reuse a suitable system Python where you allow it, or download and cache a self-contained build keyed to your workspace. Air-gapped targets provision from a local archive instead of reaching the internet, and you can warm the runtime at agent startup so the first deployment never pays the download cost.

### Step-scoped variables

Variable values can now be pinned to one or more project steps. A step scope is the most specific scope there is: when that step runs, its value overrides the environment-, tag-, target-, and machine-scoped values for the same variable — what is running beats where it runs. Use it when a single step needs a different connection string, path, or feature flag than the rest of the process, without inventing a new variable name. The variable editor shows the step badges a value is bound to, and flags a value whose step has since been deleted so the scope never silently goes stale.

### Also in this release

Step template management got tighter: built-in templates sync automatically, and exporting a template now carries its source key so it round-trips cleanly. 

See [Step Templates & Script Modules](https://www.jawsdeploy.net/features/step-templates-script-modules), the [Output Variables guide](https://www.jawsdeploy.net/guides/output-variables) — now with Python examples — or [The Power of Variables](https://www.jawsdeploy.net/guides/the-power-of-variables) to dig in.

