"""This module configures and creates a Flask app instance."""

from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy

db = SQLAlchemy()


def create_app():
    """
    Create a Flask application instance.

    Args:
        config_name (str): A configuration to use for the application.

    Returns:
        app: A Flask application instance with necessary
        extensions initialized and bluePrints registered.
    """
    app = Flask(__name__)
    db.init_app(app)

    from .api_v1 import api as api_1_blueprint
    app.register_blueprint(api_1_blueprint, url_prefix='/api/v1.0')

    return app

@@ -124,16 +124,115 @@
 LAlchemy
+%0Afrom flask.ext.restful import Api%0Afrom config.config import config%0A# import ipdb; ipdb.set_trace()
 %0A%0Adb = S
@@ -260,16 +260,27 @@
 ate_app(
+config_name
 ):%0A    %22
@@ -576,29 +576,164 @@
     
-db.init_app(app)%0A
+# app.config.from_object(config%5Bconfig_name%5D)%0A    app.config.from_object(config%5Bconfig_name%5D)%0A    db.init_app(app)%0A    # import ipdb; ipdb.set_trace()
 %0A   
+ #
  fro
@@ -752,16 +752,19 @@
 port api
+_v1
  as api_
@@ -774,24 +774,26 @@
 lueprint%0A   
+ #
  app.registe
@@ -849,20 +849,128 @@
 0')%0A
-%0A    return app
+    # app.register_blueprint(api_1_blueprint)%0A%0A    return app%0A%0Aflask_app = create_app('development')%0A# api = Api(flask_app)
 %0A

Fix config import error.