<filename>app/__init__.py
from flask import Flask

from .config import config_map


def create_app(config_name='development'):
    app = Flask(__name__)
    app.config.from_object(config_map[config_name])

    return app

<filename>app/__init__.py
from flask import Flask

from .config import config_map


def create_app(config_name='development'):
    app = Flask(__name__)
    app.config.from_object(config_map[config_name])

    return app
