Configure local credentials. The platform injects them when the job runs.
Copy the script from the Local SDK setup modal in Less. The top of the file sets credentials for local development:
# LOCAL ONLY — the os.environ block below is for running on your machine.# When copying this script into Less, omit the os.environ section entirely.# The platform sets LESS_API_URL, LESS_API_TOKEN, and LESS_ASSET_ID for you.import osos.environ["LESS_API_URL"] = "your-less-api-url"os.environ["LESS_API_TOKEN"] = "your-script-api-token"os.environ["LESS_ASSET_ID"] = "your-python-asset-id"import lessless.reload_config() # pick up env if less was already imported# END LOCAL ONLY
Keep credentials out of the script you paste into Less. The platform injects LESS_API_URL, LESS_API_TOKEN, and LESS_ASSET_ID automatically when the job runs.
Env
Purpose
LESS_API_URL
e.g. https://app.example.com/api
LESS_API_TOKEN
script-api-token from the UI (expires after 24 hours)