### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.impact_functions »

# Module: safe.impact_functions.utilities

Module to create damage curves from point data and additional logging utils relevant to impact_functions.

class `safe.impact_functions.utilities.``Damage_curve`(data)

  Class for implementation of damage curves based on point data

`safe.impact_functions.utilities.``admissible_plugins_to_str`(plugin_list)

  A helper to write the admissible plugin list to a string.

  Intended for use with the LOGGER so that admissible plugins can be pretty printed to the logs.

  Args: plugin_list str (required). A list of plugins

  Returns: A string representing the plugin list with nice formatting.

  Raises: None

`safe.impact_functions.utilities.``keywords_to_str`(keywords)

  Pretty print keywords dict or list of dicts to a string.

  Intended for use with the LOGGER so that keywords can be pretty printed to the logs.

  Args: keywords dict or list (required). A list or dict of keywords.

  Returns: A string representing the keyword list with nice formatting.

  Raises: None

`safe.impact_functions.utilities.``pretty_string`(myArg)

  A helper function that return a pretty string according to the args Args:

  > - myArs = string or list

  Returns:
    - if myArgs is string return myArgs

        if myArgs is list return each element as string separated by ‘,’

`safe.impact_functions.utilities.``remove_double_spaces`(myStr)

  Remove double spaces from a string. Return the string without any dobule spaces

This module forms part of the InaSAFE tool.

### Navigation

- index
- modules
- next
- previous
- Home »
- Contents »
- InaSAFE’s API documentation »
- Package::safe »
- Package::safe.impact_functions »