pylabrobot.resources.PetriDish.save#

PetriDish.save(fn: str, indent: int | None = None)#

Save a resource to a JSON file.

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

  • indent (int | None) – 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")