def is_active(feature):
  """ Check if a feature is active """

  if current_app:
    feature_flagger = current_app.extensions.get(EXTENSION_NAME)
    if feature_flagger:
      return feature_flagger.check(feature)
    else:
      raise AssertionError("Oops. This application doesn't have the Flask-FeatureFlag extention installed.")

  else:
    log.warn(u"Got a request to check for {feature} but we're running outside the request context. Check your setup. Returning False".format(feature=feature))
    return False
def is_active ( feature ) : if current_app : feature_flagger = current_app . extensions . get ( EXTENSION_NAME ) if feature_flagger : return feature_flagger . check ( feature ) else : raise AssertionError ( "Oops. This application doesn't have the Flask-FeatureFlag extention installed." ) else : log . warn ( u"Got a request to check for {feature} but we're running outside the request context. Check your setup. Returning False" . format ( feature = feature ) ) return False
Check if a feature is active