Devel Interface¶
-
class
pobapi.util.
CachedProperty
(func: Callable)[source]¶ Used as a decorator for caching properties. Works like the built-in @property decorator, except that a result is computed on first access only, with subsequent access returning the computed result directly. Note that the result replaces the decorated function on first access.
Returns: Cached result.
-
pobapi.util.
_calculate_mod_text
(line: str, value: float) → str[source]¶ Calculate an item affix’s correct value from range and offset.
Returns: Corrected item affix value.
-
pobapi.util.
_get_skill_tree_nodes
(url: str) → List[int][source]¶ Get a list of passive tree node IDs.
Returns: Passive tree node IDs.
-
pobapi.util.
_get_stat
(text: List[str], stat: str) → str[source]¶ Get the value of an item affix.
Returns: Item affix value.
-
pobapi.util.
_item_text
(text: List[str]) → Iterator[str][source]¶ Get all affixes on an item.
Returns: Generator for an item’s affixes.
-
pobapi.util.
_parse_text
(text: List[str], variant: str, alt_variant: str, mod_ranges: List[float]) → Iterator[str][source]¶ Get the correct variant and item affix values for items made in Path Of Building.
Returns: Generator for corrected variants and item affix values
-
pobapi.util.
accumulate
(func: Callable) → Callable[source]¶ Used as a decorator to accumulate the results a generator yields into a list. Note that this is useful for list comprehensions that are cleaner written with a generator approach.
Returns: Generator results.