LESS_API_URL, LESS_API_TOKEN, and LESS_ASSET_ID automatically when the job runs.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Configure local credentials. The platform injects them when the job runs.
# 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 os
os.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 less
less.reload_config() # pick up env if less was already imported
# END LOCAL ONLY
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) |
LESS_ASSET_ID | Python asset id |
LESS_JOB_ID | set only on platform runs |