Coverage for appr/api/app.py : 29%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
jsonbody = request.get_json(force=True, silent=True) values = request.values.to_dict() if jsonbody: values.update(jsonbody) return values
app = Flask(__name__) CORS(app) setting = os.getenv('APP_ENV', "development") if setting != 'production': app.config.from_object(DevelopmentConfig) else: app.config.from_object(ProductionConfig) from appr.api.info import info_app from appr.api.registry import registry_app app.register_blueprint(info_app, url_prefix='/cnr') app.register_blueprint(registry_app, url_prefix='/cnr') app.logger.info("Start service") return app
def _check(name, scope): if name is None: raise InvalidUsage("%s: %s is malformed" % (scope, name), {'name': name})
_check(namespace, 'namespace') _check(name, 'package-name') return "%s/%s" % (namespace, name)
application = create_app() application.run(host='0.0.0.0') |