blueprintable¶
Alias module. Imports Blueprint, BlueprintBook,
DeconstructionPlanner, UpgradePlanner, and
Group under the namespace draftsman.
- get_blueprintable_from_string(
- blueprintable_string: str,
Gets a Blueprintable object based off of the
blueprint_string. A “Blueprintable object” in this context means either aBlueprint,DeconstructionPlanner,UpgradePlanner, or aBlueprintBook, depending on the particular string you passed in. This function allows you generically accept export strings of any of the above types and return the appropriate class instance.- Parameters:
- blueprintable_string: str¶
The blueprint string to interpret.
- Returns:
A
Blueprint,BlueprintBook,DeconstructionPlanner, orUpgradePlannerobject.- Raises:
MalformedBlueprintStringError – If the
blueprint_stringcannot 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", and thus it’s type cannot be deduced.
- get_blueprintable_from_JSON(
- blueprintable_JSON: dict,
Gets a Blueprintable object based off of the
blueprint_JSON. A “Blueprintable object” in this context means either aBlueprint,DeconstructionPlanner,UpgradePlanner, or aBlueprintBook, depending on the particular dict you passed in. This function allows you generically accept any valid JSON structure of the the above types and return the appropriate class instance.- Parameters:
- blueprintable_JSON: dict¶
The blueprint JSON dict to interpret.
- Returns:
A
Blueprint,BlueprintBook,DeconstructionPlanner, orUpgradePlannerobject.- Raises:
IncorrectBlueprintTypeError – If the root level of the decompressed JSON object is neither
"blueprint","deconstruction_planner","upgrade_planner", nor"blueprint_book", and thus it’s type cannot be deduced.