Introduction

Each Skylight instance is a Windows desktop hosted in the cloud that supports interactive streaming and computer actions. The instance comes pre-configured with Microsoft Word, Microsoft PowerPoint, Microsoft Excel, VS Code, Firefox browser, and Paint.

You can customize your desktop by installing other apps.

Start a Windows Instance

import os
from skylight_sdk import Skylight

with Skylight(
apikey=os.getenv("SKYLIGHT_APIKEY", ""),
) as skylight:
instance = skylight.windows.start()

When starting an instance, you can specify a timeout period (in minutes) after which the instance will automatically terminate. The default timeout is 60 minutes:

# Specify timeout in minutes (default: 60)
instance = skylight.windows.start(timeout_minutes=120)

Instance State Management

Check instance state

Retrieve the current state of your Windows instance:

state = skylight.windows.state(instance_id="<id>")

Pause an instance

Hibernate your instance to save its state:

response = skylight.windows.pause(instance_id="<id>")

Note: Paused instances are charged one tenth of the hourly price of a running instance.

Resume an instance

Resume a previously paused instance:

response = skylight.windows.resume(instance_id="<id>")

Terminate an instance

Completely shut down and remove an instance:

response = skylight.windows.terminate(instance_id="<id>")

Warning: Termination is irreversible and all unsaved data will be lost.

List All Instances

Get a list of all your Windows instances:

instances = skylight.windows.instances()

Download Files

Transfer files from your Windows instance to your local machine:

# Download a single file
client.download_file(instance_id, remote_path="C:/Users/Administrator/Documents/report.pdf", local_path="./downloads/report.pdf")

# Download an entire directory
client.download_directory(instance_id, remote_path="C:/Users/Administrator/Documents", local_path="./downloads")

Note: Ensure the instance is running before attempting to download files. The local directory must exist before downloading. File downloads are billed at $0.03 per file.

Customizing Your Instance

Installing Software

Install additional software packages using the Chocolatey package manager:

client.install_chocolatey_packages(instance_id, packages=["firefox", "vscode", "7zip"])

A complete list of available packages can be found at https://community.chocolatey.org/packages.

Instance Resources

By default, Windows instances are provisioned with standard CPU and RAM configurations. If you need additional resources such as:

  • More RAM
  • Additional CPU cores
  • GPU acceleration

Contact our support team to upgrade your instance resources.

Pricing

Standard Skylight Windows virtual instances are billed at $0.005 a minute. Contact us for customisation including:

  • Instance size (CPU/RAM configuration)
  • GPU acceleration
  • Additional storage

Paused instances are not billed for compute time but incur storage charges for the preserved state, billed at $0.0005 a minute.

File downloads are billed at $0.03 per file.

Best Practices

  1. Use timeouts to prevent unintended billing - set an appropriate timeout when starting an instance
  2. Pause VMs when not in use to reduce costs while preserving state
  3. Install only needed software to keep your instance streamlined
  4. Check VM state before performing operations to ensure it’s in the expected state