class Controller(object):

    def __new__(cls, *args, **kargs):
        if not hasattr(cls, 'path'):
            raise NotImplementedError(
                "'Controller' subclasses should have a 'path' attribute")
Abstract attributes in Python