Utilities

pypads.utils.util.dict_merge(*dicts)[source]

Simple merge of dicts :param dicts: :return:

pypads.utils.util.dict_merge_caches(*dicts)[source]

Merge two dicts. Entries are overwritten if not mergeable. Cache is supported. :param dicts: dicts to merge :return:

pypads.utils.util.get_class_that_defined_method(meth)[source]

Try to find the class / module which defined given method. :param meth: Method for which we search an origin. :return:

pypads.utils.util.inheritors(clazz)[source]

Function getting all subclasses of given class. :param clazz: Clazz to search for :return:

pypads.utils.util.is_package_available(name)[source]

Check if given package is available. :param name: Name of the package :return:

pypads.utils.util.local_uri_to_path(uri)[source]

Convert URI to local filesystem path.

pypads.utils.util.sizeof_fmt(num, suffix='B')[source]

Get the mem / disk size in a human readable way. :param num: :param suffix: :return:

pypads.utils.util.string_to_int(s)[source]

Build a int from a given string. :param s: :return: