lambda-cloud-client
API for interacting with the Lambda GPU Cloud
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.4.0
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen
Requirements.
Python 3.7+
Installation & Usage
pip install
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)
Then import the package:
import lambda_cloud_client
Setuptools
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install to install the package for all users)
Then import the package:
import lambda_cloud_client
Tests
Execute pytest to run the tests.
Getting Started
Please follow the installation procedure and then run the following:
import time
import lambda_cloud_client
from lambda_cloud_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://cloud.lambdalabs.com/api/v1
# See configuration.py for a list of all supported configuration parameters.
configuration = lambda_cloud_client.Configuration(
host = "https://cloud.lambdalabs.com/api/v1"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure HTTP basic authorization: basicAuth
configuration = lambda_cloud_client.Configuration(
username = os.environ["USERNAME"],
password = os.environ["PASSWORD"]
)
# Configure Bearer authorization (auth-scheme): bearerAuth
configuration = lambda_cloud_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with lambda_cloud_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = lambda_cloud_client.DefaultApi(api_client)
add_ssh_key_request = lambda_cloud_client.AddSSHKeyRequest() # AddSSHKeyRequest |
try:
# Add SSH key
api_response = api_instance.add_ssh_key(add_ssh_key_request)
print("The response of DefaultApi->add_ssh_key:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->add_ssh_key: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://cloud.lambdalabs.com/api/v1
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultApi | add_ssh_key | POST /ssh-keys | Add SSH key |
| DefaultApi | delete_ssh_key | DELETE /ssh-keys/{id} | Delete SSH key |
| DefaultApi | get_instance | GET /instances/{id} | List details of a specific instance |
| DefaultApi | instance_types | GET /instance-types | Retrieve list of offered instance types |
| DefaultApi | launch_instance | POST /instance-operations/launch | Launch instances |
| DefaultApi | list_file_systems | GET /file-systems | List file systems |
| DefaultApi | list_instances | GET /instances | List running instances |
| DefaultApi | list_ssh_keys | GET /ssh-keys | List SSH keys |
| DefaultApi | restart_instance | POST /instance-operations/restart | Restart instances |
| DefaultApi | terminate_instance | POST /instance-operations/terminate | Terminate an instance |
Documentation For Models
- AddSSHKey200Response
- AddSSHKeyRequest
- Error
- ErrorCode
- ErrorResponseBody
- FileSystem
- GetInstance200Response
- Instance
- InstanceType
- InstanceTypeSpecs
- InstanceTypes200Response
- InstanceTypes200ResponseDataValue
- LaunchInstance200Response
- LaunchInstance200ResponseData
- LaunchInstanceRequest
- ListFileSystems200Response
- ListInstances200Response
- ListSSHKeys200Response
- Region
- RestartInstance200Response
- RestartInstance200ResponseData
- RestartInstanceRequest
- SshKey
- TerminateInstance200Response
- TerminateInstance200ResponseData
- TerminateInstanceRequest
- User
Documentation For Authorization
Authentication schemes defined for the API:
basicAuth
- Type: HTTP basic authentication
bearerAuth
- Type: Bearer authentication (auth-scheme)
Author
Metadata
Release files for lambda-cloud-client 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lambda_cloud_client-1.0.0.tar.gz | 29.8 kB | Without provenance | Details for lambda_cloud_client-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lambda_cloud_client-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for lambda_cloud_client-1.0.0-py3-none-any.whl |
Total release size: 85.6 kB
Release files / lambda_cloud_client-1.0.0.tar.gz
| Download URL | lambda_cloud_client-1.0.0.tar.gz |
|---|---|
| Size | 29.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cda51c9bcb3ac8a1e74e02d1c15f780d3e658b099884d1e350402c3f2565a44b
|
|
BLAKE2b-256 checksum How to use checksums |
57b2c0a54e65562541d7e6de80b5833904eb409eab9b9b22c75f9dec16f7a09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Darwin/21.6.0
|
Release files / lambda_cloud_client-1.0.0-py3-none-any.whl
| Download URL | lambda_cloud_client-1.0.0-py3-none-any.whl |
|---|---|
| Size | 55.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f910eb3dc479a1368b18a5ad98a1435b0f49889c8d1a67d64e65aff770f10fbd
|
|
BLAKE2b-256 checksum How to use checksums |
a5eba77b67d8962714ab7e3f85fcaa2995661bd870ef5373a274edd90b158581
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.5.1 CPython/3.11.4 Darwin/21.6.0
|
Security for lambda-cloud-client 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.