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

# Quickstart

> Install the SDK, get credentials from Less, and run your first script.

Write a custom Python script locally, then run it on Less with scheduling, logs, notifications, and flexible compute.

## 1. Install

Requires Python 3.11 or later.

```bash theme={null}
pip install less-sdk
```

## 2. Get values from Less

1. Create a Python asset in Less and save it.
2. The **Local SDK setup** modal opens. Copy the generated script into your editor.
   Reopen it later from the ⋯ menu → **Generate local SDK setup**.

The top of that script sets three values for local development. The token expires after 24 hours.

## 3. Run a script

Use the copied `os.environ` block, then call Less:

```python theme={null}
# LOCAL ONLY — omit this block when you paste the script into Less.
# 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
import pandas as pd

less.reload_config()  # pick up env if less was already imported

# END LOCAL ONLY

less.log("Connected to Less")

tables = less.list_tables()
less.log(f"Found {len(tables)} tables")

first_table = tables.iloc[0]
less.log(f"Reading table {first_table['table_name']}")

df = less.read_table(first_table["id"])
less.log(f"Successfully read {df.shape[0]} rows and {df.shape[1]} columns")

demo_df = pd.DataFrame(
    {
        "order_id": [1, 2, 3],
        "amount": [10.5, 20.0, 7.25],
    }
)

less.write_table("demo_orders", demo_df)
less.log("The script ran successfully")
```

## 4. Run it on Less

Paste the script back into the Python asset — omit the `os.environ` block. The platform sets those variables when the job runs. Add a schedule if you want it to run regularly.
