blueprintable

Alias module. Imports Blueprint and BlueprintBook under the namespace draftsman.

get_blueprintable_from_string(blueprintable_string: str) Blueprintable

Returns a Blueprint or a BlueprintBook depending on the string passed in.

Gets a Blueprintable object based off of the blueprint_string. A “Blueprintable object” in this context means either a Blueprint, DeconstructionPlanner, UpgradePlanner, or a BlueprintBook, depending on the particular string you passed in. This function allows you generically accept either export strings of any of the above types and return the appropriate class instance.

Parameters:

blueprintable_string – The blueprint string to interpret.

Returns:

A Blueprint, DeconstructionPlanner, UpgradePlanner, or BlueprintBook object.

Raises:
  • MalformedBlueprintStringError – If the blueprint_string cannot be resolved due to an error with the zlib or JSON decompression.

  • IncorrectBlueprintTypeError – If the root level of the decompressed JSON object is neither "blueprint", "deconstruction_planner", "upgrade_planner", nor "blueprint_book".