# lambda-cloud-client
API for interacting with the Lambda GPU Cloud
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) 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:
```sh
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:
```python
import lambda_cloud_client
```
### Setuptools
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)
Then import the package:
```python
import lambda_cloud_client
```
### Tests
Execute `pytest` to run the tests.
## Getting Started
Please follow the [installation procedure](#installation--usage) and then run the following:
```python
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**](docs/DefaultApi.md#add_ssh_key) | **POST** /ssh-keys | Add SSH key
*DefaultApi* | [**delete_ssh_key**](docs/DefaultApi.md#delete_ssh_key) | **DELETE** /ssh-keys/{id} | Delete SSH key
*DefaultApi* | [**get_instance**](docs/DefaultApi.md#get_instance) | **GET** /instances/{id} | List details of a specific instance
*DefaultApi* | [**instance_types**](docs/DefaultApi.md#instance_types) | **GET** /instance-types | Retrieve list of offered instance types
*DefaultApi* | [**launch_instance**](docs/DefaultApi.md#launch_instance) | **POST** /instance-operations/launch | Launch instances
*DefaultApi* | [**list_file_systems**](docs/DefaultApi.md#list_file_systems) | **GET** /file-systems | List file systems
*DefaultApi* | [**list_instances**](docs/DefaultApi.md#list_instances) | **GET** /instances | List running instances
*DefaultApi* | [**list_ssh_keys**](docs/DefaultApi.md#list_ssh_keys) | **GET** /ssh-keys | List SSH keys
*DefaultApi* | [**restart_instance**](docs/DefaultApi.md#restart_instance) | **POST** /instance-operations/restart | Restart instances
*DefaultApi* | [**terminate_instance**](docs/DefaultApi.md#terminate_instance) | **POST** /instance-operations/terminate | Terminate an instance
## Documentation For Models
- [AddSSHKey200Response](docs/AddSSHKey200Response.md)
- [AddSSHKeyRequest](docs/AddSSHKeyRequest.md)
- [Error](docs/Error.md)
- [ErrorCode](docs/ErrorCode.md)
- [ErrorResponseBody](docs/ErrorResponseBody.md)
- [FileSystem](docs/FileSystem.md)
- [GetInstance200Response](docs/GetInstance200Response.md)
- [Instance](docs/Instance.md)
- [InstanceType](docs/InstanceType.md)
- [InstanceTypeSpecs](docs/InstanceTypeSpecs.md)
- [InstanceTypes200Response](docs/InstanceTypes200Response.md)
- [InstanceTypes200ResponseDataValue](docs/InstanceTypes200ResponseDataValue.md)
- [LaunchInstance200Response](docs/LaunchInstance200Response.md)
- [LaunchInstance200ResponseData](docs/LaunchInstance200ResponseData.md)
- [LaunchInstanceRequest](docs/LaunchInstanceRequest.md)
- [ListFileSystems200Response](docs/ListFileSystems200Response.md)
- [ListInstances200Response](docs/ListInstances200Response.md)
- [ListSSHKeys200Response](docs/ListSSHKeys200Response.md)
- [Region](docs/Region.md)
- [RestartInstance200Response](docs/RestartInstance200Response.md)
- [RestartInstance200ResponseData](docs/RestartInstance200ResponseData.md)
- [RestartInstanceRequest](docs/RestartInstanceRequest.md)
- [SshKey](docs/SshKey.md)
- [TerminateInstance200Response](docs/TerminateInstance200Response.md)
- [TerminateInstance200ResponseData](docs/TerminateInstance200ResponseData.md)
- [TerminateInstanceRequest](docs/TerminateInstanceRequest.md)
- [User](docs/User.md)
<a id="documentation-for-authorization"></a>
## Documentation For Authorization
Authentication schemes defined for the API:
<a id="basicAuth"></a>
### basicAuth
- **Type**: HTTP basic authentication
<a id="bearerAuth"></a>
### bearerAuth
- **Type**: Bearer authentication (auth-scheme)
## Author
Raw data
{
"_id": null,
"home_page": "https://github.com/dworznik/lambda-cloud-client",
"name": "lambda-cloud-client",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7,<4.0",
"maintainer_email": "",
"keywords": "OpenAPI,OpenAPI-Generator,Lambda Cloud API",
"author": "OpenAPI Generator Community",
"author_email": "team@openapitools.org",
"download_url": "https://files.pythonhosted.org/packages/57/b2/c0a54e65562541d7e6de80b5833904eb409eab9b9b22c75f9dec16f7a09b/lambda_cloud_client-1.0.0.tar.gz",
"platform": null,
"description": "# lambda-cloud-client\nAPI for interacting with the Lambda GPU Cloud\n\nThis Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:\n\n- API version: 1.4.0\n- Package version: 1.0.0\n- Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegen\n\n## Requirements.\n\nPython 3.7+\n\n## Installation & Usage\n### pip install\n\nIf the python package is hosted on a repository, you can install directly using:\n\n```sh\npip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git\n```\n(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)\n\nThen import the package:\n```python\nimport lambda_cloud_client\n```\n\n### Setuptools\n\nInstall via [Setuptools](http://pypi.python.org/pypi/setuptools).\n\n```sh\npython setup.py install --user\n```\n(or `sudo python setup.py install` to install the package for all users)\n\nThen import the package:\n```python\nimport lambda_cloud_client\n```\n\n### Tests\n\nExecute `pytest` to run the tests.\n\n## Getting Started\n\nPlease follow the [installation procedure](#installation--usage) and then run the following:\n\n```python\n\nimport time\nimport lambda_cloud_client\nfrom lambda_cloud_client.rest import ApiException\nfrom pprint import pprint\n\n# Defining the host is optional and defaults to https://cloud.lambdalabs.com/api/v1\n# See configuration.py for a list of all supported configuration parameters.\nconfiguration = lambda_cloud_client.Configuration(\n host = \"https://cloud.lambdalabs.com/api/v1\"\n)\n\n# The client must configure the authentication and authorization parameters\n# in accordance with the API server security policy.\n# Examples for each auth method are provided below, use the example that\n# satisfies your auth use case.\n\n# Configure HTTP basic authorization: basicAuth\nconfiguration = lambda_cloud_client.Configuration(\n username = os.environ[\"USERNAME\"],\n password = os.environ[\"PASSWORD\"]\n)\n\n# Configure Bearer authorization (auth-scheme): bearerAuth\nconfiguration = lambda_cloud_client.Configuration(\n access_token = os.environ[\"BEARER_TOKEN\"]\n)\n\n\n# Enter a context with an instance of the API client\nwith lambda_cloud_client.ApiClient(configuration) as api_client:\n # Create an instance of the API class\n api_instance = lambda_cloud_client.DefaultApi(api_client)\n add_ssh_key_request = lambda_cloud_client.AddSSHKeyRequest() # AddSSHKeyRequest | \n\n try:\n # Add SSH key\n api_response = api_instance.add_ssh_key(add_ssh_key_request)\n print(\"The response of DefaultApi->add_ssh_key:\\n\")\n pprint(api_response)\n except ApiException as e:\n print(\"Exception when calling DefaultApi->add_ssh_key: %s\\n\" % e)\n\n```\n\n## Documentation for API Endpoints\n\nAll URIs are relative to *https://cloud.lambdalabs.com/api/v1*\n\nClass | Method | HTTP request | Description\n------------ | ------------- | ------------- | -------------\n*DefaultApi* | [**add_ssh_key**](docs/DefaultApi.md#add_ssh_key) | **POST** /ssh-keys | Add SSH key\n*DefaultApi* | [**delete_ssh_key**](docs/DefaultApi.md#delete_ssh_key) | **DELETE** /ssh-keys/{id} | Delete SSH key\n*DefaultApi* | [**get_instance**](docs/DefaultApi.md#get_instance) | **GET** /instances/{id} | List details of a specific instance\n*DefaultApi* | [**instance_types**](docs/DefaultApi.md#instance_types) | **GET** /instance-types | Retrieve list of offered instance types\n*DefaultApi* | [**launch_instance**](docs/DefaultApi.md#launch_instance) | **POST** /instance-operations/launch | Launch instances\n*DefaultApi* | [**list_file_systems**](docs/DefaultApi.md#list_file_systems) | **GET** /file-systems | List file systems\n*DefaultApi* | [**list_instances**](docs/DefaultApi.md#list_instances) | **GET** /instances | List running instances\n*DefaultApi* | [**list_ssh_keys**](docs/DefaultApi.md#list_ssh_keys) | **GET** /ssh-keys | List SSH keys\n*DefaultApi* | [**restart_instance**](docs/DefaultApi.md#restart_instance) | **POST** /instance-operations/restart | Restart instances\n*DefaultApi* | [**terminate_instance**](docs/DefaultApi.md#terminate_instance) | **POST** /instance-operations/terminate | Terminate an instance\n\n\n## Documentation For Models\n\n - [AddSSHKey200Response](docs/AddSSHKey200Response.md)\n - [AddSSHKeyRequest](docs/AddSSHKeyRequest.md)\n - [Error](docs/Error.md)\n - [ErrorCode](docs/ErrorCode.md)\n - [ErrorResponseBody](docs/ErrorResponseBody.md)\n - [FileSystem](docs/FileSystem.md)\n - [GetInstance200Response](docs/GetInstance200Response.md)\n - [Instance](docs/Instance.md)\n - [InstanceType](docs/InstanceType.md)\n - [InstanceTypeSpecs](docs/InstanceTypeSpecs.md)\n - [InstanceTypes200Response](docs/InstanceTypes200Response.md)\n - [InstanceTypes200ResponseDataValue](docs/InstanceTypes200ResponseDataValue.md)\n - [LaunchInstance200Response](docs/LaunchInstance200Response.md)\n - [LaunchInstance200ResponseData](docs/LaunchInstance200ResponseData.md)\n - [LaunchInstanceRequest](docs/LaunchInstanceRequest.md)\n - [ListFileSystems200Response](docs/ListFileSystems200Response.md)\n - [ListInstances200Response](docs/ListInstances200Response.md)\n - [ListSSHKeys200Response](docs/ListSSHKeys200Response.md)\n - [Region](docs/Region.md)\n - [RestartInstance200Response](docs/RestartInstance200Response.md)\n - [RestartInstance200ResponseData](docs/RestartInstance200ResponseData.md)\n - [RestartInstanceRequest](docs/RestartInstanceRequest.md)\n - [SshKey](docs/SshKey.md)\n - [TerminateInstance200Response](docs/TerminateInstance200Response.md)\n - [TerminateInstance200ResponseData](docs/TerminateInstance200ResponseData.md)\n - [TerminateInstanceRequest](docs/TerminateInstanceRequest.md)\n - [User](docs/User.md)\n\n\n<a id=\"documentation-for-authorization\"></a>\n## Documentation For Authorization\n\n\nAuthentication schemes defined for the API:\n<a id=\"basicAuth\"></a>\n### basicAuth\n\n- **Type**: HTTP basic authentication\n\n<a id=\"bearerAuth\"></a>\n### bearerAuth\n\n- **Type**: Bearer authentication (auth-scheme)\n\n\n## Author\n\n\n\n\n",
"bugtrack_url": null,
"license": "NoLicense",
"summary": "Lambda Cloud API",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/dworznik/lambda-cloud-client",
"Repository": "https://github.com/dworznik/lambda-cloud-client"
},
"split_keywords": [
"openapi",
"openapi-generator",
"lambda cloud api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a5eba77b67d8962714ab7e3f85fcaa2995661bd870ef5373a274edd90b158581",
"md5": "73c16e926734934be08ead06101100a6",
"sha256": "f910eb3dc479a1368b18a5ad98a1435b0f49889c8d1a67d64e65aff770f10fbd"
},
"downloads": -1,
"filename": "lambda_cloud_client-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "73c16e926734934be08ead06101100a6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7,<4.0",
"size": 55807,
"upload_time": "2023-08-19T04:17:40",
"upload_time_iso_8601": "2023-08-19T04:17:40.010440Z",
"url": "https://files.pythonhosted.org/packages/a5/eb/a77b67d8962714ab7e3f85fcaa2995661bd870ef5373a274edd90b158581/lambda_cloud_client-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "57b2c0a54e65562541d7e6de80b5833904eb409eab9b9b22c75f9dec16f7a09b",
"md5": "228bfab2563ea390492905a9cbed9234",
"sha256": "cda51c9bcb3ac8a1e74e02d1c15f780d3e658b099884d1e350402c3f2565a44b"
},
"downloads": -1,
"filename": "lambda_cloud_client-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "228bfab2563ea390492905a9cbed9234",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7,<4.0",
"size": 29793,
"upload_time": "2023-08-19T04:17:42",
"upload_time_iso_8601": "2023-08-19T04:17:42.038972Z",
"url": "https://files.pythonhosted.org/packages/57/b2/c0a54e65562541d7e6de80b5833904eb409eab9b9b22c75f9dec16f7a09b/lambda_cloud_client-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-08-19 04:17:42",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dworznik",
"github_project": "lambda-cloud-client",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"requirements": [],
"tox": true,
"lcname": "lambda-cloud-client"
}