Skip to main content

Control Orka clusters and the macOS VMs they run.

Project description


An SDK for interacting with Orka clusters and the macOS VMs they run.



pip install orka_sdk


Get token

from orka_sdk.orka_sdk import OrkaSDK

orka = OrkaSDK()
orka.login(user='', password='password',license_key='license-key')

Revoke token


VM Management

Define and create a VM

# Define a VM
vm_data = {
	'vm_name': 'fake-name',
	'orka_base_image': 'my-image.img',
	'core_count': '3',
	'vcpu_count': '3'

# Create a VM
r = orka.create_vm(vm_data)  
vm =

Get VM by id

r = orka.get_vm_by_id('<vm_id>')
vm =

Get VM by name

r = orka.get_vm_by_name('<vm_name>')
vm =

Iterate over all VMs in system and execute a remote command on each

r = orka.list_system_vms()
for vm in
	r = vm.exec('printenv')

Commit current state of deployed VM to base image and clean up


Save a deployed VM's state as an Image

r = orka.save_vm_as_image('new-image.img', vm)

Commit VM state to base image

r = orka.commit_vm_state_to_base_image()

Purge VM

r = orka.purge_vm(vm)

Delete VM

r = orka.delete_vm(vm)

Start VM

r = orka.start_vm(vm)

Stop VM

r = orka.stop_vm(vm)

Suspend VM

r = orka.suspend_vm(vm)

Resume VM

r = orka.resume_vm(vm)

Revert VM

r = orka.revert_vm(vm)

Get VM status

r = orka.get_vm_status(vm)

VM Instances

VM Properties

Name Description
ip The ip address of the deployed VM
name The VM's name
ssh_port The VM's ssh port
id The VM's unique id
ram Available RAM
vcpu Virtual CPU count
cpu CPU count
io_boost I/O boost enabled
use_saved_state Used saved VM state at boot
gpu_passthrough GPU passthrough to host Node GPU enabled
screen_share_port The VM's screen share port
vnc_port The VM's vnc port
ssh_client Paramiko ssh client associated with the VM
sftp_client Paramiko ssh client associated with the VM
ssh_user The SSH user associated with the VM
ssh_pass The SSH password associated with the VM

VM Methods


Upload a file to a deployed VM

local_path = '/local/file/path'
dest_path = '/remote/file/path'

# Upload file
r = vm.upload(local_path, dest_path)

# Confirm success
r = vm.exec(f'cat {dest_path}')


Download a file from a deployed VM

remote_path = '/remote/file/path'
local_path = '/local/file/path'
r =, local_path)


Execute a remote command on a deployed VM

r = vm.exec('printenv')


Write an env var export statement to a deployed VM's .zshenv or elsewhere

data = {'FOO': 'bar'}
r = vm.write_persistent_env_var(data)

Alternatively, you can also pass a destination filepath, like so:

dest = '/Users/admin/.bash_profile'
data = {'foo': 'bar'}
r = vm.write_persistent_env_var(data=data, dest=dest)


Enable auto-login on a deployed VM

r = vm.enable_auto_login()


Create a launch daemon that calls an executable at machine startup

data = {'name':'my_launch_daemon', 'path_to_executable': '/path/to/executable'}
r = vm.create_launch_daemon(data)


Install Homebrew packages listed in a Brewfile.

NOTE: Homebrew must be installed on the VM

file_path = '/path/to/Brewfile'
r = vm.install_brew_packages(file_path)

K8s Management

Deploy a k8s service


Delete a k8s service


Create a k8s deployment


Delete a k8s deployment


Image Management

List images

r = orka.images.list()

Get image by name

r = orka.images.get('<image_name>')

Delete image

r = orka.images.delete('<image_name>')

Node Management

List nodes

r = orka.nodes.list()

Get node status

r = orka.nodes.get_status('<node_name>')

CI/CD Integrations

GitHub Actions Controller

from orka_sdk.gha_controller import GHAController

controller = GHAController()


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

orka-sdk-1.0.3.tar.gz (10.8 kB view hashes)

Uploaded source

Built Distribution

orka_sdk-1.0.3-py3-none-any.whl (11.5 kB view hashes)

Uploaded py3

Supported by

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