import importlib


def get_resource(name):
    """Return an instance of the requested Resource class.

    Since all of the resource classes are named `Resource`, this provides
    a slightly cleaner interface for using these classes via. importing rather
    than through the CLI.
    """
    module = importlib.import_module('tower_cli.resources.%s' % name)
    return module.Resource()