original_docstring: Return a configured Flask App using the Factory method.
docstring: Return a configured Flask App using the Factory method.
docstring_tokens: Return a configured Flask App using the Factory method .
code: def create_app(run_mode=os.getenv('FLASK_ENV', 'production')):
      """Return a configured Flask App using the Factory method."""
      app = Flask(__name__)
      app.config.from_object(config.CONFIGURATION[run_mode])
      # Configure Sentry
      if app.config.get('SENTRY_DSN', None):
          sentry_sdk.init(
              dsn=app.config.get('SENTRY_DSN'),
              integrations=[SENTRY_LOGGING]
          )
  
      setup_jwt_manager(app, jwt)
  
      return app
code_tokens: def create_app ( run_mode = os . getenv ( 'FLASK_ENV' , 'production' ) ) : app = Flask ( __name__ ) app . config . from_object ( config . CONFIGURATION [ run_mode ] ) if app . config . get ( 'SENTRY_DSN' , None ) : sentry_sdk . init ( dsn = app . config . get ( 'SENTRY_DSN' ) , integrations = [ SENTRY_LOGGING ] ) setup_jwt_manager ( app , jwt ) return app
short_docstring: Return a configured Flask App using the Factory method.
short_docstring_tokens: Return a configured Flask App using the Factory method .
comment: """Return a configured Flask App using the Factory method."""$SEP$# Configure Sentry