# Path: config.py
# class APP:
# 
#     LISTEN_HOST = chain_load_setting("APP_HOST", "YAMS_APP_HOST", "127.0.0.1")
#     LISTEN_PORT = chain_load_setting("APP_PORT", "YAMS_APP_PORT", default=1110)
#     LISTEN_URL = "http://%s:%s" % (LISTEN_HOST, LISTEN_PORT)
# 
#     DEBUG = chain_load_setting("DEBUG", "YAMS_DEBUG", True)
#     DEBUG_FRONTEND = chain_load_setting("DEBUG_FRONTEND", "YAMS_DEBUG_FRONTEND", False)
# 
#     API_VERSION_CORE = chain_load_setting("API_VERSION_CORE", "YAMS_API_VERSION_CORE", default="dev")
#     API_VERSION_PLUGINS = chain_load_setting("API_VERSION_PLUGINS", "YAMS_API_VERSION_PLUGINS", default="dev")
# 
#     default_datadir = os.path.join(basedir, "yams_api", "data")
#     DATADIR = chain_load_setting("API_DATADIR", "YAMS_API_DATADIR", default=default_datadir)
# 
#     default_database = "sqlite:///" + os.path.join(basedir, "yams.sqlite")
#     SQLALCHEMY_DATABASE_URI = chain_load_setting("APP_DATABASE_URI", "YAMS_APP_DATABASE_URI", default=default_database)
# 
#     SITE_NAME = chain_load_setting("APP_REBRANDING_NAME", "YAMS_REBRANDING_NAME", default="YAMS")
# 
# Path: yams/app.py
# API_HOST = "%s://%s:%s" % (PREFERRED_URL_SCHEME, API.LISTEN_HOST, API.LISTEN_PORT)
# def load_user():
# def append_to_navigation_menu(dictionary):
# def inject_site_name():
# def inject_navbar(navigation_dict=navigation_dictionary_list):
# def to_json_valid_or_error(data_dict):
# def to_bootstrap_size(size):
# def yams_status():
# def yams_whoami():
# def index():
# 
# Path: manage_api.py
# def run_api():
# def run():
# def run_http_only():
# 
# Path: manage_database.py
# def is_a_yams_db(db_name, db_options=valid_database_options):
# def create(db):
# def drop(db):
# def show():


import os
import sys
    from flask.ext.script import Manager, Server
from config import APP
from yams.app import app
from manage_api import manager_api
from manage_database import manager_database
#!/usr/bin/env python
try:
except ImportError as e:
    print("You either need to activate your virtualenv or install YAMS dependencies.")
    sys.exit("Exception: %s" % e)

manager_app = Manager(app)

# app config binding
app.config.from_object(os.environ.get("FLASK_CONFIG") or "config")

# Path: config.py
# class APP:
# 
#     LISTEN_HOST = chain_load_setting("APP_HOST", "YAMS_APP_HOST", "127.0.0.1")
#     LISTEN_PORT = chain_load_setting("APP_PORT", "YAMS_APP_PORT", default=1110)
#     LISTEN_URL = "http://%s:%s" % (LISTEN_HOST, LISTEN_PORT)
# 
#     DEBUG = chain_load_setting("DEBUG", "YAMS_DEBUG", True)
#     DEBUG_FRONTEND = chain_load_setting("DEBUG_FRONTEND", "YAMS_DEBUG_FRONTEND", False)
# 
#     API_VERSION_CORE = chain_load_setting("API_VERSION_CORE", "YAMS_API_VERSION_CORE", default="dev")
#     API_VERSION_PLUGINS = chain_load_setting("API_VERSION_PLUGINS", "YAMS_API_VERSION_PLUGINS", default="dev")
# 
#     default_datadir = os.path.join(basedir, "yams_api", "data")
#     DATADIR = chain_load_setting("API_DATADIR", "YAMS_API_DATADIR", default=default_datadir)
# 
#     default_database = "sqlite:///" + os.path.join(basedir, "yams.sqlite")
#     SQLALCHEMY_DATABASE_URI = chain_load_setting("APP_DATABASE_URI", "YAMS_APP_DATABASE_URI", default=default_database)
# 
#     SITE_NAME = chain_load_setting("APP_REBRANDING_NAME", "YAMS_REBRANDING_NAME", default="YAMS")
# 
# Path: yams/app.py
# API_HOST = "%s://%s:%s" % (PREFERRED_URL_SCHEME, API.LISTEN_HOST, API.LISTEN_PORT)
# def load_user():
# def append_to_navigation_menu(dictionary):
# def inject_site_name():
# def inject_navbar(navigation_dict=navigation_dictionary_list):
# def to_json_valid_or_error(data_dict):
# def to_bootstrap_size(size):
# def yams_status():
# def yams_whoami():
# def index():
# 
# Path: manage_api.py
# def run_api():
# def run():
# def run_http_only():
# 
# Path: manage_database.py
# def is_a_yams_db(db_name, db_options=valid_database_options):
# def create(db):
# def drop(db):
# def show():


# Path: manage.py
import os
import sys
    from flask.ext.script import Manager, Server
from config import APP
from yams.app import app
from manage_api import manager_api
from manage_database import manager_database

#!/usr/bin/env python
try:
except ImportError as e:
    print("You either need to activate your virtualenv or install YAMS dependencies.")
    sys.exit("Exception: %s" % e)

manager_app = Manager(app)

# app config binding
app.config.from_object(os.environ.get("FLASK_CONFIG") or "config")

app.jinja_env.trim_blocks = True