lambdacloud
An unofficial python client for Lambda Lab's cloud computing platform.
Installation
pip install lambdacloud
Usage
Authenticate
from lambdacloud import login
login(token="<your token>")
Create an Instance
See "list-available-instance-types" for a list of available instance types. Also, see "list-available-ssh-keys" for a list of available ssh keys.
from lambdacloud import create_instance
instance_id = create_instance("gpu_1x_a10", ssh_key_names="my-ssh-key")
print(instance_id)
"""
["<instance id>"]
"""
Delete an Instance
from lambdacloud import delete_instance
delete_instance("<instance id>")
List Instances
from lambdacloud import list_instances
instances = list_instances()
print(instances)
List Available Instance Types
from lambdacloud import list_instance_types
instance_types = list_instance_types()
for instance_type in instance_types:
print(instance_type)
"""
InstanceType(name=gpu_8x_a100_80gb_sxm4, price_cents_per_hour=1200, description=8x A100 (80 GB SXM4))
InstanceType(name=gpu_1x_a10, price_cents_per_hour=60, description=1x A10 (24 GB PCIe))
InstanceType(name=gpu_1x_a100_sxm4, price_cents_per_hour=110, description=1x A100 (40 GB SXM4))
InstanceType(name=gpu_8x_a100, price_cents_per_hour=880, description=8x A100 (40 GB SXM4))
InstanceType(name=gpu_8x_v100, price_cents_per_hour=440, description=8x Tesla V100 (16 GB))
"""
# To show all instance types, even if they are not available to create
instance_types = list_instance_types(show_all=True)
List Available SSH Keys
from lambdacloud import list_ssh_keys
ssh_keys = list_ssh_keys()
for ssh_key in ssh_keys:
print(ssh_key)
"""
SshKey(name=my-ssh-key)
"""
Add an SSH Key
from lambdacloud import add_ssh_key
add_ssh_key("my-ssh-key", "<public key>")
Add an SSH Key from a File
from lambdacloud import add_ssh_key_from_file
add_ssh_key_from_file("my-ssh-key", "<path to public key file>")
Credits
This package is heavily inspired by huggingface_hub
Metadata
Release files for lambdacloud 0.0.2
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 |
|---|---|---|---|---|
| lambdacloud-0.0.2.tar.gz | 6.4 kB | Without provenance | Details for lambdacloud-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lambdacloud-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for lambdacloud-0.0.2-py3-none-any.whl |
Total release size: 12.7 kB
Release files / lambdacloud-0.0.2.tar.gz
| Download URL | lambdacloud-0.0.2.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34e04f32a4aadda1edecea02c8e79959db76f4880d9695e6b04c63f79ae0e051
|
|
BLAKE2b-256 checksum How to use checksums |
81fe1822d60727ba6294bdc2fa9bca0621729fe52a20e4fbb43e266f36950e80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / lambdacloud-0.0.2-py3-none-any.whl
| Download URL | lambdacloud-0.0.2-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
de640db05c11a49a0b9ebbaa19f4bf4a5662fc8d07dbfb28f69448012207a7c1
|
|
BLAKE2b-256 checksum How to use checksums |
98fdb46e16e5c5b135e94a9d7c09c91492acde54185ad3ceea0f2e0ca424c0d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for lambdacloud 0.0.2
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.