Quick Start
Get started with the Lightwheel SDK in minutes.
Basic Usage
Using Pre-configured Loaders
The SDK provides pre-configured loader instances for common use cases:
from lightwheel_sdk.loader import (
login_manager,
object_loader,
floorplan_loader,
scene_loader
)
# Login using the manager
login_manager.login(username="your_username", password="your_password")
# Load objects
file_path, object_name, metadata = object_loader.acquire_by_registry(
registry_type="objects",
registry_name=["chair"],
file_type="USD"
)
# Load floorplans
usd_path_future = floorplan_loader.acquire_usd(
scene="robocasakitchen",
layout_id=1,
style_id=1
)
usd_path, metadata = usd_path_future.result()
# Load scenes
scene_id, scene_data = scene_loader.get_scene(
scene_type="layout",
index=1,
name="kitchen",
backend="robocasa"
)
CLI Usage
The SDK includes a command-line interface for quick operations:
Login
lwsdk login --username your_username --password your_password
Logout
lwsdk logout
Interactive Login
If you don't provide credentials, the CLI will prompt you:
lwsdk login
# Prompts for username and password
Environment Configuration
Configure the SDK using environment variables:
# Set API endpoint
export LW_API_ENDPOINT="https://api.lightwheel.net"
# Set logging level
export LW_SDK_LOG_LEVEL="DEBUG"
# Set log file path
export LW_SDK_LOG_FILE="/path/to/logfile.log"
# Set custom headers
export LW_SDK_HEADERS_X_CUSTOM_HEADER="custom_value"
Next Steps
- Learn about Authentication
- Explore Object Loading
- Configure Logging