Skip to main content
Complete API reference for the BoxLite Python SDK. Python: 3.10+ Platforms: macOS (Apple Silicon), Linux (x86_64, ARM64)

Installation

For the sync API (greenlet-based):

Runtime Management

boxlite.Boxlite

The main runtime for creating and managing boxes.

Class Methods

Instance Methods

Example

boxlite.Options

Runtime configuration options.

boxlite.BoxOptions

Configuration options for creating a box.

Volume Mount Format

Port Forwarding Format

Box Handle

boxlite.Box

Handle to a running or stopped box.

Properties

Methods

boxlite.BoxInfo

Metadata about a box.

boxlite.BoxStateInfo

Detailed state information for a box.

Sync API

Synchronous wrappers using greenlet fiber switching. Requires pip install boxlite[sync].

When to Use

Comparison Table

Classes

SyncBoxlite

SyncSimpleBox

SyncCodeBox

Architecture

The sync API uses greenlet fiber switching:
  1. A dispatcher fiber runs the asyncio event loop
  2. User code runs in the main fiber
  3. Sync methods switch to dispatcher, await async operations, then switch back
The sync API cannot be used inside an async context (when an event loop is already running).

Constants

Default values used by BoxLite.

See Also