Skip to main content

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

morphcloud-0.1.13.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

morphcloud-0.1.13-py3-none-any.whl (34.9 kB view details)

Uploaded Python 3

File details

Details for the file morphcloud-0.1.13.tar.gz.

File metadata

  • Download URL: morphcloud-0.1.13.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for morphcloud-0.1.13.tar.gz
Algorithm Hash digest
SHA256 22b4e34e3f472e19c7a284e97147ae860633b2a8c4397c5a979a0190c3f8321f
MD5 0f371270dcd40e583ed94e9dbff73ba8
BLAKE2b-256 fb9cffb275afb1a390a9b116a514731f3d2413b78668c5d97c9ce1bd500d730c

See more details on using hashes here.

File details

Details for the file morphcloud-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: morphcloud-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 34.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.10

File hashes

Hashes for morphcloud-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 f65c3aa54ab9ad24438909b1338c469fbc9f9105f0b022e8ceb0ee0cb966d043
MD5 f1095f3706ca4d20edc75bc1ef69c86e
BLAKE2b-256 f3283b531bb64bf920e5ea8347382c6fdafdd380c50c798e83da34ef4eeb0446

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page