from functools import reduce


def deepGetAttr(obj, path):
    """
    Resolves a dot-delimited path on an object. If path is not found
    an `AttributeError` will be raised.
    """
    return reduce(getattr, path.split('.'), obj)