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
  • 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.1.0.tar.gz (51.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.1.0-py3-none-any.whl (183.6 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.1.0.tar.gz
Algorithm Hash digest
SHA256 56734d2dd47b2a2bc62772dcd3244f0e7516a4531814722a4d16f5845b52f1bf
MD5 00d642949bdf878c46ad071676f464bb
BLAKE2b-256 dd01b02dbf4e9b481ef01f5e098731dff2a133c5844659e80ec47c8882a92071

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for lambda_ai_cloud_api_client-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 952974f14648efefdc66bd0899000c7be82e04f6b68d7d0f6e05a1ed93dbd1ac
MD5 2c884af895d42b56f0f93a5433242ba1
BLAKE2b-256 5b11b1279fb96fa0c83d36311e1080b8ea333cc52c203d0eadef1fb41a1fb536

See more details on using hashes here.

Provenance

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