API Reference

ckg_utils.py

read_ckg_config(key=None)[source]
save_dict_to_yaml(data, yaml_file)[source]
read_yaml(yaml_file)[source]
get_queries(queries_file)[source]
get_configuration(configuration_file)[source]
get_configuration_variable(configuration_file, variable)[source]
setup_logging(path='log.config', key=None)[source]

Setup logging configuration

listDirectoryFiles(directory)[source]
listDirectoryFolders(directory)[source]
checkDirectory(directory)[source]
is_jsonable(x)[source]
convert_dash_to_json(dash_object)[source]
class NumpyEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

default(obj)[source]

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return JSONEncoder.default(self, o)
class DictDFEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

default(obj)[source]

Implement this method in a subclass such that it returns a serializable object for o, or calls the base implementation (to raise a TypeError).

For example, to support arbitrary iterators, you could implement default like this:

def default(self, o):
    try:
        iterable = iter(o)
    except TypeError:
        pass
    else:
        return list(iterable)
    # Let the base class default method raise the TypeError
    return JSONEncoder.default(self, o)