Package: lambda-cloud-client
lambda-cloud-clientAPI for interacting with the Lambda GPU CloudThis Python package is automatically generated by theOpenAPI Generatorproject:API version: 1.4.0Package version: 1.0.0Build package: org.openapitools.codegen.languages.PythonNextgenClientCodegenRequirements.Python 3.7+Installation & Usagepip installIf the python package is hosted on a repository, you can install directly using:pipinstallgit+https://github.com/GIT_USER_ID/GIT_REPO_ID.git(you may need to runpipwith root permission:sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)Then import the package:importlambda_cloud_clientSetuptoolsInstall viaSetuptools.pythonsetup.pyinstall--user(orsudo python setup.py installto install the package for all users)Then import the package:importlambda_cloud_clientTestsExecutepytestto run the tests.Getting StartedPlease follow theinstallation procedureand then run the following:importtimeimportlambda_cloud_clientfromlambda_cloud_client.restimportApiExceptionfrompprintimportpprint# 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: basicAuthconfiguration=lambda_cloud_client.Configuration(username=os.environ["USERNAME"],password=os.environ["PASSWORD"])# Configure Bearer authorization (auth-scheme): bearerAuthconfiguration=lambda_cloud_client.Configuration(access_token=os.environ["BEARER_TOKEN"])# Enter a context with an instance of the API clientwithlambda_cloud_client.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=lambda_cloud_client.DefaultApi(api_client)add_ssh_key_request=lambda_cloud_client.AddSSHKeyRequest()# AddSSHKeyRequest |try:# Add SSH keyapi_response=api_instance.add_ssh_key(add_ssh_key_request)print("The response of DefaultApi->add_ssh_key:\n")pprint(api_response)exceptApiExceptionase:print("Exception when calling DefaultApi->add_ssh_key:%s\n"%e)Documentation for API EndpointsAll URIs are relative tohttps://cloud.lambdalabs.com/api/v1ClassMethodHTTP requestDescriptionDefaultApiadd_ssh_keyPOST/ssh-keysAdd SSH keyDefaultApidelete_ssh_keyDELETE/ssh-keys/{id}Delete SSH keyDefaultApiget_instanceGET/instances/{id}List details of a specific instanceDefaultApiinstance_typesGET/instance-typesRetrieve list of offered instance typesDefaultApilaunch_instancePOST/instance-operations/launchLaunch instancesDefaultApilist_file_systemsGET/file-systemsList file systemsDefaultApilist_instancesGET/instancesList running instancesDefaultApilist_ssh_keysGET/ssh-keysList SSH keysDefaultApirestart_instancePOST/instance-operations/restartRestart instancesDefaultApiterminate_instancePOST/instance-operations/terminateTerminate an instanceDocumentation For ModelsAddSSHKey200ResponseAddSSHKeyRequestErrorErrorCodeErrorResponseBodyFileSystemGetInstance200ResponseInstanceInstanceTypeInstanceTypeSpecsInstanceTypes200ResponseInstanceTypes200ResponseDataValueLaunchInstance200ResponseLaunchInstance200ResponseDataLaunchInstanceRequestListFileSystems200ResponseListInstances200ResponseListSSHKeys200ResponseRegionRestartInstance200ResponseRestartInstance200ResponseDataRestartInstanceRequestSshKeyTerminateInstance200ResponseTerminateInstance200ResponseDataTerminateInstanceRequestUserDocumentation For AuthorizationAuthentication schemes defined for the API:basicAuthType: HTTP basic authenticationbearerAuthType: Bearer authentication (auth-scheme)Author