Lightning Cloud
raw JSON → 0.6.0 verified Mon Apr 27 auth: no python
A Python library for managing and deploying models on the Lightning AI cloud platform. Current version 0.6.0. Release cadence is irregular, tied to platform updates.
pip install lightning-cloud Common errors
error ModuleNotFoundError: No module named 'lightning' ↓
cause Trying to import 'lightning.cloud' without having 'lightning' installed.
fix
Install lightning-cloud only: pip install lightning-cloud. Do not install 'lightning' unless needed.
error ImportError: cannot import name 'LightningClient' from 'lightning_cloud' ↓
cause Older versions of lightning-cloud may not have LightningClient at the top-level.
fix
Upgrade to latest version: pip install --upgrade lightning-cloud
error requests.exceptions.HTTPError: 401 Client Error: Unauthorized ↓
cause No API key or invalid API key provided.
fix
Set LIGHTNING_API_KEY environment variable or pass api_key='your_key' to LightningClient.
Warnings
breaking Lightning Cloud API is in early development; endpoints and signatures change frequently without deprecation. ↓
fix Pin to a specific version and test thoroughly before upgrading.
gotcha The top-level import 'from lightning import cloud' does not work; you must import from 'lightning_cloud' directly. ↓
fix Use 'from lightning_cloud import ...'
gotcha LightningClient may require authentication via environment variable LIGHTNING_API_KEY; if not set, some methods will fail with authentication errors. ↓
fix Set LIGHTNING_API_KEY environment variable or pass api_key parameter to client.
Imports
- LightningClient wrong
from lightning.cloud import LightningClientcorrectfrom lightning_cloud import LightningClient - AuthHandler
from lightning_cloud.auth import AuthHandler
Quickstart
from lightning_cloud import LightningClient
client = LightningClient()
# Use client to interact with Lightning AI cloud
# Example: list projects
projects = client.get_projects()
print(projects)