def init_addon(app, addon_name, routes=True):
    import_path = 'website.addons.{0}'.format(addon_name)

    # Import addon module
    addon_module = importlib.import_module(import_path)

    data = vars(addon_module)

    # Add routes
    if routes:
        for route_group in getattr(addon_module, 'ROUTES', []):
            process_rules(app, **route_group)

    # Build AddonConfig object
    return AddonConfig(
        **{
            key.lower(): value
            for key, value in data.iteritems()
        }
    )
Load addon module return its create configuration object.
dataset/ETHPy150Open CenterForOpenScience/osf.io/website/addons/base/__init__.py/init_addon