pylabrobot.resources.ItemizedResource.save#

ItemizedResource.save(fn: str, indent: Optional[int] = None)#

Save a resource to a JSON file.

Parameters
  • fn (str) – File name. Caution: file will be overwritten.

  • indent (Optional[int]) – Same as json.dump’s indent argument (for json pretty printing).

Examples

Saving to a json file:

>>> from pylabrobot.resources.hamilton import STARLetDeck
>>> deck = STARLetDeck()
>>> deck.save("my_layout.json")