boss.helper

Attributes

log

Functions

get_module(path[, relative_path])

get_class_by_name(name[, relative_path])

Resolve class by name

file_from_url(→ io.IOBase)

Load content from a file specified by a URL.

extend_none_allowed_list(→ list | None)

Extend a list with another list which both can be None.

Module Contents

boss.helper.log
boss.helper.get_module(path, relative_path=None)[source]
boss.helper.get_class_by_name(name, relative_path=None)[source]

Resolve class by name

Parameters:

name – (str) “%s.%s” % (module.name, class.name)

Returns:

(class)

boss.helper.file_from_url(url: str) io.IOBase[source]

Load content from a file specified by a URL.

This can be every type of URL supported by pythons urllib (e.g. http://, file://, etc ). Giving the basic auth credentials in the URL in the form http://user:password@hostname:port/path is supported.

Returns:

file handle on the file

boss.helper.extend_none_allowed_list(list1: list | None, list2: list | None) list | None[source]

Extend a list with another list which both can be None.

If one of the lists is None, the other list is returned. If both lists are None, None is returned.

Parameters:
  • list1 – list to extend

  • list2 – list to extend with