A Python SDK and CLI tool for creating, managing, and interacting with Morph Cloud VMs.
Project description
MorphCloud Python SDK
Overview
MorphCloud is a platform designed to spin up remote AI devboxes we call runtimes. It provides a suite of code intelligence tools and a Python SDK to manage, create, delete, and interact with runtime instances.
Setup Guide
Prerequisites
Python 3.11 or higher
Go to https://cloud.morph.so, log in with the provided credentials and create an API key.
Set the API key as an environment variable MORPH_API_KEY.
Installation
pip install morphcloud
Export the API key:
export MORPH_API_KEY="your-api-key"
Quick Start
To start using MorphCloud, you can create and manage runtime instances using the provided classes and methods. Here's a basic example to create a runtime instance:
from morphcloud.api import MorphCloudClient
client = MorphCloudClient()
snapshot = client.snapshots.create(vcpus=1, memory=128, disk_size=700, image_id="morphvm-minimal")
instance = client.instances.start(snapshot_id=snapshot.id)
print(instance.exec("echo 'Hello, World!'").stdout)
Command Line Interface
The SDK also provides a command line interface to interact with the MorphCloud API. You can use the CLI to create, delete, and manage runtime instances.
morphcloud snapshot list
morphcloud instance create
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file morphcloud-0.1.11.tar.gz.
File metadata
- Download URL: morphcloud-0.1.11.tar.gz
- Upload date:
- Size: 32.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
770b0204acf7b23bf99795f903e950ee21506625c3053e888585d9e7f3041b7b
|
|
| MD5 |
dec05b3e279d677fa7443638f8c05a65
|
|
| BLAKE2b-256 |
25033c5721ebd0d468fa0b79126bd39d8b995a11cb8eac3094044a4fefea811a
|
File details
Details for the file morphcloud-0.1.11-py3-none-any.whl.
File metadata
- Download URL: morphcloud-0.1.11-py3-none-any.whl
- Upload date:
- Size: 35.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d64af33a37041d32b5c42fccfb8f4cd6720d5d36c28fabdfff23230a680921a6
|
|
| MD5 |
f5041ec2f869fc9e3493178215254d6b
|
|
| BLAKE2b-256 |
6429196d6d40cfff0b937f1adab4bf84a349187e1d65f0d6a1f3fa67561f1e78
|