MacModelService
class MacModelService()The Mac model registry (GET /mac-models).
MacModelService.__init__
def __init__(impl: AsyncMacModelService, bridge: SyncBridge) -> NoneMacModelService.catalog
def catalog(*, region: Optional[str] = None) -> MacCatalogFree Macs and prices per Mac model (GET /mac-catalog). available is advisory; price is null on a cell without billing.
MacModelService.list
def list() -> List[MacModel]Every registered Mac model, ordered by id.
AsyncMacModelService
class AsyncMacModelService()The Mac model registry (GET /mac-models).
Lists the models reservations.create(model=...) accepts, with each
model's CPU cores, physical memory, physical SSD capacity and sandbox
disk room in MiB, maximum sandbox count, and default sandbox size. catalog() adds free Macs
and prices.
AsyncMacModelService.__init__
def __init__(transport: AsyncTransport) -> NoneAsyncMacModelService.list
async def list() -> List[MacModel]Every registered Mac model, ordered by id.
AsyncMacModelService.catalog
async def catalog(*, region: Optional[str] = None) -> MacCatalogFree Macs and prices per Mac model (GET /mac-catalog). available is advisory; price is null on a cell without billing.
MacModel
class MacModel(BaseModel)A Mac model.
Attributes:
default_sizeOptional[MacResources]disk_mibStrictInt = Field(description='Physical SSD capacity in MiB, not free space or a per-sandbox disk allowance.')idStrictStr = Field(description='Mac model slug accepted by POST /reservations.')max_sandboxesStrictInt = Field(description='Most sandboxes a Mac of this model runs at once: 2 when its cores, memory, and sandbox disk room each fit two minimum-sized sandboxes (4 cores, 4096 MiB, 81920 MiB of disk), 1 when they fit one, and 0 when they fit none. The sizes of the running sandboxes must also fit the Mac.')memory_mibStrictInt = Field(description='Physical memory in MiB.')nameStrictStr = Field(description='Display name of the Mac model.')sandbox_disk_mibStrictInt = Field(description="Disk room for sandboxes on one Mac of this model, in MiB. The disks of all sandboxes on the Mac, stopped sandboxes included, add up to at most this. Zero until the model's disk room is measured.")vcpusStrictInt = Field(description='CPU cores in the Mac.')additional_propertiesDict[str, Any] = {}
model_config
model_config = ConfigDict(populate_by_name=True, validate_assignment=True, protected_namespaces=())MacModel.to_str
def to_str() -> strReturns the string representation of the model using alias
MacModel.to_json
def to_json() -> strReturns the JSON representation of the model using alias
MacModel.from_json
@classmethod
def from_json(json_str: str) -> Optional[Self]Create an instance of MacModel from a JSON string
MacModel.to_dict
def to_dict() -> Dict[str, Any]Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True):
Noneis only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNoneare ignored.- Fields in
self.additional_propertiesare added to the output dict.
MacModel.from_dict
@classmethod
def from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]Create an instance of MacModel from a dict
MacCatalog
class MacCatalog(BaseModel)Free Macs and prices per Mac model, per region.
Attributes:
regionsList[MacCatalogRegion] = Field(description='Every region the answer covers, in catalog order.')additional_propertiesDict[str, Any] = {}
model_config
model_config = ConfigDict(populate_by_name=True, validate_assignment=True, protected_namespaces=())MacCatalog.to_str
def to_str() -> strReturns the string representation of the model using alias
MacCatalog.to_json
def to_json() -> strReturns the JSON representation of the model using alias
MacCatalog.from_json
@classmethod
def from_json(json_str: str) -> Optional[Self]Create an instance of MacCatalog from a JSON string
MacCatalog.to_dict
def to_dict() -> Dict[str, Any]Return the dictionary representation of the model using alias.
This has the following differences from calling pydantic's
self.model_dump(by_alias=True):
Noneis only added to the output dict for nullable fields that were set at model initialization. Other fields with valueNoneare ignored.- Fields in
self.additional_propertiesare added to the output dict.
MacCatalog.from_dict
@classmethod
def from_dict(obj: Optional[Dict[str, Any]]) -> Optional[Self]Create an instance of MacCatalog from a dict