Skip to main content

A client library for accessing Lambda Cloud API

Project description

Lambda Cloud API - CLI

This project is a wrapper around the Lambda Cloud API with some additional Quality-of-Life additions. The documentation of the API can be found here: https://docs-api.lambda.ai/api/cloud

Installation

uv pip install lambda-ai-cloud-api-client

Usage

  1. Set up an API token and environment.

In your lambda.ai account go to https://cloud.lambda.ai/api-keys/cloud-api and generate a new Cloud AI Key. Set this token as an environment variable in the terminal you've installed this project.

export LAMBDA_CLOUD_API_TOKEN=<your-token>

The project also accepts LAMBDA_CLOUD_TOKEN and LAMBDA_API_TOKEN if you prefer that naming. Optionally you can set the api base url, LAMBDA_CLOUD_BASE_URL, the default is https://cloud.lambdalabs.com .

  1. Using the CLI

To save on keystrokes I've named the command lai for lambda.ai. To see all available commands use:

lai --help

Overview of features

  • List instances: lai ls
  • Get instance details: lai get <instance-id>
  • Start an instance: lai start --region us-east-1 --instance-type gpu_1x_a10 --ssh-key my-key --name demo
  • Start with filters (auto-selects type/region when narrowed to one): lai start --available --cheapest --gpu H100 --ssh-key my-key
  • Dry run start resolution without launching: lai start --dry-run --available --gpu H100 --ssh-key my-key
  • SSH into an instance by name or id (waits for IP and SSH availability): lai ssh <name-or-id>
  • Stop instances: lai stop <id-1> <id-2>
  • Restart instances: lai restart <id-1> <id-2>
  • Rename an instance: lai rename <instance-id> new-name
  • List instance types: lai types --available --cheapest --region us-east-1
    • --available shows only those instance types that are currently available
    • --cheapest finds the instance-type that is currently the cheapest $ per hour.
  • List available images: lai images --region us-east-1
  • List SSH keys: lai keys

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lambda_ai_cloud_api_client-2.2.0.tar.gz (52.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lambda_ai_cloud_api_client-2.2.0-py3-none-any.whl (184.6 kB view details)

Uploaded Python 3

File details

Details for the file lambda_ai_cloud_api_client-2.2.0.tar.gz.

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.2.0.tar.gz
Algorithm Hash digest
SHA256 31473f8fa3399ff9705db1c6f57601e1d63cebfcc8478b5deb3e7ac8e58c3a60
MD5 68669e323bc86ef1775c9f6bc4915fe5
BLAKE2b-256 1dfde32372d6c6b83398c57aafea850f09462d5dbc3e488c477e7f69d61da39c

See more details on using hashes here.

Provenance

The following attestation bundles were made for lambda_ai_cloud_api_client-2.2.0.tar.gz:

Publisher: ci.yml on alexandervaneck/lambda-ai-cloud-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lambda_ai_cloud_api_client-2.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 481142549e40f0cd6cca43b34e00de6ea790b48655dfc924c9d0d94432588454
MD5 a9fca994f84e2fcb8c27e22a5a3fe810
BLAKE2b-256 4edeceb4064aa28ef2fd4efdab363133b0e63ad615d7b96676dd9e81552f117f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lambda_ai_cloud_api_client-2.2.0-py3-none-any.whl:

Publisher: ci.yml on alexandervaneck/lambda-ai-cloud-api-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page