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.1.tar.gz (52.2 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.1-py3-none-any.whl (185.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.2.1.tar.gz
Algorithm Hash digest
SHA256 3d04bc86747e2dd03af572c1dbaecd588e325e2840d30c4af8261a1b195fa61d
MD5 234a0d9d4520e95973c4c6481ca22abb
BLAKE2b-256 1f5e203d9a06770e4be74d9b588beac335c665c83e07d49507e551b6163f201a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lambda_ai_cloud_api_client-2.2.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e47dc46792e56fbfbfcc37d525ed82cd51493baf46b3102944d16131068ffc87
MD5 b651f7ad11226c38d836c9fdd930df50
BLAKE2b-256 44a36faea20820c36558cf03e8bc91ba5fd35173eb40664c7b9b7937b07129ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for lambda_ai_cloud_api_client-2.2.1-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