Python API Example

example.widgets

example.widgets.WIDGET_REF = 25

Reference number for widget factory

The factory of widgets can produce widgets at this rate or any multiple of this rate.

Type

int

class example.widgets.WidgetBlueprint(widget_type: str, circuit_file: str, molding_file: str)

A design for a single type of widget

Maintains the circuit diagram and injection molding specifications for a widget.

calculate_volume()float

Calculate the volume of space the widget consumes

Returns

The total volume in cubic meters

example.widgets.initialize_widget_machine(widget_type: str, widget_size: float)bool

Start the widget making machine

Parameters
  • widget_type – What kind of widget the machine should produce

  • widget_size – The size of widgets to be generated, in meters

Returns

If the machine was able to start up correctly