Utility functions

Utility functions for computing combinations of dimensions and hierarchy levels

cubes.common.get_logger()

Get brewery default logger

cubes.common.create_logger(level=None)

Create a default logger

class cubes.common.SimplifyingDict(*args, **kwds)

Initialize an ordered dictionary. Signature is the same as for regular dictionaries, but keyword arguments are not recommended because their insertion order is arbitrary.

set(key, value)

Set value in a dictionary even if value is None

class cubes.common.MissingPackage(package, feature=None, source=None, comment=None)

Bogus class to handle missing optional packages - packages that are not necessarily required for Cubes, but are needed for certain features.

cubes.common.localize_common(obj, trans)

Localize common attributes: label and description

cubes.common.localize_attributes(attribs, translations)

Localize list of attributes. translations should be a dictionary with keys as attribute names, values are dictionaries with localizable attribute metadata, such as label or description.

cubes.common.get_localizable_attributes(obj)

Returns a dictionary with localizable attributes of obj.

cubes.common.collect_subclasses(parent, suffix=None)

Collect all subclasses of parent and return a dictionary where keys are decamelized class names transformed to identifiers and with suffix removed.

Previous topic

HTTP WSGI OLAP Server Reference

Next topic

Backends

This Page